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

◆ capture_to_stream() [3/3]

BufferOperation MayaFlux::Kriya::BufferOperation::capture_to_stream ( const std::shared_ptr< IO::IOManager > &  io_manager,
const std::string &  filepath,
IO::VideoLoadConfig  config,
uint64_t  ring_frames = 0,
std::optional< Portal::Graphics::RenderConfig >  live = std::nullopt,
std::optional< Portal::Graphics::RenderConfig >  display = std::nullopt 
)
static

Capture a video file straight into a dynamic video stream it creates.

The video counterpart of the camera form: it loads the file, hooks it to a buffer and appends each played frame to a ring sized from that buffer.

Parameters
ring_framesFrames the ring keeps; zero keeps three seconds at the registered frame rate.
liveDraws the playing file when given.
displayDraws the stream through the pipeline's IOManager when given; the pipeline needs one.

Definition at line 329 of file BufferOperation.cpp.

336{
337 auto [video, audio] = io_manager->load_video(filepath, config);
338 if (!video) {
339 error<std::runtime_error>(Journal::Component::Kriya, Journal::Context::AsyncIO,
340 std::source_location::current(), "Failed to load video file: {}", filepath);
341 }
342
343 return capture_to_stream(io_manager, video, ring_frames, std::move(live), std::move(display));
344}
static BufferOperation capture_to_stream(const std::shared_ptr< IO::IOManager > &io_manager, const IO::CameraConfig &config, uint64_t ring_frames=0, std::optional< Portal::Graphics::RenderConfig > live=std::nullopt, std::optional< Portal::Graphics::RenderConfig > display=std::nullopt)
Capture a camera straight into a dynamic video stream it creates.
@ AsyncIO
Async I/O operations ( network, streaming)
@ Kriya
Automatable tasks and fluent scheduling api for Nodes and Buffers.

References MayaFlux::Journal::AsyncIO, capture_to_stream(), and MayaFlux::Journal::Kriya.

+ Here is the call graph for this function: