- void video (boost::shared_ptr<PlayerVideo>, DCPTime);
- void audio (boost::shared_ptr<AudioBuffers>);
- void subtitle (PlayerText, DCPTimePeriod);
-
- void setup_video ();
- void setup_audio ();
-
- void audio_frame (int size);
-
- static void buffer_free(void* opaque, uint8_t* data);
- void buffer_free2(uint8_t* data);
-
- AVCodec* _video_codec;
- AVCodecContext* _video_codec_context;
- AVCodec* _audio_codec;
- AVCodecContext* _audio_codec_context;
- AVFormatContext* _format_context;
- AVStream* _video_stream;
- AVStream* _audio_stream;
- AVPixelFormat _pixel_format;
- AVSampleFormat _sample_format;
- AVDictionary* _video_options;
- std::string _video_codec_name;
- std::string _audio_codec_name;
+
+ 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<FFmpegFileEncoder> get (Eyes eyes) const;
+ void flush ();
+ void audio (std::shared_ptr<AudioBuffers>);
+
+ private:
+ std::map<Eyes, std::shared_ptr<FFmpegFileEncoder> > _encoders;
+ };
+