1 #ifndef LIBCVD_VIDEOWRITER_H 2 #define LIBCVD_VIDEOWRITER_H 6 #include "videoffmpeg.h" 8 #include <libavutil/rational.h> 28 const std::string& codec_name,
29 const std::string& pixel_format_name,
31 AVRational frame_rate,
35 std::int64_t duration = -1);
38 std::int64_t seconds_to_timebase(
double seconds)
const 40 return static_cast<std::int64_t
>(std::round((seconds * m_timebase.den) / m_timebase.num));
45 std::string m_filename;
46 AVRational m_timebase;
48 const AVCodec* m_codec;
50 std::unique_ptr<AVFormatContext, internal::AVFormatContextCloser> m_format_context;
51 std::unique_ptr<AVCodecContext, internal::AVCodecContextCloser> m_codec_context;
52 std::unique_ptr<internal::Scaler> m_scaler;
All classes and functions are within the CVD namespace.
Definition: argb.h:6
A colour consisting of red, green, blue and alpha components.
Definition: rgba.h:17
Definition: videowriter.h:24
A generic image class to manage a block of arbitrarily padded data as an image.
Definition: image.h:273