Fix nonfunctional send-problem-report.
[dcpomatic.git] / src / lib / encoder.h
index b255a617ff65d365a11bd031b884b44f385e4686..3d0597cfad5b533508e1dc28f907f0ff4a093e90 100644 (file)
@@ -33,7 +33,6 @@
 #include <boost/thread.hpp>
 #include <boost/optional.hpp>
 #include <boost/signals2.hpp>
-#include <boost/atomic.hpp>
 #include <list>
 #include <stdint.h>
 
@@ -60,10 +59,10 @@ public:
        /** Called to indicate that a processing run is about to begin */
        void begin ();
 
-       /** Call with a frame of video.
-        *  @param f Video frame.
+       /** Called to pass in zero or more bits of video to be encoded
+        *  as the next DCP frame.
         */
-       void enqueue (boost::shared_ptr<PlayerVideo> f);
+       void encode (std::list<boost::shared_ptr<PlayerVideo> > f);
 
        /** Called when a processing run has finished */
        void end ();
@@ -73,6 +72,7 @@ public:
 
 private:
 
+       void enqueue (boost::shared_ptr<PlayerVideo> f);
        void frame_done ();
 
        void encoder_thread (boost::optional<ServerDescription>);
@@ -91,12 +91,12 @@ private:
        std::list<struct timeval> _time_history;
        /** Number of frames that we should keep history for */
        static int const _history_size;
-       /** Number of video frames enqueued so far */
-       int _video_frames_enqueued;
-       bool _left_done;
-       bool _right_done;
+       /** Current DCP frame index */
+       Frame _position;
 
-       boost::atomic<bool> _terminate;
+       /* XXX: probably should be atomic */
+       bool _terminate_enqueue;
+       bool _terminate_encoding;
        /** Mutex for _threads */
        mutable boost::mutex _threads_mutex;
        std::list<boost::thread *> _threads;