Basic Image AlgorithmS Library
2.8.0
|
VideoSink for writing FFMPEG Videos from images. More...
#include <VideoSink/VideoSink.hh>
Public Member Functions | |
void | AddImage (std::string Image) |
Append an image to the end of the list. More... | |
void | AddImages (std::vector< std::string > Images) |
bool | Encode () |
Encode the video. More... | |
std::string | GetErrMsg () |
Return the last produced errormessage. More... | |
void | SetBitrate (int Bitrate) |
Set the bitrate of the output video. More... | |
void | SetBPP (double BPP) |
Set the bits per pixel of the output video. More... | |
void | SetFPS (float FPS) |
Set the framerate for the video. More... | |
void | SetOutputVideo (std::string Video) |
Set the file where the video will be written to. More... | |
VideoSink () | |
VideoSink (std::string Video) | |
VideoSink (std::vector< std::string > Images) | |
VideoSink (std::vector< std::string > Images, std::string Video) | |
~VideoSink () | |
Protected Member Functions | |
bool | _SetupVideoSource () |
Static Protected Member Functions | |
static void | _RGB888pToYUV420p (uint8_t *rgb, uint8_t *yuv, int width, int height) |
Convert RGB888p data to Y'UV420p. More... | |
Protected Attributes | |
int | _Bitrate |
int | _BPP |
AVCodec * | _Codec |
AVCodecContext * | _CodecCtx |
std::string | _ErrMsg |
float | _FPS |
std::vector< std::string > | _ImgFiles |
bool | _IsYUV |
std::string | _Video |
VideoSource_Disk | _VSD |
VideoSink for writing FFMPEG Videos from images.
Definition at line 68 of file VideoSink.hh.
BIAS::VideoSink::VideoSink | ( | ) |
Definition at line 31 of file VideoSink.cpp.
Referenced by VideoSink().
BIAS::VideoSink::VideoSink | ( | std::string | Video | ) |
Definition at line 42 of file VideoSink.cpp.
References VideoSink().
BIAS::VideoSink::VideoSink | ( | std::vector< std::string > | Images | ) |
Definition at line 47 of file VideoSink.cpp.
References VideoSink().
BIAS::VideoSink::VideoSink | ( | std::vector< std::string > | Images, |
std::string | Video | ||
) |
Definition at line 52 of file VideoSink.cpp.
References VideoSink().
BIAS::VideoSink::~VideoSink | ( | ) |
Definition at line 57 of file VideoSink.cpp.
|
staticprotected |
Convert RGB888p data to Y'UV420p.
rgb | Pointer to RGB data. |
yuv | Pointer to YUV data, must point to an allocated memory with a minimum size of (width*height * 3) / 2. |
Definition at line 110 of file VideoSink.cpp.
|
protected |
Definition at line 314 of file VideoSink.cpp.
References BIAS::ImageBase::CM_RGB, and BIAS::ImageBase::CM_YUV420P.
void BIAS::VideoSink::AddImage | ( | std::string | Image | ) |
Append an image to the end of the list.
Definition at line 61 of file VideoSink.cpp.
void BIAS::VideoSink::AddImages | ( | std::vector< std::string > | Images | ) |
Definition at line 65 of file VideoSink.cpp.
bool BIAS::VideoSink::Encode | ( | ) |
Encode the video.
Definition at line 163 of file VideoSink.cpp.
References BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), and BIAS::ImageConvert::ToPlanar().
std::string BIAS::VideoSink::GetErrMsg | ( | ) |
Return the last produced errormessage.
Use the return value of the methods to test for errors though since this message is not reset on success.
Definition at line 308 of file VideoSink.cpp.
void BIAS::VideoSink::SetBitrate | ( | int | Bitrate | ) |
Set the bitrate of the output video.
This overrides a value set by SetBPP.
Definition at line 79 of file VideoSink.cpp.
void BIAS::VideoSink::SetBPP | ( | double | BPP | ) |
Set the bits per pixel of the output video.
The initial value is 4. This overrides a value set by SetBitrate.
Definition at line 84 of file VideoSink.cpp.
void BIAS::VideoSink::SetFPS | ( | float | FPS | ) |
Set the framerate for the video.
Note that the encoder only works with some values (e.g. 25, 50).
Definition at line 74 of file VideoSink.cpp.
void BIAS::VideoSink::SetOutputVideo | ( | std::string | Video | ) |
Set the file where the video will be written to.
This or the according constructor must be called befor encoding.
Definition at line 70 of file VideoSink.cpp.
|
protected |
Definition at line 134 of file VideoSink.hh.
|
protected |
Definition at line 135 of file VideoSink.hh.
|
protected |
Definition at line 139 of file VideoSink.hh.
|
protected |
Definition at line 140 of file VideoSink.hh.
|
protected |
Definition at line 143 of file VideoSink.hh.
|
protected |
Definition at line 133 of file VideoSink.hh.
|
protected |
Definition at line 131 of file VideoSink.hh.
|
protected |
Definition at line 137 of file VideoSink.hh.
|
protected |
Definition at line 132 of file VideoSink.hh.
|
protected |
Definition at line 136 of file VideoSink.hh.