Internal class used by [VideoStream] to manage playback state when played from a [VideoStreamPlayer].
This class is intended to be overridden by video decoder extensions with custom implementations of [VideoStream].
Returns the number of audio channels.
Returns the video duration in seconds, if known, or 0 if unknown.
Returns the audio sample rate used for mixing.
Return the current playback timestamp. Called in response to the [member VideoStreamPlayer.stream_position] getter.
Allocates a [Texture2D] in which decoded video frames will be drawn.
Returns the paused status, as set by [method _set_paused].
Returns the playback state, as determined by calls to [method _play] and [method _stop].
Called in response to [member VideoStreamPlayer.autoplay] or [method VideoStreamPlayer.play]. Note that manual playback may also invoke [method _stop] multiple times before this method is called. [method _is_playing] should return [code]true[/code] once playing.
Seeks to [param time] seconds. Called in response to the [member VideoStreamPlayer.stream_position] setter.
Select the audio track [param idx]. Called when playback starts, and in response to the [member VideoStreamPlayer.audio_track] setter.
Set the paused status of video playback. [method _is_paused] must return [param paused]. Called in response to the [member VideoStreamPlayer.paused] setter.
Stops playback. May be called multiple times before [method _play], or in response to [method VideoStreamPlayer.stop]. [method _is_playing] should return [code]false[/code] once stopped.
Ticks video playback for [param delta] seconds. Called every frame as long as both [method _is_paused] and [method _is_playing] return [code]true[/code].
Render [param num_frames] audio frames (of [method _get_channels] floats each) from [param buffer], starting from index [param offset] in the array. Returns the number of audio frames rendered, or -1 on error.