class

Emerald::VLC::EventManager

Inherits Reference < Object

Thread-safe event queue bridging LibVLC background threads to Godot's main thread. Uses a fixed ring-buffer and OS Thread::Mutex to guarantee zero Boehm GC allocations or fiber context switches when handling LibVLC C callback notifications.

Constants

QUEUE_CAPACITY = 64

Constructors

new(handle : LibVLC::EventManager)
Source

Instance methods

finalize
Source
handle
Source
handle_native_event(event : LibVLC::Event) : Nil

Called by LibVLC on a background worker thread. Must perform ZERO allocations and only lock the OS Thread::Mutex.

Source
on_ended
Source
on_ended=(on_ended : -> Nil | Nil)
Source
on_error
Source
on_error=(on_error : String -> Nil | Nil)
Source
on_length_changed
Source
on_length_changed=(on_length_changed : Int64 -> Nil | Nil)
Source
on_paused
Source
on_paused=(on_paused : -> Nil | Nil)
Source
on_playing

Main-thread Crystal callbacks registered by player or node

Source
on_playing=(on_playing : -> Nil | Nil)

Main-thread Crystal callbacks registered by player or node

Source
on_position_changed
Source
on_position_changed=(on_position_changed : Float32 -> Nil | Nil)
Source
on_stopped
Source
on_stopped=(on_stopped : -> Nil | Nil)
Source
on_time_changed
Source
on_time_changed=(on_time_changed : Int64 -> Nil | Nil)
Source
poll_events

Dispatches all pending events to registered callbacks. Must be called regularly on the main thread (e.g. from Godot _process).

Source
queue_error(message : String) : Nil

Manually queues an error from Crystal wrapper

Source

Nested types