Description
LckMediator
is an internal static class that coordinates the registration and lookup of cameras (ILckCamera
) and monitors (ILckMonitor
) within LCK.
It maintains collections of active cameras and monitors, raises events when they are registered or unregistered, and provides lookup helpers by ID.
It also forwards monitor-to-camera assignments to downstream systems, such as mixers.
Usage
LckMediator
is typically used indirectly by components like LckCamera
and LckMonitor
, which register and unregister themselves automatically during their lifecycle.
Example: manually registering a custom ILckCamera
implementation
Example: reacting to camera/monitor registration events
References
Events
Event | Type | Description |
---|---|---|
CameraRegistered | Action<ILckCamera > | Invoked when a new camera is registered. |
CameraUnregistered | Action<ILckCamera > | Invoked when a camera is unregistered. |
MonitorRegistered | Action<ILckMonitor > | Invoked when a new monitor is registered. |
MonitorUnregistered | Action<ILckMonitor > | Invoked when a monitor is unregistered. |
MonitorToCameraAssignment | Action<string, string> | Invoked when a monitor is assigned to a camera. |
Methods
Method | Returns | Description |
---|---|---|
RegisterCamera(ILckCamera ) | void | Registers a camera if not already present. |
UnregisterCamera(ILckCamera ) | void | Unregisters a camera by ID. |
RegisterMonitor(ILckMonitor ) | void | Registers a monitor if not already present. |
UnregisterMonitor(ILckMonitor ) | void | Unregisters a monitor by ID. |
GetCameraById(string id) | ILckCamera | Retrieves a registered camera by its ID. |
GetMonitorById(string id) | ILckMonitor | Retrieves a registered monitor by its ID. |
GetCameras() | IEnumerable<ILckCamera > | Returns all currently registered cameras. |
GetMonitors() | IEnumerable<ILckMonitor > | Returns all currently registered monitors. |
NotifyMixerAboutMonitorForCamera(string, string) | void | Notifies listeners about an assignment between monitor and camera. |