EssenceSubParser::ESP_EssenceSource Class Reference

Base class for essence parser EssenceSource objects. More...

#include <essence.h>

Inheritance diagram for EssenceSubParser::ESP_EssenceSource:

EssenceSource RefCount IRefCount DV_DIF_EssenceSubParser::ESP_EssenceSource JP2K_EssenceSubParser::ESP_EssenceSource MPEG2_VES_EssenceSubParser::ESP_EssenceSource TEMPLATE_EssenceSubParser::ESP_EssenceSource WAVE_PCM_EssenceSubParser::ESP_EssenceSource List of all members.

Public Member Functions

 ESP_EssenceSource (EssenceSubParserPtr TheCaller, FileHandle InFile, UInt32 UseStream, UInt64 Count=1)
 Construct and initialise for essence parsing/sourcing.
virtual DataChunkPtr GetEssenceData (size_t Size=0, size_t MaxSize=0)
 Get the next "installment" of essence data.
DataChunkPtr BaseGetEssenceData (size_t Size=0, size_t MaxSize=0)
 Non-virtual basic version of GetEssenceData() that can be called by derived classes.
virtual bool EndOfItem (void)
 Did the last call to GetEssenceData() return the end of a wrapping item.
virtual bool EndOfData (void)
 Is all data exhasted?
virtual UInt8 GetGCEssenceType (void)
 Get the GCEssenceType to use when wrapping this essence in a Generic Container.
virtual UInt8 GetGCElementType (void)
 Get the GCEssenceType to use when wrapping this essence in a Generic Container.
virtual bool IsEditPoint (void)
 Is the last data read the start of an edit point?
virtual Rational GetEditRate (void)
 Get the edit rate of this wrapping of the essence.
virtual Position GetCurrentPosition (void)
 Get the current position in GetEditRate() sized edit units.
virtual bool SetOption (std::string Option, Int64 Param=0)
 Set a parser specific option.
virtual UInt32 GetBytesPerEditUnit (UInt32 KAGSize=1)
 Get BytesPerEditUnit if Constant, else 0.
virtual bool CanIndex ()
 Can this stream provide indexing.
virtual void SetIndexManager (IndexManagerPtr &Manager, int StreamID)
 Set the index manager to use for building index tables for this essence.

Protected Attributes

EssenceSubParserPtr Caller
FileHandle File
UInt32 Stream
UInt64 RequestedCount
IndexTablePtr Index
DataChunkPtr RemainingData
bool AtEndOfData
bool Started

Detailed Description

Base class for essence parser EssenceSource objects.

Still abstract as there is no generic way to determine the data size


Constructor & Destructor Documentation

ESP_EssenceSource ( EssenceSubParserPtr  TheCaller,
FileHandle  InFile,
UInt32  UseStream,
UInt64  Count = 1 
) [inline]

Construct and initialise for essence parsing/sourcing.

Reimplemented in DV_DIF_EssenceSubParser::ESP_EssenceSource, JP2K_EssenceSubParser::ESP_EssenceSource, MPEG2_VES_EssenceSubParser::ESP_EssenceSource, TEMPLATE_EssenceSubParser::ESP_EssenceSource, and WAVE_PCM_EssenceSubParser::ESP_EssenceSource.


Member Function Documentation

virtual DataChunkPtr GetEssenceData ( size_t  Size = 0,
size_t  MaxSize = 0 
) [inline, virtual]

Get the next "installment" of essence data.

This will attempt to return an entire wrapping unit (e.g. a full frame for frame-wrapping) but will return it in smaller chunks if this would break the MaxSize limit. If a Size is specified then the chunk returned will end at the first wrapping unit end encountered before Size. On no account will portions of two or more different wrapping units be returned together. The mechanism for selecting a type of wrapping (e.g. frame, line or clip) is not (currently) part of the common EssenceSource interface.

Returns:
Pointer to a data chunk holding the next data or a NULL pointer when no more remains
Note:
If there is more data to come but it is not currently available the return value will be a pointer to an empty data chunk

If Size = 0 the object will decide the size of the chunk to return

