1 #ifndef LIBCVD_VIDEOREADER_H 2 #define LIBCVD_VIDEOREADER_H 7 #include "videoffmpeg.h" 9 #include <libavutil/rational.h> 27 VideoReader(
const std::string& filename,
int threads = 1);
31 double timebase_to_seconds(std::int64_t pts)
const;
33 AVRational timebase()
const;
37 AVRational frame_rate()
const;
39 std::int64_t duration()
const;
42 std::pair<Image<Rgba<std::uint8_t>>, std::int64_t> get_frame();
45 std::unique_ptr<AVFormatContext, internal::AVFormatContextCloser> m_format_context;
46 std::unique_ptr<AVCodecContext, internal::AVCodecContextCloser> m_codec_context;
47 std::unique_ptr<internal::Scaler> m_scaler;
48 std::unique_ptr<AVFrame, internal::AVFrameDeleter> m_raw_frame;
49 int m_stream_index = -1;
All classes and functions are within the CVD namespace.
Definition: argb.h:6
Definition: image_ref.h:29
Definition: videoreader.h:24