DivXNetworks, Inc.
Main Page | Namespace List | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals | Related Pages

EncoderInterface Class Reference

#include <EncoderInterface.h>


Detailed Description

The external encoder API.
Todo:
Example usage


Public Member Functions

virtual SettingsgetSettingsApi ()=0
virtual void setFeedback (FeedbackInterface *pFeedbackInterface)=0
virtual void setEncoderCallback (EncoderCallback *pCallback)=0
virtual const char * getVersionInfo () const =0
virtual void setFormatInput (const FormatInfo *pFormatInfo)=0
virtual bool getFormatInput (FormatInfo *pFormatInfo) const =0
virtual bool getFormatOutput (FormatInfo *pFormatInfo) const =0
virtual void deliverFrame (const FrameInput *pFrameInput)=0
virtual bool encodeFrame (FrameOutput *pFrameOutput, FrameResult *pFrameResult=0)=0
virtual bool encode (FrameOutput *pFrameOutput, FrameResult *pFrameResult=0)=0

Static Public Member Functions

static EncoderInterfacecreate ()
static void destroy (EncoderInterface *pIQEncoderInterface)

Protected Member Functions

virtual ~EncoderInterface ()


Constructor & Destructor Documentation

virtual EncoderInterface::~EncoderInterface  )  [inline, protected, virtual]
 


Member Function Documentation

static EncoderInterface* EncoderInterface::create  )  [static]
 

Method for creation of an encoder. IQEncoderInterface::destroy() must later be called in order to free memory.

Returns:
Pointer to newly created encoder instance or null on failure.

virtual void EncoderInterface::deliverFrame const FrameInput pFrameInput  )  [pure virtual]
 

Delivers an uncompressed frame to the encoder. Input frame must be maintained valid until either encodeFrame() or encode() has been called. Call with pFrameInput->m_pFrameT=0 to indicate end-of-stream.

Parameters:
pFrameInput The input frame.

static void EncoderInterface::destroy EncoderInterface pIQEncoderInterface  )  [static]
 

Method for destruction of an encoder.

Parameters:
pIQEncoderInterface Pointer to encoder instance to be destoyed.

virtual bool EncoderInterface::encode FrameOutput pFrameOutput,
FrameResult pFrameResult = 0
[pure virtual]
 

Encodes a single chunk of packed bitstream, containing zero, one or two compressed frames. This function must be called repeatedly - on each call it encodes one frame. Only when it returns true is the chunk ready for output.

Parameters:
pFrameOutput Pointer to structure where the encoder should write the compressed output chunk.
pFrameResult Optional pointer a results structure that will be populated by the encoder.
Returns:
True if the encoder has finished encoding the output chunk. False if it has more work to do.

virtual bool EncoderInterface::encodeFrame FrameOutput pFrameOutput,
FrameResult pFrameResult = 0
[pure virtual]
 

Produces a single compressed frame in bitstream order. Caller must handle bitstream processing and packing.

Parameters:
pFrameOutput Pointer to structure where the encoder should write the compressed output frame.
pFrameResult Optional pointer to results structure that will be populated by the encoder.
Returns:
True if the encoder encoded a frame. A false return value most likely means that the encoder is waiting for an input frame to be delivered.

virtual bool EncoderInterface::getFormatInput FormatInfo pFormatInfo  )  const [pure virtual]
 

Gets information about the input format. This should be exactly the same as was previously set using setFormatInput().

Parameters:
pFormatInfo Pointer to a structure that will receive the input format.
Returns:
True on success. False indicates a bad input format.

virtual bool EncoderInterface::getFormatOutput FormatInfo pFormatInfo  )  const [pure virtual]
 

Gets information about output format

Parameters:
pFormatInfo Pointer to a structure that will receive the output format.
Returns:
True on success. False indicates a bad input format and/or bad settings (e.g. illegal resize dimensions).

virtual Settings* EncoderInterface::getSettingsApi  )  [pure virtual]
 

Used to access the encoder's settings API.

Returns:
Pointer to Settings interface.

virtual const char* EncoderInterface::getVersionInfo  )  const [pure virtual]
 

Returns version information about this build of the codec.

Returns:
Textual build information, for example "06_00_00_00000_DIVX_CODEC".

virtual void EncoderInterface::setEncoderCallback EncoderCallback pCallback  )  [pure virtual]
 

virtual void EncoderInterface::setFeedback FeedbackInterface pFeedbackInterface  )  [pure virtual]
 

This function provides the encoder with a pointer to the object that will receive encoding feedback information.

Parameters:
pFeedbackInterface Feedback object pointer.

virtual void EncoderInterface::setFormatInput const FormatInfo pFormatInfo  )  [pure virtual]
 

Tells encoder about colorspace and dimensions of video image. Cannot be called after delivering the first video frame for encoding.

Parameters:
pFormatInfo Pointer to a structure descrbing the input format.


The documentation for this class was generated from the following file:
Generated on Tue Jan 24 16:43:33 2006 for DivX Codec API Documentation.