Split Options into encode / decode.
[dcpomatic.git] / src / lib / j2k_wav_encoder.h
index 6733221deca3b47a9f785ccc312ba3f5cab6f194..064f4221ed648ff98ba4189f75075916ca1d88d0 100644 (file)
@@ -47,17 +47,18 @@ class AudioBuffers;
 class J2KWAVEncoder : public Encoder
 {
 public:
-       J2KWAVEncoder (boost::shared_ptr<const FilmState>, boost::shared_ptr<const Options>, Log *);
+       J2KWAVEncoder (boost::shared_ptr<const Film>, boost::shared_ptr<const EncodeOptions>);
        ~J2KWAVEncoder ();
 
-       void process_begin (int64_t audio_channel_layout);
-       void process_video (boost::shared_ptr<Image>, int, boost::shared_ptr<Subtitle>);
-       void process_audio (boost::shared_ptr<const AudioBuffers>);
+       void process_begin ();
        void process_end ();
 
 private:
 
-       void write_audio (boost::shared_ptr<const AudioBuffers> audio) const;
+       void do_process_video (boost::shared_ptr<Image>, boost::shared_ptr<Subtitle>);
+       void do_process_audio (boost::shared_ptr<AudioBuffers>);
+       
+       void write_audio (boost::shared_ptr<const AudioBuffers> audio);
        void encoder_thread (ServerDescription *);
        void close_sound_files ();
        void terminate_worker_threads ();
@@ -67,6 +68,7 @@ private:
 #endif 
 
        std::vector<SNDFILE*> _sound_files;
+       int64_t _audio_frames_written;
 
        bool _process_end;
        std::list<boost::shared_ptr<DCPVideoFrame> > _queue;