Tidy up test film naming.
[dcpomatic.git] / src / lib / encoder.h
index 539b2912ce9580c36b6aad8766dbf5e92ee9b871..561e419017b1e75488edf9cf0f55bdb85114bc7a 100644 (file)
 #include <boost/thread/mutex.hpp>
 #include <list>
 #include <stdint.h>
+extern "C" {
+#include <libavutil/samplefmt.h>
+}
 
 class FilmState;
 class Options;
 class Image;
 class Log;
+class Subtitle;
+class AudioBuffers;
 
 /** @class Encoder
  *  @brief Parent class for classes which can encode video and audio frames.
@@ -50,19 +55,20 @@ public:
        Encoder (boost::shared_ptr<const FilmState> s, boost::shared_ptr<const Options> o, Log* l);
 
        /** Called to indicate that a processing run is about to begin */
-       virtual void process_begin () = 0;
+       virtual void process_begin (int64_t audio_channel_layout) = 0;
 
        /** Called with a frame of video.
         *  @param i Video frame image.
         *  @param f Frame number within the film.
+        *  @param s A subtitle that should be on this frame, or 0.
         */
-       virtual void process_video (boost::shared_ptr<Image> i, int f) = 0;
+       virtual void process_video (boost::shared_ptr<Image> i, int f, boost::shared_ptr<Subtitle> s) = 0;
 
        /** Called with some audio data.
-        *  @param d Data.
-        *  @param s Size of data (in bytes)
+        *  @param d Array of pointers to floating point sample data for each channel.
+        *  @param s Number of frames (ie number of samples in each channel)
         */
-       virtual void process_audio (uint8_t* d, int s) = 0;
+       virtual void process_audio (boost::shared_ptr<const AudioBuffers>) = 0;
 
        /** Called when a processing run has finished */
        virtual void process_end () = 0;