On no account will the returned chunk be larger than MaxSize (if MaxSize > 0)

Implements EssenceSource.

Reimplemented in DV_DIF_EssenceSubParser::ESP_EssenceSource, JP2K_EssenceSubParser::ESP_EssenceSource, MPEG2_VES_EssenceSubParser::ESP_EssenceSource, TEMPLATE_EssenceSubParser::ESP_EssenceSource, and WAVE_PCM_EssenceSubParser::ESP_EssenceSource.

DataChunkPtr BaseGetEssenceData ( size_t  Size = 0,
size_t  MaxSize = 0 
) [inline]

Non-virtual basic version of GetEssenceData() that can be called by derived classes.

DRAGONS: This implementation always reads whole wrapping units, so it NOT SAFE if these could be too large to fit in memory

virtual bool EndOfItem ( void   )  [inline, virtual]

Did the last call to GetEssenceData() return the end of a wrapping item.

Returns:
true if the last call to GetEssenceData() returned an entire wrapping unit.

true if the last call to GetEssenceData() returned the last chunk of a wrapping unit.

true if the last call to GetEssenceData() returned the end of a clip-wrapped clip.

false if there is more data pending for the current wrapping unit.

false if the source is to be clip-wrapped and there is more data pending for the clip

Implements EssenceSource.

Reimplemented in MPEG2_VES_EssenceSubParser::ESP_EssenceSource, and WAVE_PCM_EssenceSubParser::ESP_EssenceSource.

virtual bool EndOfData ( void   )  [inline, virtual]

Is all data exhasted?

Returns:
true if a call to GetEssenceData() will return some valid essence data

Implements EssenceSource.

virtual UInt8 GetGCEssenceType ( void   )  [inline, virtual]

Get the GCEssenceType to use when wrapping this essence in a Generic Container.

Implements EssenceSource.

virtual UInt8 GetGCElementType ( void   )  [inline, virtual]

Get the GCEssenceType to use when wrapping this essence in a Generic Container.

Implements EssenceSource.

virtual bool IsEditPoint ( void   )  [inline, virtual]

Is the last data read the start of an edit point?

Reimplemented from EssenceSource.

Reimplemented in MPEG2_VES_EssenceSubParser::ESP_EssenceSource.

virtual Rational GetEditRate ( void   )  [inline, virtual]

Get the edit rate of this wrapping of the essence.

Note:
This may not be the same as the original "native" edit rate of the essence if this EssenceSource is wrapping to a different edit rate

Implements EssenceSource.

virtual Position GetCurrentPosition ( void   )  [inline, virtual]

Get the current position in GetEditRate() sized edit units.

This is relative to the start of the stream, so the first edit unit is always 0. This is the same as the number of edit units read so far, so when the essence is exhausted the value returned shall be the size of the essence

Implements EssenceSource.

virtual bool SetOption ( std::string  Option,
Int64  Param = 0 
) [inline, virtual]

Set a parser specific option.

Returns:
true if the option was successfully set

Reimplemented from EssenceSource.

virtual UInt32 GetBytesPerEditUnit ( UInt32  KAGSize = 1  )  [inline, virtual]

Get BytesPerEditUnit if Constant, else 0.

Note:
This value may be useful even if CanIndex() returns false

Reimplemented from EssenceSource.

virtual bool CanIndex (  )  [inline, virtual]

Can this stream provide indexing.

If true then SetIndex Manager can be used to set the index manager that will receive indexing data

Reimplemented from EssenceSource.

virtual void SetIndexManager ( IndexManagerPtr Manager,
int  StreamID 
) [inline, virtual]

Set the index manager to use for building index tables for this essence.

Reimplemented from EssenceSource.


Member Data Documentation

EssenceSubParserPtr Caller [protected]

FileHandle File [protected]

UInt32 Stream [protected]

UInt64 RequestedCount [protected]

IndexTablePtr Index [protected]

DataChunkPtr RemainingData [protected]

bool AtEndOfData [protected]

bool Started [protected]


The documentation for this class was generated from the following file:
Generated on Mon Apr 2 15:20:59 2007 for MXFLib by  doxygen 1.5.1-p1