17 #ifndef GAZEBO_COMMON_VIDEOENCODER_HH_
18 #define GAZEBO_COMMON_VIDEOENCODER_HH_
27 #define VIDEO_ENCODER_BITRATE_DEFAULT 0
28 #define VIDEO_ENCODER_WIDTH_DEFAULT 1280
29 #define VIDEO_ENCODER_HEIGHT_DEFAULT 720
30 #define VIDEO_ENCODER_FPS_DEFAULT 25
31 #define VIDEO_ENCODER_FORMAT_DEFAULT "mp4"
38 class VideoEncoderPrivate;
73 const std::string &_filename =
"",
86 public:
bool IsEncoding()
const;
93 public:
bool AddFrame(
const unsigned char *_frame,
94 const unsigned int _width,
95 const unsigned int _height);
103 public:
bool AddFrame(
const unsigned char *_frame,
104 const unsigned int _width,
105 const unsigned int _height,
106 const std::chrono::steady_clock::time_point &_timestamp);
111 public:
bool SaveToFile(
const std::string &_filename);
115 public: std::string Format()
const;
119 public:
unsigned int BitRate()
const;
123 public:
void Reset();
127 private: std::unique_ptr<VideoEncoderPrivate> dataPtr;
The VideoEncoder class supports encoding a series of images to a video format, and then writing the v...
Definition: VideoEncoder.hh:46
#define VIDEO_ENCODER_FPS_DEFAULT
Definition: VideoEncoder.hh:30
#define VIDEO_ENCODER_BITRATE_DEFAULT
Definition: VideoEncoder.hh:27
#define VIDEO_ENCODER_HEIGHT_DEFAULT
Definition: VideoEncoder.hh:29
#define VIDEO_ENCODER_WIDTH_DEFAULT
Definition: VideoEncoder.hh:28
#define VIDEO_ENCODER_FORMAT_DEFAULT
Definition: VideoEncoder.hh:31