QualityReductionAdaptor Class Reference

Implementation of Adaptor that reduces average bitrate of a MP4 VES. <short description="">. More...

#include <QualityReductionAdaptor.hpp>

Inheritance diagram for QualityReductionAdaptor:

VideoAdaptorChain AdaptorChain Adaptor List of all members.

Public Member Functions

 QualityReductionAdaptor (VideoESInfo *pESInfo, u32 uiTargetBitrate, u32 keyFrameInterval=30, MP4Decoder::meCoderType codec=MP4Decoder::FFMPEG)
 Constructor.
virtual ~QualityReductionAdaptor ()
 Destructor.
Adaptorclone ()
 Create a shallow copy of the Adaptor.
void initialize ()
 Initialize internal data structures.

Protected Attributes

u32 targetBitrate
u32 keyFrameInterval
MP4Decoder::meCoderType codec

Detailed Description

Implementation of Adaptor that reduces average bitrate of a MP4 VES. <short description="">.

Encoding scheme used is CBR, and might vary.

Author:
Bernhard Penz
Version:
Id
QualityReductionAdaptor.hpp,v 1.4 2004/05/27 17:56:53 pschojer Exp

Definition at line 65 of file QualityReductionAdaptor.hpp.


Constructor & Destructor Documentation

QualityReductionAdaptor::QualityReductionAdaptor VideoESInfo *  pESInfo,
u32  uiTargetBitrate,
u32  keyFrameInterval = 30,
MP4Decoder::meCoderType  codec = MP4Decoder::FFMPEG
 

Constructor.

Parameters:
pESInfo Pointer to ESInfo object.
uiTargetBitrate Desired target bitrate.
Definition at line 46 of file QualityReductionAdaptor.cpp.

References MP4Decoder::meCoderType.

Referenced by clone().

00049 { 00050 es = pESInfo; 00051 targetBitrate = uiTargetBitrate; 00052 keyFrameInterval = key; 00053 initialized = false; 00054 strcpy(name,"QualityReductionAdaptor"); 00055 codec=code; 00056 }

QualityReductionAdaptor::~QualityReductionAdaptor  )  [virtual]
 

Destructor.

Definition at line 69 of file QualityReductionAdaptor.cpp.

00070 { 00071 }


Member Function Documentation

Adaptor * QualityReductionAdaptor::clone  )  [virtual]
 

Create a shallow copy of the Adaptor.

Creates an Adaptor with the same setup (without copying the current status).

Returns:
An Adaptor object.

Reimplemented from VideoAdaptorChain.

Definition at line 73 of file QualityReductionAdaptor.cpp.

References QualityReductionAdaptor().

00074 { 00075 return new QualityReductionAdaptor(es, targetBitrate,keyFrameInterval,codec); 00076 }

void QualityReductionAdaptor::initialize  )  [virtual]
 

Initialize internal data structures.

Reimplemented from AdaptorChain.

Definition at line 59 of file QualityReductionAdaptor.cpp.

References AdaptorChain::addAdaptor().

00060 { 00061 if(initialized) 00062 return; 00063 dprintf_full("QualityReductionAdaptor::initialize() Codec %i\n",codec); 00064 addAdaptor(new MP4Decoder(es, false, UncompressedVideoFrame::ColorSpaceI420,codec)); 00065 addAdaptor(new MP4Encoder(es, targetBitrate, (int)es->getFPS(), keyFrameInterval, 0 /*BVOPs*/, UncompressedVideoFrame::ColorSpaceI420,codec)); 00066 initialized = true; 00067 };


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