Skip to content

Commit 47ec385

Browse files
committed
feat(video): add Lua bindings for video playback and stream management
- Add Video.hpp and Video.cpp Lua binding classes for video resource management - Implement video information methods (getWidth, getHeight, getDuration, getCurrentTime, getFPS) - Implement playback control methods (seek, update, setLooping, setLoopRange, getLoopRange) - Add stream enumeration methods (getVideoStreams, getAudioStreams, getSubtitleStreams) - Add stream selection methods (selectVideoStream, selectAudioStream, selectSubtitleStream) - Implement getTexture method to retrieve associated Texture2D object - Register Video class in LuaWrapper for Lua API exposure - Add video_example_modern.lua example demonstrating video loading and playback - Update CMakeLists.txt to include new Video binding source files - Extend Texture2D and VideoTexture interfaces to support video decoder access
1 parent 39b0b90 commit 47ec385

8 files changed

Lines changed: 553 additions & 3 deletions

File tree

LuaSTG/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ set(LUASTG_ENGINE_SOURCES
128128
LuaSTG/LuaBinding/modern/SwapChain.cpp
129129
LuaSTG/LuaBinding/modern/Texture2D.hpp
130130
LuaSTG/LuaBinding/modern/Texture2D.cpp
131+
LuaSTG/LuaBinding/modern/Video.hpp
132+
LuaSTG/LuaBinding/modern/Video.cpp
131133
LuaSTG/LuaBinding/modern/RenderTarget.hpp
132134
LuaSTG/LuaBinding/modern/RenderTarget.cpp
133135
LuaSTG/LuaBinding/modern/DepthStencilBuffer.hpp

LuaSTG/LuaSTG/LuaBinding/LuaWrapper.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "LuaBinding/modern/Window.hpp"
88
#include "LuaBinding/modern/SwapChain.hpp"
99
#include "LuaBinding/modern/Texture2D.hpp"
10+
#include "LuaBinding/modern/Video.hpp"
1011
#include "LuaBinding/modern/RenderTarget.hpp"
1112
#include "LuaBinding/modern/DepthStencilBuffer.hpp"
1213
#include "LuaBinding/modern/Mesh.hpp"
@@ -82,6 +83,7 @@ namespace luastg::binding
8283
Window_Windows11Extension::registerClass(L);
8384
SwapChain::registerClass(L);
8485
Texture2D::registerClass(L);
86+
Video::registerClass(L);
8587
RenderTarget::registerClass(L);
8688
DepthStencilBuffer::registerClass(L);
8789
Mesh::registerClass(L);

0 commit comments

Comments
 (0)