Go to the documentation of this file.
17 #ifndef GZ_COMMON_VIDEOENCODER_HH_
18 #define GZ_COMMON_VIDEOENCODER_HH_
26 #include <gz/common/av/Export.hh>
32 #define VIDEO_ENCODER_BITRATE_DEFAULT 0
33 #define VIDEO_ENCODER_WIDTH_DEFAULT 1280
34 #define VIDEO_ENCODER_HEIGHT_DEFAULT 720
35 #define VIDEO_ENCODER_FPS_DEFAULT 25
36 #define VIDEO_ENCODER_FORMAT_DEFAULT "mp4"
43 class VideoEncoderPrivate;
133 const unsigned int _width,
134 const unsigned int _height,
135 const unsigned int _fps,
136 const unsigned int _bitRate,
137 const bool _allowHwAccel);
171 unsigned int _height,
173 unsigned int _bitRate,
176 std::optional<bool> _useHwSurface = {});
185 public:
bool IsEncoding()
const;
192 public:
bool AddFrame(
const unsigned char *_frame,
193 const unsigned int _width,
194 const unsigned int _height);
202 public:
bool AddFrame(
const unsigned char *_frame,
203 const unsigned int _width,
204 const unsigned int _height,
205 const std::chrono::steady_clock::time_point &_timestamp);
210 public:
bool SaveToFile(
const std::string &_filename);
218 public:
unsigned int BitRate()
const;
222 public:
void Reset();
Forward declarations for the common classes.
Set of flags defined by a C++11 enum class.
Definition: gz/common/FlagSet.hh:61
#define IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
Microsoft Visual Studio does not automatically export the interface information for member variables ...
Definition: gz/common/SuppressWarning.hh:65
#define VIDEO_ENCODER_FORMAT_DEFAULT
Definition: gz/common/VideoEncoder.hh:36
#define VIDEO_ENCODER_HEIGHT_DEFAULT
Definition: gz/common/VideoEncoder.hh:34
#define VIDEO_ENCODER_WIDTH_DEFAULT
Definition: gz/common/VideoEncoder.hh:33
#define VIDEO_ENCODER_BITRATE_DEFAULT
Definition: gz/common/VideoEncoder.hh:32
#define VIDEO_ENCODER_FPS_DEFAULT
Definition: gz/common/VideoEncoder.hh:35
The VideoEncoder class supports encoding a series of images to a video format, and then writing the v...
Definition: gz/common/VideoEncoder.hh:47
#define IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
Definition: gz/common/SuppressWarning.hh:68