Documentation
¶
Overview ¶
This class is intended to be overridden by video decoder extensions with custom implementations of VideoStream.
Index ¶
- type Advanced
- type Any
- type Expanded
- type Extension
- type ID
- type Implementation
- type Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) AsVideoStreamPlayback() Instance
- func (self Instance) ID() ID
- func (self Instance) MixAudio(num_frames int) int
- func (self Instance) MoreArgs() MoreArgs
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) Virtual(name string) reflect.Value
- type Interface
- type MoreArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this [Extension]See Interface for methods that can be overridden by T.
func (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
func (*Extension[T]) AsResource ¶
func (*Extension[T]) AsVideoStreamPlayback ¶
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Implementation ¶
type Implementation = implementation
Implementation implements Interface with empty methods.
type Instance ¶
type Instance [1]gdclass.VideoStreamPlayback
Instance of the class with convieniently typed arguments and results.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) AsVideoStreamPlayback ¶
func (Instance) MixAudio ¶
Render 'num_frames' audio frames (of GetChannels floats each) from 'buffer', starting from index 'offset' in the array. Returns the number of audio frames rendered, or -1 on error.
type Interface ¶
type Interface interface { // Stops playback. May be called multiple times before [Play], or in response to [VideoStreamPlayer.Stop]. [IsPlaying] should return false once stopped. // // [IsPlaying]: https://pkg.go.dev/graphics.gd/classdb/VideoStreamPlayback#Interface // [Play]: https://pkg.go.dev/graphics.gd/classdb/VideoStreamPlayback#Interface // [VideoStreamPlayer.Stop]: https://pkg.go.dev/graphics.gd/classdb/VideoStreamPlayer#Instance.Stop Stop() // Called in response to [VideoStreamPlayer.Autoplay] or [VideoStreamPlayer.Play]. Note that manual playback may also invoke [Stop] multiple times before this method is called. [IsPlaying] should return true once playing. // // [IsPlaying]: https://pkg.go.dev/graphics.gd/classdb/VideoStreamPlayback#Interface // [Stop]: https://pkg.go.dev/graphics.gd/classdb/VideoStreamPlayback#Interface // [VideoStreamPlayer.Autoplay]: https://pkg.go.dev/graphics.gd/classdb/VideoStreamPlayer#Instance.Autoplay // [VideoStreamPlayer.Play]: https://pkg.go.dev/graphics.gd/classdb/VideoStreamPlayer#Instance.Play Play() // Returns the playback state, as determined by calls to [Play] and [Stop]. // // [Play]: https://pkg.go.dev/graphics.gd/classdb/VideoStreamPlayback#Interface // [Stop]: https://pkg.go.dev/graphics.gd/classdb/VideoStreamPlayback#Interface IsPlaying() bool // Set the paused status of video playback. [IsPaused] must return 'paused'. Called in response to the [VideoStreamPlayer.Paused] setter. // // [IsPaused]: https://pkg.go.dev/graphics.gd/classdb/VideoStreamPlayback#Interface // [VideoStreamPlayer.Paused]: https://pkg.go.dev/graphics.gd/classdb/VideoStreamPlayer#Instance.Paused SetPaused(paused bool) // Returns the paused status, as set by [SetPaused]. // // [SetPaused]: https://pkg.go.dev/graphics.gd/classdb/VideoStreamPlayback#Interface IsPaused() bool // Returns the video duration in seconds, if known, or 0 if unknown. GetLength() Float.X // Return the current playback timestamp. Called in response to the [VideoStreamPlayer.StreamPosition] getter. // // [VideoStreamPlayer.StreamPosition]: https://pkg.go.dev/graphics.gd/classdb/VideoStreamPlayer#Instance.StreamPosition GetPlaybackPosition() Float.X // Seeks to 'time' seconds. Called in response to the [VideoStreamPlayer.StreamPosition] setter. // // [VideoStreamPlayer.StreamPosition]: https://pkg.go.dev/graphics.gd/classdb/VideoStreamPlayer#Instance.StreamPosition Seek(time Float.X) // Select the audio track 'idx'. Called when playback starts, and in response to the [VideoStreamPlayer.AudioTrack] setter. // // [VideoStreamPlayer.AudioTrack]: https://pkg.go.dev/graphics.gd/classdb/VideoStreamPlayer#Instance.AudioTrack SetAudioTrack(idx int) // Allocates a [Texture2D] in which decoded video frames will be drawn. // // [Texture2D]: https://pkg.go.dev/graphics.gd/classdb/Texture2D GetTexture() Texture2D.Instance // Ticks video playback for 'delta' seconds. Called every frame as long as both [IsPaused] and [IsPlaying] return true. // // [IsPaused]: https://pkg.go.dev/graphics.gd/classdb/VideoStreamPlayback#Interface // [IsPlaying]: https://pkg.go.dev/graphics.gd/classdb/VideoStreamPlayback#Interface Update(delta Float.X) // Returns the number of audio channels. GetChannels() int // Returns the audio sample rate used for mixing. GetMixRate() int }
type MoreArgs ¶
type MoreArgs [1]gdclass.VideoStreamPlayback
MoreArgs is a container for Instance functions with additional 'optional' arguments.