Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
VideoStreamPlayback¶
Inherits: Resource < RefCounted < Object
Internal class used by VideoStream to manage playback state when played from a VideoStreamPlayer.
Description¶
This class is intended to be overridden by video decoder extensions with custom implementations of VideoStream.
Methods¶
_get_channels ( ) virtual const |
|
_get_length ( ) virtual const |
|
_get_mix_rate ( ) virtual const |
|
_get_playback_position ( ) virtual const |
|
_get_texture ( ) virtual const |
|
_is_paused ( ) virtual const |
|
_is_playing ( ) virtual const |
|
void |
_play ( ) virtual |
void |
|
void |
_set_audio_track ( int idx ) virtual |
void |
_set_paused ( bool paused ) virtual |
void |
_stop ( ) virtual |
void |
|
mix_audio ( int num_frames, PackedFloat32Array buffer=PackedFloat32Array(), int offset=0 ) |
Method Descriptions¶
int _get_channels ( ) virtual const
Returns the number of audio channels.
float _get_length ( ) virtual const
Returns the video duration in seconds, if known, or 0 if unknown.
int _get_mix_rate ( ) virtual const
Returns the audio sample rate used for mixing.
float _get_playback_position ( ) virtual const
Return the current playback timestamp. Called in response to the VideoStreamPlayer.stream_position getter.
Texture2D _get_texture ( ) virtual const
Allocates a Texture2D in which decoded video frames will be drawn.
bool _is_paused ( ) virtual const
Returns the paused status, as set by _set_paused.
bool _is_playing ( ) virtual const
Returns the playback state, as determined by calls to _play and _stop.
void _play ( ) virtual
Called in response to VideoStreamPlayer.autoplay or VideoStreamPlayer.play. Note that manual playback may also invoke _stop multiple times before this method is called. _is_playing should return