From cca70e0824e6883f50838578897792476953ea24 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 19 Mar 2024 17:44:10 +0100 Subject: Support MPEG2 compression. --- src/mpeg2_transcode.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/mpeg2_transcode.h') diff --git a/src/mpeg2_transcode.h b/src/mpeg2_transcode.h index ef5c8351..1f13cfc3 100644 --- a/src/mpeg2_transcode.h +++ b/src/mpeg2_transcode.h @@ -83,6 +83,25 @@ private: }; +class MPEG2Compressor : public MPEG2Codec +{ +public: + MPEG2Compressor(dcp::Size size, int video_frame_rate, int64_t bit_rate); + + MPEG2Compressor(MPEG2Compressor const&) = delete; + MPEG2Compressor& operator=(MPEG2Compressor const&) = delete; + + /** Frame data with frame index within the asset */ + typedef std::pair, int64_t> IndexedFrame; + + boost::optional compress_frame(FFmpegImage const& image); + boost::optional flush(); + +private: + boost::optional send_and_receive(AVFrame const* frame); +}; + + } -- cgit v1.2.3