X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fffmpeg_encoder.h;h=df2dcfcc866f5a7535c697274244dd4a3a02d6fa;hb=8f8730cadb3dae36e8aa7b7c732a7c162eac0fb6;hp=98c4704e2e5abd80bede1cc894d38788534b6ad7;hpb=895f945a6bababdf1964b0522d591db96368db22;p=dcpomatic.git diff --git a/src/lib/ffmpeg_encoder.h b/src/lib/ffmpeg_encoder.h index 98c4704e2..df2dcfcc8 100644 --- a/src/lib/ffmpeg_encoder.h +++ b/src/lib/ffmpeg_encoder.h @@ -31,22 +31,62 @@ class Butler; class FFmpegEncoder : public Encoder { public: - FFmpegEncoder (boost::shared_ptr film, boost::weak_ptr job, boost::filesystem::path output, ExportFormat format, bool mixdown_to_stereo, int x264_crf); + FFmpegEncoder ( + boost::shared_ptr film, + boost::weak_ptr job, + boost::filesystem::path output, + ExportFormat format, + bool mixdown_to_stereo, + bool split_reels, + int x264_crf +#ifdef DCPOMATIC_VARIANT_SWAROOP + , boost::optional key + , boost::optional id +#endif + ); void go (); - float current_rate () const; + boost::optional current_rate () const; Frame frames_done () const; bool finishing () const { return false; } private: - FFmpegFileEncoder _file_encoder; + + class FileEncoderSet + { + public: + FileEncoderSet ( + dcp::Size video_frame_size, + int video_frame_rate, + int audio_frame_rate, + int channels, + ExportFormat, + int x264_crf, + bool three_d, + boost::filesystem::path output, + std::string extension +#ifdef DCPOMATIC_VARIANT_SWAROOP + , boost::optional key + , boost::optional id +#endif + ); + + boost::shared_ptr get (Eyes eyes) const; + void flush (); + void audio (boost::shared_ptr); + + private: + std::map > _encoders; + }; + + std::list _file_encoders; int _output_audio_channels; mutable boost::mutex _mutex; - DCPTime _last_time; + dcpomatic::DCPTime _last_time; EventHistory _history;