MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ register_frame_observer

std::function<uint32_t( const std::shared_ptr<void>& window_handle, std::function<void( const std::shared_ptr<std::vector<uint8_t>>&, uint32_t, uint32_t, uint32_t)>)> MayaFlux::Registry::Service::DisplayService::register_frame_observer

Register a per-frame observer for a window's captured frames.

The observer fires on the window's readback thread once per captured frame, receiving the published frame buffer, its width and height, and the swapchain format as uint32_t. Fires only for capture-enabled windows. The observer must not block; post to a queue for further work.

Requires the window's capture state to exist, which it does once the window has completed its first captured frame. Returns 0 if capture is not enabled or no frame has been captured yet; retry after a frame.

Returns
Opaque non-zero id for unregister_frame_observer, or 0 on failure.

Definition at line 198 of file DisplayService.hpp.