![]() |
Gondwana Game Engine Development (master) - 2.7.0
Gondwana is a cross-platform 2.5D game and rendering engine written in C#/.NET 8. It provides fine-grained control over rendering, timing, and scene composition, with built-in support for parallax, z-ordering, pixel overhang, collision detection, and particle effects. Gondwana targets desktop and web platforms using SkiaSharp for graphics and pluggable audio backends for desktop and browser targets.
|
Defines the contract for a video player that can play, pause, stop, and seek video content. More...
Public Member Functions | |
| void | Open (Uri source) |
| Opens a video from the specified source URI. | |
| void | Open (Stream source, bool leaveOpen=false) |
| Opens a readable stream. Ownership transfers on success unless leaveOpen is true. Keep a borrowed stream alive and unused until the next Open or Dispose. Seek/loop require a seekable stream. Backends without stream support throw without taking ownership. | |
| void | Play () |
| Starts or resumes playback of the video. | |
| void | Pause () |
| Pauses the video playback. | |
| void | Stop () |
| Stops the video playback and resets the position. | |
| void | Seek (TimeSpan position) |
| Seeks to the specified position in the video. | |
| void | SetRate (double rate) |
| Sets the playback rate of the video. | |
Public Attributes | |
| int | width |
| Gets the natural size (width and height) of the video in pixels. | |
Properties | |
| VideoMetadata | Metadata [get] |
| Gets an atomic snapshot of metadata availability and values for the current source. | |
| bool | IsMetadataReady [get] |
| True only when metadata for the current source is available. | |
| bool | CanControlAudio [get] |
| Whether this backend exposes independent volume and mute controls. | |
| float | Volume [get, set] |
| Audible output gain from zero to one. Legacy backends may not support setting it. | |
| bool | IsMuted [get, set] |
| Mutes output without changing the retained volume. | |
| bool | CanSeek [get] |
| Whether the current media supports seeking. Legacy backends retain their existing seek behavior. | |
| Exception? | LastError [get] |
| The most recent playback failure, when available. | |
| bool | Loop [get, set] |
| Gets or sets a value indicating whether the video should loop when it reaches the end. | |
| bool | IsPlaying [get] |
| Gets a value indicating whether the video is currently playing. | |
| TimeSpan | Duration [get] |
| Gets the total duration of the video. | |
| TimeSpan | Position [get] |
| Gets the current playback position in the video. | |
| int int height | NaturalSize [get] |
| bool | HasAudio [get] |
| Gets whether the video has an audio track. Consult IsMetadataReady before interpreting false. | |
Events | |
| EventHandler | Started |
| Occurs when the video playback starts. | |
| EventHandler | Paused |
| Occurs when the video playback is paused. | |
| EventHandler | Stopped |
| Occurs when the video playback is stopped. | |
| EventHandler | Ended |
| Occurs when the video playback reaches the end. | |
| EventHandler< VideoStateChangedEventArgs > | StateChanged |
| Occurs when the video state changes, including MediaOpening, MediaOpened, MetadataReady, and MetadataFailed. MediaOpening must precede frames for a replacement source, after callbacks for the prior source have stopped. Events may run on background threads. | |
| EventHandler< VideoFrameReadyEventArgs > | FrameReady |
| Occurs when a decoded BGRX frame is ready. The pointer is valid only during the callback. Copy it before returning. Do not call engine/render operations or player controls here. | |
Defines the contract for a video player that can play, pause, stop, and seek video content.
Definition at line 6 of file IVideoPlayer.cs.
| void Gondwana.Video.IVideoPlayer.Open | ( | Stream | source, |
| bool | leaveOpen = false ) |
Opens a readable stream. Ownership transfers on success unless leaveOpen is true. Keep a borrowed stream alive and unused until the next Open or Dispose. Seek/loop require a seekable stream. Backends without stream support throw without taking ownership.
| source | The source. |
| leaveOpen | Whether to leave the supplied stream open after use. |
Implemented in Gondwana.Video.VlcVideoPlayer.
| void Gondwana.Video.IVideoPlayer.Open | ( | Uri | source | ) |
Opens a video from the specified source URI.
| source | The URI of the video source to open. |
Implemented in Gondwana.Video.VlcVideoPlayer.
| void Gondwana.Video.IVideoPlayer.Pause | ( | ) |
Pauses the video playback.
Implemented in Gondwana.Video.VlcVideoPlayer.
| void Gondwana.Video.IVideoPlayer.Play | ( | ) |
Starts or resumes playback of the video.
Implemented in Gondwana.Video.VlcVideoPlayer.
| void Gondwana.Video.IVideoPlayer.Seek | ( | TimeSpan | position | ) |
Seeks to the specified position in the video.
| position | The position to seek to in the video timeline. |
Implemented in Gondwana.Video.VlcVideoPlayer.
| void Gondwana.Video.IVideoPlayer.SetRate | ( | double | rate | ) |
Sets the playback rate of the video.
| rate | The playback rate multiplier (e.g., 1.0 for normal speed, 2.0 for double speed). |
Implemented in Gondwana.Video.VlcVideoPlayer.
| void Gondwana.Video.IVideoPlayer.Stop | ( | ) |
Stops the video playback and resets the position.
Implemented in Gondwana.Video.VlcVideoPlayer.
| int Gondwana.Video.IVideoPlayer.width |
Gets the natural size (width and height) of the video in pixels.
Definition at line 105 of file IVideoPlayer.cs.
|
get |
Whether this backend exposes independent volume and mute controls.
Implemented in Gondwana.Video.VlcVideoPlayer.
Definition at line 31 of file IVideoPlayer.cs.
|
get |
Whether the current media supports seeking. Legacy backends retain their existing seek behavior.
Implemented in Gondwana.Video.VlcVideoPlayer.
Definition at line 48 of file IVideoPlayer.cs.
|
get |
Gets the total duration of the video.
Implemented in Gondwana.Video.VlcVideoPlayer.
Definition at line 95 of file IVideoPlayer.cs.
|
get |
Gets whether the video has an audio track. Consult IsMetadataReady before interpreting false.
Implemented in Gondwana.Video.VlcVideoPlayer.
Definition at line 110 of file IVideoPlayer.cs.
|
get |
True only when metadata for the current source is available.
Implemented in Gondwana.Video.VlcVideoPlayer.
Definition at line 28 of file IVideoPlayer.cs.
|
getset |
Mutes output without changing the retained volume.
Implemented in Gondwana.Video.VlcVideoPlayer.
Definition at line 41 of file IVideoPlayer.cs.
|
get |
Gets a value indicating whether the video is currently playing.
Implemented in Gondwana.Video.VlcVideoPlayer.
Definition at line 90 of file IVideoPlayer.cs.
|
get |
The most recent playback failure, when available.
Implemented in Gondwana.Video.VlcVideoPlayer.
Definition at line 51 of file IVideoPlayer.cs.
|
getset |
Gets or sets a value indicating whether the video should loop when it reaches the end.
Implemented in Gondwana.Video.VlcVideoPlayer.
Definition at line 83 of file IVideoPlayer.cs.
|
get |
Gets an atomic snapshot of metadata availability and values for the current source.
Implemented in Gondwana.Video.VlcVideoPlayer.
Definition at line 25 of file IVideoPlayer.cs.
|
get |
Implemented in Gondwana.Video.VlcVideoPlayer.
Definition at line 105 of file IVideoPlayer.cs.
|
get |
Gets the current playback position in the video.
Implemented in Gondwana.Video.VlcVideoPlayer.
Definition at line 100 of file IVideoPlayer.cs.
|
getset |
Audible output gain from zero to one. Legacy backends may not support setting it.
Implemented in Gondwana.Video.VlcVideoPlayer.
Definition at line 34 of file IVideoPlayer.cs.
| EventHandler Gondwana.Video.IVideoPlayer.Ended |
Occurs when the video playback reaches the end.
Definition at line 132 of file IVideoPlayer.cs.
| EventHandler<VideoFrameReadyEventArgs> Gondwana.Video.IVideoPlayer.FrameReady |
Occurs when a decoded BGRX frame is ready. The pointer is valid only during the callback. Copy it before returning. Do not call engine/render operations or player controls here.
Definition at line 145 of file IVideoPlayer.cs.
| EventHandler Gondwana.Video.IVideoPlayer.Paused |
Occurs when the video playback is paused.
Definition at line 122 of file IVideoPlayer.cs.
| EventHandler Gondwana.Video.IVideoPlayer.Started |
Occurs when the video playback starts.
Definition at line 117 of file IVideoPlayer.cs.
| EventHandler<VideoStateChangedEventArgs> Gondwana.Video.IVideoPlayer.StateChanged |
Occurs when the video state changes, including MediaOpening, MediaOpened, MetadataReady, and MetadataFailed. MediaOpening must precede frames for a replacement source, after callbacks for the prior source have stopped. Events may run on background threads.
Definition at line 139 of file IVideoPlayer.cs.
| EventHandler Gondwana.Video.IVideoPlayer.Stopped |
Occurs when the video playback is stopped.
Definition at line 127 of file IVideoPlayer.cs.