Low-level class for using ffmpeg to decode movie files. More...
#include <Media/FfmpegEncoder.H>
Public Member Functions | |
FfmpegEncoder (const std::string &fname, const std::string &codecname, const int bitrate, const int framerate, const int frameratebase, const Dims &dims, const int bufsz, const bool useFormatContext=false) | |
virtual int | close () |
Close any underlying streams; return 0 if OK, non-zero if error. | |
void | writeRawFrame (const AVFrame *picture) |
void | writeRGB (const Image< PixRGB< byte > > &img) |
void | writeVideoFrame (const VideoFrame &frame) |
virtual void | writeFrame (const GenericFrame &f) |
Write a frame to the low-level stream. |
Low-level class for using ffmpeg to decode movie files.
You probably want to use MpegOutputStream instead, which relies on FfmpegEncoder internally for its implementation but offers a richer, higher-level interface.
Definition at line 71 of file FfmpegEncoder.H.
int FfmpegEncoder::close | ( | ) | [virtual] |
Close any underlying streams; return 0 if OK, non-zero if error.
Implements LowLevelEncoder.
Definition at line 258 of file FfmpegEncoder.C.
References Range< T >::max(), Range< T >::merge(), and Range< T >::min().
void FfmpegEncoder::writeFrame | ( | const GenericFrame & | f | ) | [virtual] |
Write a frame to the low-level stream.
Implements LowLevelEncoder.
Definition at line 554 of file FfmpegEncoder.C.
References GenericFrame::asVideo(), and GenericFrame::nativeType().