Skip to content

Expose VideoStream playback instantiation and playback functions.#114515

Open
smix8 wants to merge 1 commit intogodotengine:masterfrom
smix8:vid_playback
Open

Expose VideoStream playback instantiation and playback functions.#114515
smix8 wants to merge 1 commit intogodotengine:masterfrom
smix8:vid_playback

Conversation

@smix8
Copy link
Copy Markdown
Contributor

@smix8 smix8 commented Jan 2, 2026

Exposes VideoStream playback instantiation and playback functions to create and control video playback with scripting.
Registers the missing VideoStreamPlaybackTheora class so it can be used with scripts.

This is required for projects that make heavy use of many simultaneous running video files and need more precise control over playback loading and state (e.g. think of gui heavy games with lots of video animated interface parts).

Updates the existing documentation as it tells a sad story of being written in a not very clear state of mind as it ...

  • mixes virtual and overrides with internals and unexposed function descriptions all over the place.
  • describes virtual overrides from the point of view as if they are the actual functions which they are not.
  • describes things as future happening when they already happened way before calling the function, e.g. that the texture call allocates a new texture is false information. A least for the build-in Theora the texture is already instantiated on stream creation returning just a shared ref and the actual frame data buffer gets allocated already on the video file load.

Currently the VideoStream has a dysfunctional exposed setup to be controlled by scripting with the only other options being to go through a lot of node bloat and dummy objects turning things into an unnecessary performance hazard. The current expose setup does not really make sense. It looks like someone in the past exposed all the virtual override functions just for modules but then forgot to do the full work and also expose the actual functions or (sub) classes to make it fully workable. So if you want to avoid all those node and dummy object issues your only real options for effective video stream playbacks are to to use a C++ extension / module. Total overkill requirement considering that nothing here possibly called by scripting has any real performance impact from scripting, it is all just playback control.

Expose VideoStream playback instantiation and playback functions to create and control video playback with scripting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants