Fix nonfunctional send-problem-report.
[dcpomatic.git] / src / lib / encoder.h
index caadda591d20a606e97c0d9388c0a8abe533539f..3d0597cfad5b533508e1dc28f907f0ff4a093e90 100644 (file)
@@ -59,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 ();
@@ -72,6 +72,7 @@ public:
 
 private:
 
+       void enqueue (boost::shared_ptr<PlayerVideo> f);
        void frame_done ();
 
        void encoder_thread (boost::optional<ServerDescription>);
@@ -90,13 +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;
 
        /* XXX: probably should be atomic */
-       bool _terminate;
+       bool _terminate_enqueue;
+       bool _terminate_encoding;
        /** Mutex for _threads */
        mutable boost::mutex _threads_mutex;
        std::list<boost::thread *> _threads;