![]() |
Gondwana Game Engine Development (master) - 2.6.1
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.
|
Desktop/native LibVLC 3 player. Controls are serialized; event handlers must not block on the engine thread. FrameReady runs on a decoder thread and is copy-only. More...
Public Member Functions | |||||
| VlcVideoPlayer (string[]? vlcArgs=null, int initialWidth=1280, int initialHeight=720) | |||||
| Creates a native desktop player. Native libraries are supplied by the application. | |||||
| 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.
| |||||
| void | Dispose () | ||||
Properties | |
| 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. | |
| 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 | HasAudio [get] |
| Gets whether the video has an audio track. Consult IsMetadataReady before interpreting false. | |
| 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] |
| Exception? | LastError [get] |
| The most recent native callback or playback failure, if any. | |
Events | |
| EventHandler? | Started |
| EventHandler? | Paused |
| EventHandler? | Stopped |
| EventHandler? | Ended |
| EventHandler< VideoStateChangedEventArgs >? | StateChanged |
| EventHandler< VideoFrameReadyEventArgs >? | FrameReady |
| Events inherited from Gondwana.Video.IVideoPlayer | |
| 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. | |
Additional Inherited Members | |
| Public Attributes inherited from Gondwana.Video.IVideoPlayer | |
| int | width |
| Gets the natural size (width and height) of the video in pixels. | |
Desktop/native LibVLC 3 player. Controls are serialized; event handlers must not block on the engine thread. FrameReady runs on a decoder thread and is copy-only.
Definition at line 8 of file VlcVideoPlayer.cs.
| Gondwana.Video.VlcVideoPlayer.VlcVideoPlayer | ( | string?[] | vlcArgs = null, |
| int | initialWidth = 1280, | ||
| int | initialHeight = 720 ) |
Creates a native desktop player. Native libraries are supplied by the application.
| vlcArgs | Optional LibVLC arguments. |
| initialWidth | Legacy compatibility argument, validated but not used to force a decode size. |
| initialHeight | Legacy compatibility argument; actual dimensions come from format negotiation. |
Definition at line 68 of file VlcVideoPlayer.cs.
| void Gondwana.Video.VlcVideoPlayer.Dispose | ( | ) |
Definition at line 321 of file VlcVideoPlayer.cs.
| void Gondwana.Video.VlcVideoPlayer.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. |
Implements Gondwana.Video.IVideoPlayer.
Definition at line 120 of file VlcVideoPlayer.cs.
| void Gondwana.Video.VlcVideoPlayer.Open | ( | Uri | source | ) |
Opens a video from the specified source URI.
| source | The URI of the video source to open. |
Implements Gondwana.Video.IVideoPlayer.
Definition at line 101 of file VlcVideoPlayer.cs.
| void Gondwana.Video.VlcVideoPlayer.Pause | ( | ) |
Pauses the video playback.
Implements Gondwana.Video.IVideoPlayer.
Definition at line 288 of file VlcVideoPlayer.cs.
| void Gondwana.Video.VlcVideoPlayer.Play | ( | ) |
Starts or resumes playback of the video.
Implements Gondwana.Video.IVideoPlayer.
Definition at line 286 of file VlcVideoPlayer.cs.
| void Gondwana.Video.VlcVideoPlayer.Seek | ( | TimeSpan | position | ) |
Seeks to the specified position in the video.
| position | The position to seek to in the video timeline. |
Implements Gondwana.Video.IVideoPlayer.
Definition at line 292 of file VlcVideoPlayer.cs.
| void Gondwana.Video.VlcVideoPlayer.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). |
Implements Gondwana.Video.IVideoPlayer.
Definition at line 294 of file VlcVideoPlayer.cs.
| void Gondwana.Video.VlcVideoPlayer.Stop | ( | ) |
Stops the video playback and resets the position.
Implements Gondwana.Video.IVideoPlayer.
Definition at line 290 of file VlcVideoPlayer.cs.
|
get |
Gets the total duration of the video.
Implements Gondwana.Video.IVideoPlayer.
Definition at line 44 of file VlcVideoPlayer.cs.
|
get |
Gets whether the video has an audio track. Consult IsMetadataReady before interpreting false.
Implements Gondwana.Video.IVideoPlayer.
Definition at line 42 of file VlcVideoPlayer.cs.
|
get |
True only when metadata for the current source is available.
Implements Gondwana.Video.IVideoPlayer.
Definition at line 40 of file VlcVideoPlayer.cs.
|
get |
Gets a value indicating whether the video is currently playing.
Implements Gondwana.Video.IVideoPlayer.
Definition at line 36 of file VlcVideoPlayer.cs.
|
get |
The most recent native callback or playback failure, if any.
Definition at line 50 of file VlcVideoPlayer.cs.
|
getset |
Gets or sets a value indicating whether the video should loop when it reaches the end.
Implements Gondwana.Video.IVideoPlayer.
Definition at line 34 of file VlcVideoPlayer.cs.
|
get |
Gets an atomic snapshot of metadata availability and values for the current source.
Implements Gondwana.Video.IVideoPlayer.
Definition at line 38 of file VlcVideoPlayer.cs.
|
get |
Implements Gondwana.Video.IVideoPlayer.
Definition at line 48 of file VlcVideoPlayer.cs.
|
get |
Gets the current playback position in the video.
Implements Gondwana.Video.IVideoPlayer.
Definition at line 46 of file VlcVideoPlayer.cs.
| EventHandler? Gondwana.Video.VlcVideoPlayer.Ended |
Definition at line 58 of file VlcVideoPlayer.cs.
| EventHandler<VideoFrameReadyEventArgs>? Gondwana.Video.VlcVideoPlayer.FrameReady |
Definition at line 62 of file VlcVideoPlayer.cs.
| EventHandler? Gondwana.Video.VlcVideoPlayer.Paused |
Definition at line 54 of file VlcVideoPlayer.cs.
| EventHandler? Gondwana.Video.VlcVideoPlayer.Started |
Definition at line 52 of file VlcVideoPlayer.cs.
| EventHandler<VideoStateChangedEventArgs>? Gondwana.Video.VlcVideoPlayer.StateChanged |
Definition at line 60 of file VlcVideoPlayer.cs.
| EventHandler? Gondwana.Video.VlcVideoPlayer.Stopped |
Definition at line 56 of file VlcVideoPlayer.cs.