33 bool open(
const std::string& inputFile)
noexcept;
34 bool load(
const std::string& inputFile)
noexcept;
36 const std::string& file()
const noexcept {
return m_inputFile; }
38 int64_t duration()
const noexcept;
40 void seek(int64_t flicks);
42 AVFrame* dequeue_frame()
noexcept override;
43 void release_frame(AVFrame*)
noexcept override;
46 void buffer_thread()
noexcept;
47 void close_file()
noexcept;
48 bool seek_impl(int64_t dts)
noexcept;
49 AVFrame* read_frame_impl()
noexcept;
50 bool open_stream()
noexcept;
51 void close_video()
noexcept;
53 static const constexpr int frames_to_buffer = 16;
55 std::string m_inputFile;
59 std::condition_variable m_condVar;
63 std::atomic_int64_t m_seekTo = -1;
64 std::atomic_int64_t m_last_dequeued_dts = 0;
65 std::atomic_int64_t m_dequeued = 0;
67 std::atomic_bool m_running{};