diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-03-19 17:44:10 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-04-22 01:42:22 +0200 |
| commit | cca70e0824e6883f50838578897792476953ea24 (patch) | |
| tree | ab7c32822e94fe08d1bf03d6878c66cc95070720 /src/mpeg2_transcode.h | |
| parent | 066471f69400fc72e9c126ab36f5427329f30220 (diff) | |
Support MPEG2 compression.v1.9.6
Diffstat (limited to 'src/mpeg2_transcode.h')
| -rw-r--r-- | src/mpeg2_transcode.h | 19 |
1 files changed, 19 insertions, 0 deletions
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<std::shared_ptr<MonoMPEG2PictureFrame>, int64_t> IndexedFrame; + + boost::optional<IndexedFrame> compress_frame(FFmpegImage const& image); + boost::optional<IndexedFrame> flush(); + +private: + boost::optional<IndexedFrame> send_and_receive(AVFrame const* frame); +}; + + } |
