AvTranscoder  0.9.4
C++APIforLibav/FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
avtranscoder::VideoGenerator Class Reference

#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...
 
- Public Member Functions inherited from avtranscoder::IDecoder
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)
 
VideoGeneratoroperator= (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...
 

Detailed Description

Definition at line 10 of file VideoGenerator.hpp.

Constructor & Destructor Documentation

avtranscoder::VideoGenerator::VideoGenerator ( const VideoGenerator videoGenerator)
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.

Member Function Documentation

bool avtranscoder::VideoGenerator::decodeNextFrame ( Frame frameBuffer)
virtual

Decode next frame.

Parameters
frameBufferthe 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.
Returns
status of decoding

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.

bool avtranscoder::VideoGenerator::decodeNextFrame ( Frame frameBuffer,
const size_t  channelIndex 
)
virtual

Decode substream of next frame.

Parameters
frameBufferthe frame decoded
channelIndexindex of channel to extract
Returns
status of decoding

Implements avtranscoder::IDecoder.

Definition at line 75 of file VideoGenerator.cpp.

VideoGenerator& avtranscoder::VideoGenerator::operator= ( const VideoGenerator videoGenerator)
private
void avtranscoder::VideoGenerator::setNextFrame ( Frame inputFrame)
inlinevirtual

Set the next frame of the input stream (which bypass the work of decoding)

Note
Not yet implemented for VideoDecoder and AudioDecoder
Parameters
inputFramethe new next frame

Reimplemented from avtranscoder::IDecoder.

Definition at line 24 of file VideoGenerator.hpp.

Field Documentation

VideoFrame* avtranscoder::VideoGenerator::_blackImage
private

The generated black image (has ownership)

Definition at line 28 of file VideoGenerator.hpp.

Referenced by decodeNextFrame(), and ~VideoGenerator().

const VideoFrameDesc avtranscoder::VideoGenerator::_frameDesc
private

The description of the black image (width, height...)

Definition at line 29 of file VideoGenerator.hpp.

Referenced by decodeNextFrame().

Frame* avtranscoder::VideoGenerator::_inputFrame
private

A frame given from outside (has link, no ownership)

Definition at line 27 of file VideoGenerator.hpp.

Referenced by decodeNextFrame().


The documentation for this class was generated from the following files: