|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
| MAYAFLUX_API std::shared_ptr< Kakshya::CameraContainer > MayaFlux::choose_camera | ( | bool | choose_mode = true | ) |
Let the user pick a camera, and optionally a capture mode, then open it via IOManager::open_camera().
The pickers are Portal::Forma windows driven by the engine. Blocks until the user chooses or closes a window. Returns the opened container, ready for IOManager::hook_camera_to_buffer(), or nullptr on cancellation, when no camera is found, or if the camera fails to open. Portal::Forma must be initialized and the engine running.
Modes come from the camera source's presets. A mode is a request: the source falls back to the nearest mode the device accepts.
| choose_mode | If false, skip the mode picker and open with the default CameraConfig size and frame rate. |
Definition at line 302 of file Depot.cpp.
References MayaFlux::Journal::API, MayaFlux::Parallel::await_future(), MayaFlux::IO::CameraConfig::device_name, MayaFlux::IO::CameraConfig::display_name, MayaFlux::IO::FFmpegCameraReader::enumerate_configs(), get_io_manager(), MF_ERROR, mode, MayaFlux::Portal::Forma::pick(), MayaFlux::IO::FFmpegCameraReader::preset_modes(), and MayaFlux::Journal::Runtime.
Referenced by MayaFlux::Creator::read_camera().
Here is the call graph for this function:
Here is the caller graph for this function: