#include <essence.h>
Inheritance diagram for BodyStream:
Public Types | |
enum | StateType { BodyStreamStart = 0, BodyStreamHeadIndex, BodyStreamPreBodyIndex, BodyStreamBodyWithIndex, BodyStreamBodyNoIndex, BodyStreamPostBodyIndex, BodyStreamFootIndex, BodyStreamDone } |
Define the action required next for this stream. More... | |
enum | IndexType { StreamIndexNone = 0, StreamIndexFullFooter = 1, StreamIndexSparseFooter = 2, StreamIndexSprinkled = 4, StreamIndexSprinkledIsolated = 8, StreamIndexCBRHeader = 16, StreamIndexCBRHeaderIsolated = 32, StreamIndexCBRFooter = 64, StreamIndexCBRBody = 128, StreamIndexCBRIsolated = 256, StreamIndexCBRPreIsolated = 512 } |
The index table type or types of this stream. More... | |
enum | WrapType { StreamWrapOther = 0, StreamWrapFrame, StreamWrapClip } |
Wrapping types for streams. More... | |
Public Member Functions | |
BodyStream (UInt32 SID, EssenceSourcePtr &EssSource, DataChunkPtr Key=NULL, bool NonGC=false) | |
Construct an body stream object with a given essence source. | |
EssenceSourcePtr & | GetSource (void) |
Get the essence source for this stream. | |
size_type | SubStreamCount (void) |
Get the number of sub-streams (includes the master stream). | |
void | AddSubStream (EssenceSourcePtr &SubSource, DataChunkPtr Key=NULL, bool NonGC=false) |
Add a new sub-stream. | |
UInt32 | GetBodySID (void) |
Get this stream's BodySID. | |
void | SetIndexSID (UInt32 SID) |
Set this stream's IndexSID. | |
UInt32 | GetIndexSID (void) |
Get this stream's IndexSID. | |
void | SetState (StateType NewState) |
Set the stream's state. | |
StateType | GetState (void) |
Get the current state. | |
StateType | GetNextState (void) |
Get the next state. | |
void | AddIndexType (IndexType NewIndexType) |
Add the specified index type(s). | |
void | SetIndexType (IndexType NewIndexType) |
Set the index type(s) to the desired value. | |
IndexType | GetIndexType (void) |
Get the index type(s). | |
void | SetFooterIndex (IndexType NewIndexType) |
Set the footer index flags to the desired value. | |
IndexType | GetFooterIndex (void) |
Get the footer index flags. | |
void | SetWrapType (WrapType NewWrapType) |
Set the wrapping type for this stream. | |
void | SetWrapType (WrappingOption::WrapType NewWrapType) |
Set the wrapping type for this stream. | |
WrapType | GetWrapType (void) |
Get the wrapping type of this stream. | |
void | SetWriter (GCWriterPtr &Writer) |
Set the current GCWriter. | |
IndexManagerPtr & | GetIndexManager (void) |
Get the current index manager. | |
GCWriterPtr & | GetWriter (void) |
Get a reference to the current GCWriter. | |
UInt32 | GetTrackNumber (void) |
Get the track number associated with this stream. | |
Uint32 | GetTrackNumber (GCStreamID ID) |
Get the track number associated with a specified stream or sub-stream. | |
void | SetPendingData (bool Value=true) |
Set the pending essence data flag. | |
bool | HasPendingData (void) |
Find out if there is any essence data stored in the GCWriter pending a write. | |
void | SetEndOfStream (bool Value=true) |
Set the EndOfStream flag. | |
bool | GetEndOfStream (void) |
Find out if there is any essence data remaining for this stream. | |
void | SetNextSprinkled (Position Sprinkled) |
Set the first edit unit for the next sprinkled index segment. | |
Position | GetNextSprinkled (void) |
Get the first edit unit for the next sprinkled index segment. | |
void | SetKAG (UInt32 NewKAG) |
Set the KLV Alignment Grid. | |
UInt32 | GetKAG (void) |
Get the KLV Alignment Grid. | |
void | SetForceBER4 (bool Force) |
Set flag if BER lengths should be forced to 4-byte (where possible). | |
bool | GetForceBER4 (void) |
Get flag stating whether BER lengths should be forced to 4-byte (where possible). | |
void | SetEditAlign (bool Align) |
Set edit align forced partitioning flag. | |
bool | GetEditAlign (void) |
Get edit align forced partitioning flag. | |
void | SetFreeSpaceIndex (bool Flag) |
Set the "FreeSpaceIndex" flag. | |
bool | GetFreeSpaceIndex (void) |
Read the "FreeSpaceIndex" flag. | |
void | SetValueRelativeIndexing (bool Val) |
Set value-relative indexing flag. | |
bool | GetValueRelativeIndexing (void) |
Get value-relative indexing flag. | |
Length | GetPrechargeSize (void) const |
Read the number of edit units of pre-charge remaining. | |
void | DecrementPrecharge (void) |
Reduce the precharge count by one. | |
void | InitIndexManager (void) |
Initialize an index manager if required. | |
Public Attributes | |
std::list< Position > | SparseList |
List of edit units to include in sparse index tables. | |
Protected Member Functions | |
BodyStream () | |
Prevent NULL construction. | |
BodyStream (BodyStream &) | |
Prevent copy construction. | |
Protected Attributes | |
EssenceSourcePtr | Source |
The essence source for this stream. | |
EssenceSourceList | SubStreams |
Sources for each sub-stream. | |
EssenceSourceList::iterator | SubStream_it |
Current sub-stream. | |
bool | SubStreamRestart |
Flag true when the sub-stream iterator needs moving to the top of the list next time. | |
StateType | State |
The state of this stream. | |
IndexType | StreamIndex |
The index type(s) of this stream. | |
IndexType | FooterIndexFlags |
Set of flags for tracking footer index tables. | |
UInt32 | BodySID |
BodySID to use for this stream. | |
UInt32 | IndexSID |
IndexSID to use for indexing this stream. | |
WrapType | StreamWrap |
The wrapping type of this stream. | |
GCWriterPtr | StreamWriter |
The writer for this stream. | |
bool | EssencePendingData |
Is there any essence data pending in the writer? | |
bool | EndOfStream |
No more essence available for this stream. | |
IndexManagerPtr | IndexMan |
The index manager for this stream. | |
Position | NextSprinkled |
The location of the first edit-unit to use for the next sprinkled index segment. | |
bool | FreeSpaceIndex |
True if the free space at the end of the essenc eis to be indexed. | |
bool | ValueRelativeIndexing |
Flag to allow value-relative indexing. | |
Length | PrechargeSize |
The number of edit units of pre-charge remaining to be written. | |
UInt32 | KAG |
KLV Alignment Grid to use for this stream (of zero if default for this body is to be used). | |
bool | ForceBER4 |
Flag set if BER lengths for this stream should be forced to 4-byte (where possible). | |
bool | EditAlign |
Flag set if partitioning is to be done only on edit boundaries. |
Sub-streams can be added as pointers to their essence sources as this class is derived from EssenceSourceList. Sub-streams will be written in the same generic container as this stream. This stream's essence source will appear as the first "child" when the EssenceSourceList is scanned
enum StateType |
Define the action required next for this stream.
enum IndexType |
The index table type or types of this stream.
enum WrapType |
BodyStream | ( | ) | [protected] |
Prevent NULL construction.
BodyStream | ( | BodyStream & | ) | [protected] |
Prevent copy construction.
BodyStream | ( | UInt32 | SID, | |
EssenceSourcePtr & | EssSource, | |||
DataChunkPtr | Key = NULL , |
|||
bool | NonGC = false | |||
) | [inline] |
Construct an body stream object with a given essence source.
EssenceSourcePtr& GetSource | ( | void | ) | [inline] |
Get the essence source for this stream.
size_type SubStreamCount | ( | void | ) | [inline] |
Get the number of sub-streams (includes the master stream).
void AddSubStream | ( | EssenceSourcePtr & | SubSource, | |
DataChunkPtr | Key = NULL , |
|||
bool | NonGC = false | |||
) |
Add a new sub-stream.
UInt32 GetBodySID | ( | void | ) | [inline] |
Get this stream's BodySID.
void SetIndexSID | ( | UInt32 | SID | ) | [inline] |
Set this stream's IndexSID.
UInt32 GetIndexSID | ( | void | ) | [inline] |
Get this stream's IndexSID.
void SetState | ( | StateType | NewState | ) | [inline] |
Set the stream's state.
StateType GetState | ( | void | ) | [inline] |
Get the current state.
BodyStream::StateType GetNextState | ( | void | ) |
Get the next state.
Sets State to the next state
void AddIndexType | ( | IndexType | NewIndexType | ) | [inline] |
Add the specified index type(s).
void SetIndexType | ( | IndexType | NewIndexType | ) | [inline] |
Set the index type(s) to the desired value.
IndexType GetIndexType | ( | void | ) | [inline] |
Get the index type(s).
void SetFooterIndex | ( | IndexType | NewIndexType | ) | [inline] |
Set the footer index flags to the desired value.
IndexType GetFooterIndex | ( | void | ) | [inline] |
Get the footer index flags.
void SetWrapType | ( | WrapType | NewWrapType | ) | [inline] |
Set the wrapping type for this stream.
void SetWrapType | ( | WrappingOption::WrapType | NewWrapType | ) | [inline] |
Set the wrapping type for this stream.
WrapType GetWrapType | ( | void | ) | [inline] |
Get the wrapping type of this stream.
void SetWriter | ( | GCWriterPtr & | Writer | ) |
Set the current GCWriter.
IndexManagerPtr& GetIndexManager | ( | void | ) | [inline] |
Get the current index manager.
GCWriterPtr& GetWriter | ( | void | ) | [inline] |
Get a reference to the current GCWriter.
UInt32 GetTrackNumber | ( | void | ) | [inline] |
Get the track number associated with this stream.
Uint32 GetTrackNumber | ( | GCStreamID | ID | ) | [inline] |
Get the track number associated with a specified stream or sub-stream.
void SetPendingData | ( | bool | Value = true |
) | [inline] |
Set the pending essence data flag.
bool HasPendingData | ( | void | ) | [inline] |
Find out if there is any essence data stored in the GCWriter pending a write.
void SetEndOfStream | ( | bool | Value = true |
) | [inline] |
Set the EndOfStream flag.
bool GetEndOfStream | ( | void | ) | [inline] |
Find out if there is any essence data remaining for this stream.
void SetNextSprinkled | ( | Position | Sprinkled | ) | [inline] |
Set the first edit unit for the next sprinkled index segment.
Position GetNextSprinkled | ( | void | ) | [inline] |
Get the first edit unit for the next sprinkled index segment.
void SetKAG | ( | UInt32 | NewKAG | ) | [inline] |
Set the KLV Alignment Grid.
UInt32 GetKAG | ( | void | ) | [inline] |
Get the KLV Alignment Grid.
void SetForceBER4 | ( | bool | Force | ) | [inline] |
Set flag if BER lengths should be forced to 4-byte (where possible).
bool GetForceBER4 | ( | void | ) | [inline] |
Get flag stating whether BER lengths should be forced to 4-byte (where possible).
void SetEditAlign | ( | bool | Align | ) | [inline] |
Set edit align forced partitioning flag.
bool GetEditAlign | ( | void | ) | [inline] |
Get edit align forced partitioning flag.
void SetFreeSpaceIndex | ( | bool | Flag | ) | [inline] |
Set the "FreeSpaceIndex" flag.
bool GetFreeSpaceIndex | ( | void | ) | [inline] |
Read the "FreeSpaceIndex" flag.
void SetValueRelativeIndexing | ( | bool | Val | ) | [inline] |
Set value-relative indexing flag.
Value-relative indexing will produce index tables that count from the first byte of the KLV of clip-wrapped essence rather than the key. These tables can be used internally but must not be written to a file as they are not 377M complient
bool GetValueRelativeIndexing | ( | void | ) | [inline] |
Get value-relative indexing flag.
Value-relative indexing will produce index tables that count from the first byte of the KLV of clip-wrapped essence rather than the key. These tables can be used internally but must not be written to a file as they are not 377M complient
Length GetPrechargeSize | ( | void | ) | const [inline] |
Read the number of edit units of pre-charge remaining.
void DecrementPrecharge | ( | void | ) | [inline] |
Reduce the precharge count by one.
void InitIndexManager | ( | void | ) |
Initialize an index manager if required.
EssenceSourcePtr Source [protected] |
The essence source for this stream.
EssenceSourceList SubStreams [protected] |
Sources for each sub-stream.
EssenceSourceList::iterator SubStream_it [protected] |
Current sub-stream.
bool SubStreamRestart [protected] |
Flag true when the sub-stream iterator needs moving to the top of the list next time.
IndexType StreamIndex [protected] |
The index type(s) of this stream.
IndexType FooterIndexFlags [protected] |
Set of flags for tracking footer index tables.
WrapType StreamWrap [protected] |
The wrapping type of this stream.
GCWriterPtr StreamWriter [protected] |
The writer for this stream.
bool EssencePendingData [protected] |
Is there any essence data pending in the writer?
bool EndOfStream [protected] |
No more essence available for this stream.
IndexManagerPtr IndexMan [protected] |
The index manager for this stream.
Position NextSprinkled [protected] |
The location of the first edit-unit to use for the next sprinkled index segment.
bool FreeSpaceIndex [protected] |
True if the free space at the end of the essenc eis to be indexed.
When an essence stream may be extended during file creation it may be useful to know where the essence currently ends (to allow new essence to be added). /note DRAGONS: This is non-standard and will produce invalid index tables (even if they are later "fixed")
bool ValueRelativeIndexing [protected] |
Flag to allow value-relative indexing.
Length PrechargeSize [protected] |
The number of edit units of pre-charge remaining to be written.
DRAGONS: This is set when the state moves from "start" because it is important to wait for all sub-streams to be set up first
KLV Alignment Grid to use for this stream (of zero if default for this body is to be used).
bool ForceBER4 [protected] |
Flag set if BER lengths for this stream should be forced to 4-byte (where possible).
bool EditAlign [protected] |
Flag set if partitioning is to be done only on edit boundaries.
std::list<Position> SparseList |
List of edit units to include in sparse index tables.