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

◆ read_camera() [2/2]

std::shared_ptr< Kakshya::CameraContainer > MayaFlux::Creator::read_camera ( const IO::CameraConfig &  config)

Open a camera device as a live source container.

Opens via IOManager::open_camera() and returns the container, like read_audio() returns its container. Nothing is hooked until you pipe it into Graphics, or call IOManager::hook_camera_to_buffer().

Parameters
configDevice name, resolution hint, fps hint, format override.
Returns
Opened CameraContainer, or nullptr on failure.

Definition at line 196 of file Creator.cpp.

197{
198 auto container = get_io_manager()->open_camera(config);
199 if (!container) {
201 "read_camera: open_camera failed for device '{}'", config.device_name);
202 return nullptr;
203 }
204
205 MF_LIVE_EXPOSE_AUTO(container);
206 return container;
207}
#define MF_ERROR(comp, ctx,...)
#define MF_LIVE_EXPOSE_AUTO(ptr)
Auto-expose variant that deduces the key prefix from the shared_ptr element type.
@ Runtime
General runtime operations (default fallback)
@ API
MayaFlux/API Wrapper and convenience functions.
std::shared_ptr< IO::IOManager > get_io_manager()
Retrieves the global IOManager instance for file loading and buffer management.
Definition Depot.cpp:575

References MayaFlux::Journal::API, MayaFlux::IO::CameraConfig::device_name, MayaFlux::get_io_manager(), MF_ERROR, MF_LIVE_EXPOSE_AUTO, and MayaFlux::Journal::Runtime.

+ Here is the call graph for this function: