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

◆ write() [3/5]

void MayaFlux::IO::VideoFileWriter::write ( const std::shared_ptr< Kakshya::VideoStreamContainer > &  container,
uint64_t  frame_index = 0 
)

Definition at line 305 of file VideoFileWriter.cpp.

307{
308 if (!m_open.load(std::memory_order_acquire) || !container)
309 return;
310
311 auto span = container->get_frame_pixels(frame_index);
312 if (span.empty()) {
314 "VideoFileWriter::write(VideoStreamContainer): get_frame_pixels({}) returned empty",
315 frame_index);
316 return;
317 }
318
319 post(RawFrame {
320 .pixels = std::vector<uint8_t>(span.begin(), span.end()),
321 .width = container->get_width(),
322 .height = container->get_height() });
323}
#define MF_WARN(comp, ctx,...)
bool post(const WorkItem &item)
@ FileIO
Filesystem I/O operations.
@ IO
Networking, file handling, streaming.

References MayaFlux::Journal::FileIO, MayaFlux::Journal::IO, m_open, MF_WARN, MayaFlux::IO::VideoFileWriter::RawFrame::pixels, and post().

+ Here is the call graph for this function: