#include <vbi.h>
Inheritance diagram for VBISource:
Public Member Functions | |
VBISource (EssenceSource *Master) | |
virtual | ~VBISource () |
Virtual destructor to allow polymorphism. | |
void | AddLine (int LineNumber, VBIWrappingType Wrapping, VBISampleCoding Coding, UInt16 SampleCount, DataChunkPtr &LineData) |
void | AddLine (int Field, int LineNumber, VBIWrappingType Wrapping, VBISampleCoding Coding, UInt16 SampleCount, DataChunkPtr &LineData) |
virtual size_t | GetEssenceDataSize (void) |
Get the size of the essence data in bytes. | |
virtual DataChunkPtr | GetEssenceData (size_t Size=0, size_t MaxSize=0) |
Get the next "installment" of essence data. | |
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 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 int | GetBERSize (void) |
Get the preferred BER length size for essence KLVs written from this source, 0 for auto. | |
virtual bool | IsPictureEssence (void) |
Is this picture essence? | |
virtual bool | IsSoundEssence (void) |
Is this sound essence? | |
virtual bool | IsDataEssence (void) |
Is this data essence? | |
virtual bool | IsCompoundEssence (void) |
Is this compound essence? | |
virtual Int32 | RelativeWriteOrder (void) |
An indication of the relative write order to use for this stream. | |
virtual int | RelativeWriteOrderType (void) |
The type for relative write-order positioning if RelativeWriteOrder() != 0. | |
Protected Member Functions | |
DataChunkPtr | BuildChunk (void) |
Build the VBI data for this frame in SMPTE-436M format. | |
Protected Attributes | |
EssenceSourceParent | MasterSource |
The EssenceSource for the picture essence to which this VBI data relates. | |
VBILineMap | Lines |
Map of lines for this frame. | |
DataChunkList | BufferedData |
List of data items prepared and ready to be supplied in response to GetEssenceData() - next to be supplied is the head. | |
size_t | BufferOffset |
An offset into the current data buffer if we are returning a partial chunk in GetEssenceData(). | |
Position | CurrentPosition |
Our current position. |
VBISource | ( | EssenceSource * | Master | ) | [inline] |
virtual ~VBISource | ( | ) | [inline, virtual] |
Virtual destructor to allow polymorphism.
void AddLine | ( | int | LineNumber, | |
VBIWrappingType | Wrapping, | |||
VBISampleCoding | Coding, | |||
UInt16 | SampleCount, | |||
DataChunkPtr & | LineData | |||
) |
void AddLine | ( | int | Field, | |
int | LineNumber, | |||
VBIWrappingType | Wrapping, | |||
VBISampleCoding | Coding, | |||
UInt16 | SampleCount, | |||
DataChunkPtr & | LineData | |||
) | [inline] |
size_t GetEssenceDataSize | ( | void | ) | [virtual] |
Get the size of the essence data in bytes.
Implements EssenceSource.
DataChunkPtr GetEssenceData | ( | size_t | Size = 0 , |
|
size_t | MaxSize = 0 | |||
) | [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.
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.
virtual bool EndOfItem | ( | void | ) | [inline, virtual] |
Did the last call to GetEssenceData() return the end of a wrapping item.
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.
virtual bool EndOfData | ( | void | ) | [inline, virtual] |
Is all data exhasted?
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 Rational GetEditRate | ( | void | ) | [inline, virtual] |
Get the edit rate of this wrapping of the essence.
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 int GetBERSize | ( | void | ) | [inline, virtual] |
Get the preferred BER length size for essence KLVs written from this source, 0 for auto.
Reimplemented from EssenceSource.
virtual bool IsPictureEssence | ( | void | ) | [inline, virtual] |
virtual bool IsSoundEssence | ( | void | ) | [inline, virtual] |
virtual bool IsDataEssence | ( | void | ) | [inline, virtual] |
virtual bool IsCompoundEssence | ( | void | ) | [inline, virtual] |
virtual Int32 RelativeWriteOrder | ( | void | ) | [inline, virtual] |
An indication of the relative write order to use for this stream.
Normally streams in a GC are ordered as follows:
However, sometimes this order needs to be overridden - such as for VBI data preceding picture items.
The normal case for ordering of an essence stream is for RelativeWriteOrder to return 0, indicating that the default ordering is to be used. Any other value indicates that relative ordering is required, and this is used as the Position value for a SetRelativeWriteOrder() call. The value of Type for that call is acquired from RelativeWriteOrderType()
For example: to force a source to be written between the last GC sound item and the first CP data item, RelativeWriteOrder() can return any -ve number, with RelativeWriteOrderType() returning 0x07 (meaning before CP data). Alternatively RelativeWriteOrder() could return a +ve number and RelativeWriteOrderType() return 0x16 (meaning after GC sound)
Reimplemented from EssenceSource.
virtual int RelativeWriteOrderType | ( | void | ) | [inline, virtual] |
The type for relative write-order positioning if RelativeWriteOrder() != 0.
This method indicates the essence type to order this data before or after if reletive write-ordering is used
Reimplemented from EssenceSource.
DataChunkPtr BuildChunk | ( | void | ) | [protected] |
Build the VBI data for this frame in SMPTE-436M format.
EssenceSourceParent MasterSource [protected] |
The EssenceSource for the picture essence to which this VBI data relates.
VBILineMap Lines [protected] |
Map of lines for this frame.
DataChunkList BufferedData [protected] |
List of data items prepared and ready to be supplied in response to GetEssenceData() - next to be supplied is the head.
size_t BufferOffset [protected] |
An offset into the current data buffer if we are returning a partial chunk in GetEssenceData().
Position CurrentPosition [protected] |
Our current position.