class

Emerald::VLC::VideoFrameBuffer

Inherits Reference < Object

Thread-safe double-buffered video frame surface for LibVLC memory decoding. Uses native LibC allocation and OS Thread::Mutex to guarantee zero Boehm GC interference when accessed from LibVLC's background native worker threads.

Constructors

new(width : UInt32 = 0_u32, height : UInt32 = 0_u32)
Source

Instance methods

byte_size

Total size of a single frame buffer in bytes

Source
copy_read_buffer_to(dest : Slice(UInt8)) : Bool

Copies read buffer bytes into an existing destination slice

Source
finalize
Source
has_new_frame
Source
has_new_frame?
Source
height
Source
lock_write_buffer

Returns the memory pointer where LibVLC decodes the upcoming frame

Source
pitch
Source
pull_frame

Pulls the latest decoded frame for uploading to Godot's ImageTexture. Must be called from Godot's main thread during _process.

Source
resize(new_width : UInt32, new_height : UInt32) : Nil

Resizes buffers when video resolution changes

Source
unlock_and_swap

Commits the decoded frame and swaps write and read buffers

Source
width
Source