]> git.sesse.net Git - nageru/blobdiff - ffmpeg_capture.h
Factor out rewinding code in its own member function.
[nageru] / ffmpeg_capture.h
index 24e6b5b40d3f9b780e71facdb7fb0dc347e5723c..095078267c1987d67e7e843ded7e90cb57641136 100644 (file)
@@ -141,6 +141,7 @@ public:
 private:
        void producer_thread_func();
        bool play_video(const std::string &pathname);
+       void internal_rewind();
 
        std::string description, filename;
        uint16_t timecode = 0;
@@ -161,6 +162,9 @@ private:
        QuittableSleeper producer_thread_should_quit;
        std::thread producer_thread;
 
+       int64_t pts_origin, last_pts;
+       std::chrono::steady_clock::time_point start, next_frame_start;
+
        std::mutex queue_mu;
        struct QueuedCommand {
                enum Command { REWIND, CHANGE_RATE } command;