AvTranscoder
0.9.4
C++APIforLibav/FFmpeg
|
#include <VideoGenerator.hpp>
Public Member Functions | |
VideoGenerator (const VideoFrameDesc &frameDesc) | |
~VideoGenerator () | |
bool | decodeNextFrame (Frame &frameBuffer) |
Decode next frame. More... | |
bool | decodeNextFrame (Frame &frameBuffer, const size_t channelIndex) |
Decode substream of next frame. More... | |
void | setNextFrame (Frame &inputFrame) |
Set the next frame of the input stream (which bypass the work of decoding) More... | |
![]() | |
virtual | ~IDecoder () |
virtual void | setupDecoder (const ProfileLoader::Profile &profile=ProfileLoader::Profile()) |
Setup the decoder. More... | |
virtual void | flushDecoder () |
Reset the internal decoder state / flush internal buffers. More... | |
Private Member Functions | |
VideoGenerator (const VideoGenerator &videoGenerator) | |
VideoGenerator & | operator= (const VideoGenerator &videoGenerator) |
Private Attributes | |
Frame * | _inputFrame |
A frame given from outside (has link, no ownership) More... | |
VideoFrame * | _blackImage |
The generated black image (has ownership) More... | |
const VideoFrameDesc | _frameDesc |
The description of the black image (width, height...) More... | |
Definition at line 10 of file VideoGenerator.hpp.
|
private |
avtranscoder::VideoGenerator::VideoGenerator | ( | const VideoFrameDesc & | frameDesc | ) |
Definition at line 11 of file VideoGenerator.cpp.
avtranscoder::VideoGenerator::~VideoGenerator | ( | ) |
Definition at line 18 of file VideoGenerator.cpp.
References _blackImage.
|
virtual |
Decode next frame.
frameBuffer | the frame decoded the frameBuffer reference belongs to the decoder and is valid only until the next call to this function or until closing or flushing the decoder. The caller may not write to it. |
Implements avtranscoder::IDecoder.
Definition at line 23 of file VideoGenerator.cpp.
References _blackImage, _frameDesc, avtranscoder::VideoFrameDesc::_height, _inputFrame, avtranscoder::VideoFrameDesc::_pixelFormat, avtranscoder::VideoFrameDesc::_width, avtranscoder::VideoFrame::assign(), avtranscoder::Frame::clear(), avtranscoder::VideoTransform::convert(), avtranscoder::Frame::copyData(), avtranscoder::getAVPixelFormat(), avtranscoder::Frame::isVideoFrame(), LOG_DEBUG, LOG_INFO, and LOG_WARN.
|
virtual |
Decode substream of next frame.
frameBuffer | the frame decoded |
channelIndex | index of channel to extract |
Implements avtranscoder::IDecoder.
Definition at line 75 of file VideoGenerator.cpp.
|
private |
|
inlinevirtual |
Set the next frame of the input stream (which bypass the work of decoding)
inputFrame | the new next frame |
Reimplemented from avtranscoder::IDecoder.
Definition at line 24 of file VideoGenerator.hpp.
|
private |
The generated black image (has ownership)
Definition at line 28 of file VideoGenerator.hpp.
Referenced by decodeNextFrame(), and ~VideoGenerator().
|
private |
The description of the black image (width, height...)
Definition at line 29 of file VideoGenerator.hpp.
Referenced by decodeNextFrame().
|
private |
A frame given from outside (has link, no ownership)
Definition at line 27 of file VideoGenerator.hpp.
Referenced by decodeNextFrame().