42 const std::string& inputDevice,
const std::string& format,
int w,
int h,
43 double fps,
int codec,
int pixelfmt)
noexcept;
45 bool start()
noexcept override;
46 void stop()
noexcept override;
48 AVFrame* dequeue_frame()
noexcept override;
49 void release_frame(AVFrame* frame)
noexcept override;
52 void buffer_thread()
noexcept;
53 void close_file()
noexcept;
54 AVFrame* read_frame_impl()
noexcept;
55 bool open_stream()
noexcept;
56 void close_stream()
noexcept;
57 ReadFrame read_one_frame(AVFramePointer frame, AVPacket& packet);
59 static const constexpr int frames_to_buffer = 1;
61 AVCodecID m_requestedCodec{AV_CODEC_ID_NONE};
62 AVPixelFormat m_requestedPixfmt{AV_PIX_FMT_NONE};
66 std::string m_inputKind;
67 std::string m_inputDevice;
69 std::atomic_bool m_running{};