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

◆ capture_camera_from()

CaptureBuilder MayaFlux::Kriya::BufferOperation::capture_camera_from ( const std::shared_ptr< IO::IOManager > &  io_manager,
const IO::CameraConfig &  config,
std::optional< Portal::Graphics::RenderConfig >  render = std::nullopt 
)
static

Open a camera and return its capture builder.

Parameters
renderDraws the live camera when given.

Definition at line 101 of file BufferOperation.cpp.

105{
106 auto camera = io_manager->open_camera(config);
107 if (!camera) {
108 error<std::runtime_error>(Journal::Component::Kriya, Journal::Context::AsyncIO,
109 std::source_location::current(), "Failed to open camera");
110 }
111
112 auto buffer = io_manager->hook_camera_to_buffer(camera);
113 if (!buffer) {
114 error<std::runtime_error>(Journal::Component::Kriya, Journal::Context::AsyncIO,
115 std::source_location::current(), "Failed to hook camera to graphics buffer");
116 }
117
118 if (render) {
120 }
121
122 return CaptureBuilder(buffer);
123}
std::shared_ptr< NetworkGeometryBuffer > buffer
@ AsyncIO
Async I/O operations ( network, streaming)
@ Kriya
Automatable tasks and fluent scheduling api for Nodes and Buffers.
bool ensure_rendering(const std::shared_ptr< Buffers::VKBuffer > &buffer, const Portal::Graphics::RenderConfig &config)
Make a buffer draw to the window in a render config, unless it already does.

References MayaFlux::Journal::AsyncIO, buffer, MayaFlux::Kriya::detail::ensure_rendering(), and MayaFlux::Journal::Kriya.

+ Here is the call graph for this function: