Adaptor Class Reference

<class description="" goes="" here=""> <short description=""> More...

#include <Adaptor.hpp>

Inheritance diagram for Adaptor:

AdaptorChain AudioAdaptor CuttingAdaptor DataDump ESSynchronizer Forwarder FrameCounter FramePatternDetector FrameRateAdjust FrameTypeCounter GlobalTimer SharedAdaptor StatisticsUpdater VideoAdaptor List of all members.

Public Member Functions

virtual list< Frame * > adapt (Frame *frm)
 Accepts as input a frame, and checks if it can adapt the frame, If the frame is modified, a new Frame object is created and inserted into the return list.
virtual list< Frame * > close ()
 Close and destroy an Adaptor.
virtual Adaptorclone ()=0
 Create a shallow copy of the Adaptor.
virtual void initialize ()=0
 Initialize internal data structures.
virtual const char * getName ()
 Return the name of the Adaptor.
virtual void setESInfo (ESInfo *esi)
 Sets a reference to an ESInfo object.
virtual ESInfogetESInfo ()
virtual u32 getTranscodingCosts () const =0
 returns adaptation costs (CPU only) per second! For visual streams they are expressed in pixels/seconds.

Protected Attributes

bool initialized
char name [128]
 the name of the Adaptor, Workaround for broken instanceof in compilers and used for pretty-printing.
ESInfoes

Detailed Description

<class description="" goes="" here=""> <short description="">

Author:
Michael Kropfberger and Peter Schojer
Version:
Id
Adaptor.hpp,v 1.14 2006/01/20 15:37:17 mkropfbe Exp

Definition at line 69 of file Adaptor.hpp.


Member Function Documentation

virtual list<Frame*> Adaptor::adapt Frame frm  )  [inline, virtual]
 

Accepts as input a frame, and checks if it can adapt the frame, If the frame is modified, a new Frame object is created and inserted into the return list.

This new frame is returned only, if the size of the payload is larger than zero. If the frame was not modified, it is also inserted into the list. For more complex adaptors, it will happen, that the adaptor caches up one complete GOP and returns the full GOP in network order. A caching adaptor has to create deep-copies for each frames. Never directly modify the payload of the input frm, always create copies!!!

Parameters:
frm object to adapt. An Adaptor is never allowed to free the input frame. This has to be done in the caller.
Returns:
List of adapted Frame objects

Reimplemented in AdaptorChain, CuttingAdaptor, DataDump, ESSynchronizer, Forwarder, FrameCounter, FramePatternDetector, FrameRateAdjust, FrameRotate, FrameTypeCounter, GlobalTimer, MadMP3Decoder, MP3Encoder, MP4audioDecoder, MP4Decoder, MP4Encoder, PSNR, SharedAdaptor, StatisticsUpdater, StrongTemporalAdaptor, TemporalAdaptor, TheoraEncoder, Visualizer, VorbisEncoder, YUVColorReductionAdaptor, YUVinYUVoverlay, YUVScalingAdaptor, and YUVSpatialReductionAdaptor.

Definition at line 88 of file Adaptor.hpp.

Referenced by SharedAdaptor::adapt(), AdaptorChain::adapt(), DataChannel::run(), and DataSink::send().

00088 { 00089 list<Frame*> emptyList; 00090 return emptyList; 00091 };

virtual Adaptor* Adaptor::clone  )  [pure virtual]
 

Create a shallow copy of the Adaptor.

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

Returns:
An Adaptor object.

Implemented in ColorReductionAdaptor, CuttingAdaptor, DataDump, ESSynchronizer, Forwarder, FrameCounter, FramePatternDetector, FrameRateAdjust, FrameRotate, FrameTypeCounter, GlobalTimer, MadMP3Decoder, MP3Encoder, MP4audioDecoder, MP4Decoder, MP4Encoder, PSNR, QualityReductionAdaptor, SharedAdaptor, SpatialReductionAdaptor, StatisticsUpdater, StrongTemporalAdaptor, TemporalAdaptor, TheoraEncoder, Visualizer, VorbisEncoder, YUVColorReductionAdaptor, YUVinYUVoverlay, YUVScalingAdaptor, YUVSpatialReductionAdaptor, AudioAdaptorChain, and VideoAdaptorChain.

virtual list<Frame*> Adaptor::close  )  [inline, virtual]
 

Close and destroy an Adaptor.

Releases all internally buffered frame objects, and deallocate all allocated memory. The Adaptor must not be used after calling the close method!!!

Returns:
List of adapted Frame objects.

Reimplemented in AdaptorChain, CuttingAdaptor, DataDump, ESSynchronizer, FrameCounter, FramePatternDetector, FrameRateAdjust, FrameTypeCounter, GlobalTimer, MadMP3Decoder, MP3Encoder, MP4audioDecoder, MP4Decoder, MP4Encoder, PSNR, StatisticsUpdater, StrongTemporalAdaptor, TemporalAdaptor, Visualizer, VorbisEncoder, YUVColorReductionAdaptor, YUVinYUVoverlay, YUVScalingAdaptor, and YUVSpatialReductionAdaptor.

Definition at line 105 of file Adaptor.hpp.

Referenced by DataSink::close(), and DataChannel::run().

00105 { 00106 list < Frame * >emptyList; 00107 return emptyList; 00108 }

virtual const char* Adaptor::getName  )  [inline, virtual]
 

Return the name of the Adaptor.

Do use the same name as the classname (workaround for broken isInstanceOf in most compilers).

Returns:
String containing class name.
Definition at line 131 of file Adaptor.hpp.

References name.

Referenced by DataChannel::run(), DataSink::send(), and ProxySession::setUrl().

00131 { return name; };

virtual u32 Adaptor::getTranscodingCosts  )  const [pure virtual]
 

returns adaptation costs (CPU only) per second! For visual streams they are expressed in pixels/seconds.

Call this only on INITIALIZED adaptors!!!! Otherwise costs will be way too high.

Implemented in AdaptorChain, CuttingAdaptor, DataDump, ESSynchronizer, Forwarder, FrameCounter, FramePatternDetector, FrameRateAdjust, FrameRotate, FrameTypeCounter, GlobalTimer, MadMP3Decoder, MP3Encoder, MP4audioDecoder, MP4Decoder, MP4Encoder, PSNR, SharedAdaptor, StatisticsUpdater, StrongTemporalAdaptor, TemporalAdaptor, TheoraEncoder, Visualizer, VorbisEncoder, YUVColorReductionAdaptor, YUVinYUVoverlay, YUVScalingAdaptor, and YUVSpatialReductionAdaptor.

virtual void Adaptor::initialize  )  [pure virtual]
 

Initialize internal data structures.

Implemented in AdaptorChain, ColorReductionAdaptor, CuttingAdaptor, DataDump, ESSynchronizer, Forwarder, FrameCounter, FramePatternDetector, FrameRateAdjust, FrameRotate, FrameTypeCounter, GlobalTimer, MadMP3Decoder, MP3Encoder, MP4audioDecoder, MP4Decoder, MP4Encoder, PSNR, QualityReductionAdaptor, SharedAdaptor, SpatialReductionAdaptor, StatisticsUpdater, StrongTemporalAdaptor, TemporalAdaptor, TheoraEncoder, Visualizer, VorbisEncoder, YUVColorReductionAdaptor, YUVinYUVoverlay, YUVScalingAdaptor, and YUVSpatialReductionAdaptor.

virtual void Adaptor::setESInfo ESInfo esi  )  [inline, virtual]
 

Sets a reference to an ESInfo object.

Adaptors are allowed to change ESInfo objects. If you don't want that, pass an es->clone(). NEVER delete this es in the destructor of your Adaptor!

Reimplemented in CuttingAdaptor, DataDump, ESSynchronizer, Forwarder, FrameCounter, FramePatternDetector, FrameRateAdjust, FrameRotate, FrameTypeCounter, GlobalTimer, SharedAdaptor, StatisticsUpdater, YUVinYUVoverlay, AudioAdaptorChain, and VideoAdaptorChain.

Definition at line 138 of file Adaptor.hpp.

Referenced by ContainerDemux::demultiplexAndUpdateIO(), ProxySession::setUrl(), and DataChannel::visualizeCaching().

00138 {};


Member Data Documentation

char Adaptor::name[128] [protected]
 

the name of the Adaptor, Workaround for broken instanceof in compilers and used for pretty-printing.

Do not forget to initialize this value in your subclassedDefinition at line 155 of file Adaptor.hpp.

Referenced by getName().


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