Drag[en]gine Game Engine  1.0
deBaseVideoDecoder Class Referenceabstract

Base video image decoder. More...

#include <deBaseVideoDecoder.h>

Public Member Functions

Constructors and Destructors
 deBaseVideoDecoder (decBaseFileReader *file)
 Create video image decoder. More...
 
virtual ~deBaseVideoDecoder ()
 Clean up video image decoder. More...
 
Management
decBaseFileReaderGetFile () const
 File. More...
 
virtual int GetWidth () const =0
 Width in pixels. More...
 
virtual int GetHeight () const =0
 Height in pixels. More...
 
virtual int GetPixelFormat () const =0
 Pixel format. More...
 
virtual int GetFrameCount () const =0
 Number of frames. More...
 
virtual int GetFrameRate () const =0
 Frame rate. More...
 
virtual const decColorMatrix3GetColorConversionMatrix () const =0
 Color conversion matrix. More...
 
virtual bool DecodeFrame (int frame, void *buffer1, int size1, void *buffer2, int size2)=0
 Decode frame into buffer. More...
 

Detailed Description

Base video image decoder.

Decodes image data from a video file through a file reader. The decoding can be done over time. The file reader is held open as long as the decoder exists. The image informations are provided using virtual functions. Although possible to do different the same values have to be returned during the entire lifetime of the decoder since modules expect this values to be unchangable. The position is measured in frames from the beginning of the file and behaves like a file pointer.

Constructor & Destructor Documentation

◆ deBaseVideoDecoder()

deBaseVideoDecoder::deBaseVideoDecoder ( decBaseFileReader file)

Create video image decoder.

◆ ~deBaseVideoDecoder()

virtual deBaseVideoDecoder::~deBaseVideoDecoder ( )
virtual

Clean up video image decoder.

Member Function Documentation

◆ DecodeFrame()

virtual bool deBaseVideoDecoder::DecodeFrame ( int  frame,
void *  buffer1,
int  size1,
void *  buffer2,
int  size2 
)
pure virtual

Decode frame into buffer.

Depending on the pixel format one or two buffers are provided. buffer1 is always used and is of size width/height. buffer2 is only provided if one of the reduced pixel formats is used. In this case buffer1 contains 1 color plane and buffer2 2 color planes with half or quarter size. Otherwise buffer1 contains all three color planes. In all cases the color planes are interleaved.

Return values
trueFrame has been decoded and written to the buffers.
FalseDecoding failed or the requested frame can not be decoded in reasonable time (skipping). An error is signaled using the engine error signaling then false is returned.

Referenced by GetFile().

◆ GetColorConversionMatrix()

virtual const decColorMatrix3& deBaseVideoDecoder::GetColorConversionMatrix ( ) const
pure virtual

Color conversion matrix.

Referenced by GetFile().

◆ GetFile()

decBaseFileReader* deBaseVideoDecoder::GetFile ( ) const
inline

◆ GetFrameCount()

virtual int deBaseVideoDecoder::GetFrameCount ( ) const
pure virtual

Number of frames.

Referenced by GetFile().

◆ GetFrameRate()

virtual int deBaseVideoDecoder::GetFrameRate ( ) const
pure virtual

Frame rate.

Referenced by GetFile().

◆ GetHeight()

virtual int deBaseVideoDecoder::GetHeight ( ) const
pure virtual

Height in pixels.

Referenced by GetFile().

◆ GetPixelFormat()

virtual int deBaseVideoDecoder::GetPixelFormat ( ) const
pure virtual

Pixel format.

Referenced by GetFile().

◆ GetWidth()

virtual int deBaseVideoDecoder::GetWidth ( ) const
pure virtual

Width in pixels.

Referenced by GetFile().


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