27#ifndef EASY3D_VIDEO_ENCODER_H
28#define EASY3D_VIDEO_ENCODER_H
34 class VideoEncoderImpl;
77 bool start(
const std::string& file_name,
int framerate,
int bitrate);
90 bool encode(
const unsigned char* data,
int width,
int height,
PixelFormat pixel_format);
99 static bool is_size_acceptable(
int width,
int height) {
return (width % 8) == 0 && (height % 8) == 0; }
102 internal::VideoEncoderImpl* encoder_;
A class that encodes video frames (e.g., images) into a video file.
Definition: video_encoder.h:58
bool encode(const unsigned char *data, int width, int height, PixelFormat pixel_format)
Definition: video_encoder.cpp:450
PixelFormat
The supported pixel format/storage of the video frames.
Definition: video_encoder.h:66
@ PIX_FMT_BGR_888
packed RGB 8:8:8, 24bpp, RGBRGB...
Definition: video_encoder.h:68
@ PIX_FMT_RGBA_8888
packed BGR 8:8:8, 24bpp, BGRBGR...
Definition: video_encoder.h:69
@ PIX_FMT_BGRA_8888
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
Definition: video_encoder.h:70
bool start(const std::string &file_name, int framerate, int bitrate)
Definition: video_encoder.cpp:441
~VideoEncoder()
Destructor.
Definition: video_encoder.cpp:433
static bool is_size_acceptable(int width, int height)
Returns whether the image size (width, height) is acceptable.
Definition: video_encoder.h:99
bool end()
Definition: video_encoder.cpp:492
VideoEncoder()
Constructor.
Definition: video_encoder.cpp:418
Definition: collider.cpp:182