17 #ifndef IGNITION_COMMON_VIDEOENCODER_HH_ 18 #define IGNITION_COMMON_VIDEOENCODER_HH_ 26 #include <ignition/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();
#define VIDEO_ENCODER_FPS_DEFAULT
Definition: VideoEncoder.hh:35
#define IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
Definition: SuppressWarning.hh:67
#define VIDEO_ENCODER_BITRATE_DEFAULT
Definition: VideoEncoder.hh:32
Set of flags defined by a C++11 enum class.
Definition: FlagSet.hh:59
#define VIDEO_ENCODER_HEIGHT_DEFAULT
Definition: VideoEncoder.hh:34
The VideoEncoder class supports encoding a series of images to a video format, and then writing the v...
Definition: VideoEncoder.hh:47
#define VIDEO_ENCODER_WIDTH_DEFAULT
Definition: VideoEncoder.hh:33
Forward declarations for the common classes.
#define VIDEO_ENCODER_FORMAT_DEFAULT
Definition: VideoEncoder.hh:36
#define IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
Microsoft Visual Studio does not automatically export the interface information for member variables ...
Definition: SuppressWarning.hh:64