Go to the documentation of this file.
17 #ifndef GZ_COMMON_VIDEOENCODER_HH_
18 #define GZ_COMMON_VIDEOENCODER_HH_
25 #include <gz/common/config.hh>
27 #include <gz/common/av/Export.hh>
33 #define VIDEO_ENCODER_BITRATE_DEFAULT 0
34 #define VIDEO_ENCODER_WIDTH_DEFAULT 1280
35 #define VIDEO_ENCODER_HEIGHT_DEFAULT 720
36 #define VIDEO_ENCODER_FPS_DEFAULT 25
37 #define VIDEO_ENCODER_FORMAT_DEFAULT "mp4"
44 class VideoEncoderPrivate;
134 const unsigned int _width,
135 const unsigned int _height,
136 const unsigned int _fps,
137 const unsigned int _bitRate,
138 const bool _allowHwAccel);
172 unsigned int _height,
174 unsigned int _bitRate,
177 std::optional<bool> _useHwSurface = {});
186 public:
bool IsEncoding()
const;
193 public:
bool AddFrame(
const unsigned char *_frame,
194 const unsigned int _width,
195 const unsigned int _height);
203 public:
bool AddFrame(
const unsigned char *_frame,
204 const unsigned int _width,
205 const unsigned int _height,
206 const std::chrono::steady_clock::time_point &_timestamp);
211 public:
bool SaveToFile(
const std::string &_filename);
219 public:
unsigned int BitRate()
const;
223 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:37
#define VIDEO_ENCODER_HEIGHT_DEFAULT
Definition: gz/common/VideoEncoder.hh:35
#define VIDEO_ENCODER_WIDTH_DEFAULT
Definition: gz/common/VideoEncoder.hh:34
#define VIDEO_ENCODER_BITRATE_DEFAULT
Definition: gz/common/VideoEncoder.hh:33
#define VIDEO_ENCODER_FPS_DEFAULT
Definition: gz/common/VideoEncoder.hh:36
The VideoEncoder class supports encoding a series of images to a video format, and then writing the v...
Definition: gz/common/VideoEncoder.hh:48
#define IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
Definition: gz/common/SuppressWarning.hh:68