Add a frame to the queue waiting to be encoded.
| 670 | |
| 671 | // Add a frame to the queue waiting to be encoded. |
| 672 | void 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. |
| 690 | void FFmpegWriter::write_frame(std::shared_ptr<Frame> frame) { |
nothing calls this directly
no test coverage detected