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

◆ capture_file_from() [1/2]

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

Create a capture builder for a video file.

Parameters
renderDraws the video when given.

Definition at line 195 of file BufferOperation.cpp.

200{
201 auto [video, audio] = io_manager->load_video(filepath, config);
202 if (!video) {
203 error<std::runtime_error>(Journal::Component::Kriya, Journal::Context::AsyncIO,
204 std::source_location::current(), "Failed to load video file: {}", filepath);
205 }
206
207 auto buffer = io_manager->hook_video_container_to_buffer(video);
208 if (!buffer) {
209 error<std::runtime_error>(Journal::Component::Kriya, Journal::Context::AsyncIO,
210 std::source_location::current(), "Failed to hook video file to graphics buffer: {}", filepath);
211 }
212
213 if (render) {
215 }
216
217 return CaptureBuilder(buffer);
218}
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: