X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fffmpeg_encoder.h;h=79539acce44a24f8f7be9da8f8d1f9030645bc27;hp=5356c5ce2fd8aae6786493b10c4052e59fab43a8;hb=HEAD;hpb=597dda0151eaa8a0a7635be7a757a5f65405c40b diff --git a/src/lib/ffmpeg_encoder.h b/src/lib/ffmpeg_encoder.h index 5356c5ce2..2d5c6af87 100644 --- a/src/lib/ffmpeg_encoder.h +++ b/src/lib/ffmpeg_encoder.h @@ -21,31 +21,32 @@ #ifndef DCPOMATIC_FFMPEG_ENCODER_H #define DCPOMATIC_FFMPEG_ENCODER_H +#include "audio_mapping.h" +#include "butler.h" #include "encoder.h" #include "event_history.h" -#include "audio_mapping.h" #include "ffmpeg_file_encoder.h" -class Butler; class FFmpegEncoder : public Encoder { public: FFmpegEncoder ( - boost::shared_ptr film, - boost::weak_ptr job, + 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 (); + void go () override; - float current_rate () const; - Frame frames_done () const; - bool finishing () const { + boost::optional current_rate () const override; + Frame frames_done () const override; + bool finishing () const override { return false; } @@ -59,31 +60,39 @@ private: int video_frame_rate, int audio_frame_rate, int channels, - boost::shared_ptr log, ExportFormat, + bool audio_stream_per_channel, int x264_crf, bool three_d, boost::filesystem::path output, std::string extension ); - boost::shared_ptr get (Eyes eyes) const; + std::shared_ptr get (Eyes eyes) const; void flush (); - void audio (boost::shared_ptr); + void audio (std::shared_ptr); private: - std::map > _encoders; + std::map> _encoders; }; - std::list _file_encoders; + AudioMapping stereo_map() const; + AudioMapping many_channel_map() const; + 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; + + Butler _butler; }; #endif