X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fffmpeg_encoder.h;h=393a6d72eaa58bd1d09670015315a43a18097824;hb=182b9d2e2feb6545592868606aaf0f0146095481;hp=98c4704e2e5abd80bede1cc894d38788534b6ad7;hpb=895f945a6bababdf1964b0522d591db96368db22;p=dcpomatic.git diff --git a/src/lib/ffmpeg_encoder.h b/src/lib/ffmpeg_encoder.h index 98c4704e2..393a6d72e 100644 --- a/src/lib/ffmpeg_encoder.h +++ b/src/lib/ffmpeg_encoder.h @@ -31,26 +31,65 @@ 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); - - void go (); - - float current_rate () const; - Frame frames_done () const; - bool finishing () const { + FFmpegEncoder ( + std::shared_ptr film, + std::weak_ptr job, + boost::filesystem::path output, + ExportFormat format, + bool mixdown_to_stereo, + bool split_reels, + bool audio_stream_per_channel, + int x264_crf + ); + + void go () override; + + boost::optional current_rate () const override; + Frame frames_done () const override; + bool finishing () const override { 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, + bool audio_stream_per_channel, + int x264_crf, + bool three_d, + boost::filesystem::path output, + std::string extension + ); + + std::shared_ptr get (Eyes eyes) const; + void flush (); + void audio (std::shared_ptr); + + private: + std::map> _encoders; + }; + int _output_audio_channels; mutable boost::mutex _mutex; - DCPTime _last_time; + dcpomatic::DCPTime _last_time; EventHistory _history; - boost::shared_ptr _butler; + boost::filesystem::path _output; + ExportFormat _format; + bool _split_reels; + bool _audio_stream_per_channel; + int _x264_crf; + + std::shared_ptr _butler; }; #endif