Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces video texture support to the engine, enabling videos to be loaded and controlled as textures in the resource system. The changes span the engine’s graphics layer, Lua bindings, and resource management, providing both API and implementation for video playback and control. The most important changes are grouped below.
Video Texture and Decoder Implementation
VideoTextureandVideoDecoderclasses to support loading, decoding, and rendering video files as textures. This includes new interfaces (IVideoDecoder) and their Direct3D 11 implementations, as well as integration with the graphics device and resource management systems. ([[1]](https://github.com/Legacy-LuaSTG-Engine/LuaSTG-Sub/pull/104/files#diff-16e343118b82053e7ced8e4ee410d9b73fbc276e4fb19d162ddeaf689584170eR1-R42),[[2]](https://github.com/Legacy-LuaSTG-Engine/LuaSTG-Sub/pull/104/files#diff-e1badc69b766d21befbe45c2b9020930736b0213ac2e4dd8fcf1dd6c51025cd7R1-R75),[[3]](https://github.com/Legacy-LuaSTG-Engine/LuaSTG-Sub/pull/104/files#diff-d9cb4ef54e53706cc0fa10be3b9279f44d37b5fa82f4e00038ecc8dcc8a39824R1-R102),[[4]](https://github.com/Legacy-LuaSTG-Engine/LuaSTG-Sub/pull/104/files#diff-1244eb074ed9326f973c9555f4dd9c470f709a557386231968c73aed3638cd8fR1-R56))IGraphicsDevice) and its D3D11 implementation to create video textures and decoders, and linked Media Foundation libraries for video support. ([[1]](https://github.com/Legacy-LuaSTG-Engine/LuaSTG-Sub/pull/104/files#diff-95da1186b7f1f24c4b653b0c15936c4491f593dab2f9470095c5378031698c6dR112-R113),[[2]](https://github.com/Legacy-LuaSTG-Engine/LuaSTG-Sub/pull/104/files#diff-86a2dc86d16732adeefd8229ae04a2dd4f3aac20f5b6c95d085e415c3b52a063R25-R26),[[3]](https://github.com/Legacy-LuaSTG-Engine/LuaSTG-Sub/pull/104/files#diff-07a3cc0cabe5eb7e863ab4e58fc19a458e4b875afa052a04e7fde71168fa86f0R49-R52))Resource Manager and Lua Binding Enhancements
LoadVideomethod to the resource manager, allowing videos to be loaded into the texture pool and accessed like regular textures. ([[1]](https://github.com/Legacy-LuaSTG-Engine/LuaSTG-Sub/pull/104/files#diff-429333fc431e6fd0e9050dfe8a1f3f75df14fd869231ae68225f0fe8797bc3b3R101-R102),[[2]](https://github.com/Legacy-LuaSTG-Engine/LuaSTG-Sub/pull/104/files#diff-8f06d0eb6927fae3276efe114b66ca7f914edf8bbb207ede287d3e877a57cd18R230-R267))[[1]](https://github.com/Legacy-LuaSTG-Engine/LuaSTG-Sub/pull/104/files#diff-6373efbbaad11d3f3ac701989256f4c61f08c5a58b79f1353f8006ccea5d1edbR57-R68),[[2]](https://github.com/Legacy-LuaSTG-Engine/LuaSTG-Sub/pull/104/files#diff-6373efbbaad11d3f3ac701989256f4c61f08c5a58b79f1353f8006ccea5d1edbR688-R767),[[3]](https://github.com/Legacy-LuaSTG-Engine/LuaSTG-Sub/pull/104/files#diff-6373efbbaad11d3f3ac701989256f4c61f08c5a58b79f1353f8006ccea5d1edbR800-R806),[[4]](https://github.com/Legacy-LuaSTG-Engine/LuaSTG-Sub/pull/104/files#diff-6373efbbaad11d3f3ac701989256f4c61f08c5a58b79f1353f8006ccea5d1edbR4-R5))Example and Documentation
video_example.lua) demonstrating video playback, manual update with a stopwatch, and available control functions. This serves as documentation for the new video API. ([data/example/video_example.luaR1-R26](https://github.com/Legacy-LuaSTG-Engine/LuaSTG-Sub/pull/104/files#diff-3fdbc5e25a135b6d925d2e1bc7119b948b7a5ab0f18bfa01aa969a125f587e07R1-R26))These changes collectively enable video playback as textures, with full control and integration into the engine’s resource and scripting systems.