MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / WriteFrame

Method WriteFrame

src/FFmpegWriter.cpp:672–687  ·  view source on GitHub ↗

Add a frame to the queue waiting to be encoded.

Source from the content-addressed store, hash-verified

670
671// Add a frame to the queue waiting to be encoded.
672void FFmpegWriter::WriteFrame(std::shared_ptr<openshot::Frame> frame) {
673 // Check for open reader (or throw exception)
674 if (!is_open)
675 throw WriterClosed("The FFmpegWriter is closed. Call Open() before calling this method.", path);
676
677 ZmqLogger::Instance()->AppendDebugMethod(
678 "FFmpegWriter::WriteFrame",
679 "frame->number", frame->number,
680 "is_writing", is_writing);
681
682 // Write frames to video file
683 write_frame(frame);
684
685 // Keep track of the last frame added
686 last_frame = frame;
687}
688
689// Write all frames in the queue to the video file.
690void FFmpegWriter::write_frame(std::shared_ptr<Frame> frame) {

Callers

nothing calls this directly

Calls 3

WriterClosedClass · 0.85
AppendDebugMethodMethod · 0.80
GetFrameMethod · 0.45

Tested by

no test coverage detected