#include <index.h>
Inheritance diagram for IndexTable:
Public Member Functions | |
IndexTable () | |
Construct an IndexTable with no CBRDeltaArray. | |
~IndexTable () | |
Free any memory used by BaseDeltaArray when this IndexTable is destroyed. | |
void | DefineDeltaArray (int DeltaCount, DeltaEntry *DeltaArray) |
Define the base delta entry array from another delta entry array. | |
void | DefineDeltaArray (int DeltaCount, UInt32 *ElementSizes) |
Define the base delta entry array from an array of element sizes. | |
IndexSegmentPtr | AddSegment (MDObjectPtr Segment) |
Add an index table segment from an "IndexSegment" MDObject. | |
IndexSegmentPtr | AddSegment (Int64 StartPosition) |
Create a new empty index table segment. | |
IndexSegmentPtr | GetSegment (Position EditUnit) |
Get the segment containing a specified edit unit. | |
bool | AddIndexEntry (Position EditUnit, Int8 TemporalOffset, Int8 KeyFrameOffset, UInt8 Flags, UInt64 StreamOffset, int SliceCount=0, UInt32 *SliceOffsets=NULL, int PosCount=0, Rational *PosTable=NULL) |
Add a single index entry creating segments as required. | |
IndexPosPtr | Lookup (Position EditUnit, int SubItem=0, bool Reorder=true) |
Perform an index table look-up. | |
void | Update (Position EditUnit, UInt64 StreamOffset) |
Update the Stream Offset of an index entry. | |
void | Correct (Position EditUnit, Int8 TemporalOffset, Int8 KeyFrameOffset, UInt8 Flags) |
Fudge to correct index entry. | |
void | Purge (UInt64 FirstPosition, UInt64 LastPosition) |
Free memory by purging the specified range from the index. | |
size_t | WriteIndex (DataChunk &Buffer) |
Write this index table to a memory buffer. | |
ReorderIndexPtr | GetReorder (void) |
Get a pointer to the reorder index object (if one has been enabled). | |
ReorderIndexPtr | EnableReorder (void) |
Enable reordering and get a pointer to the reorder index object. | |
Public Attributes | |
UInt32 | IndexSID |
UInt32 | BodySID |
Rational | EditRate |
UInt32 | EditUnitByteCount |
Byte count for each and every edit unit, if CBR, else zero. | |
int | BaseDeltaCount |
Number of entries in BaseDeltaArray. | |
DeltaEntry * | BaseDeltaArray |
Deltas for CBR data and base delta array for VBR segments. | |
IndexSegmentMap | SegmentMap |
Map of edit unit position to index entry for VBR. | |
int | NSL |
NSL as defined in SMPTE-337M (number of slices minus 1). | |
int | NPE |
NPE as defined in SMPTE-337M (number of PosTable entries). | |
int | IndexEntrySize |
Size of each index entry (11 + 4*NSL + 8*NPE). | |
ReorderIndexPtr | Reorder |
Pointer to our reorder index if we are using one (used for building reordered indexes). | |
Static Public Attributes | |
static const Position | IndexLowest |
The lowest valid index position, used to flag omitted "start" parameters. |
IndexTable | ( | ) | [inline] |
Construct an IndexTable with no CBRDeltaArray.
~IndexTable | ( | ) | [inline] |
Free any memory used by BaseDeltaArray when this IndexTable is destroyed.
void DefineDeltaArray | ( | int | DeltaCount, | |
DeltaEntry * | DeltaArray | |||
) | [inline] |
Define the base delta entry array from another delta entry array.
void DefineDeltaArray | ( | int | DeltaCount, | |
UInt32 * | ElementSizes | |||
) | [inline] |
Define the base delta entry array from an array of element sizes.
With this version of DefineDeltaArray Slice numbers are calculated and all PosTableIndex entries are set to 0. Whenever an element size has the value zero a new slice is started
< Running delta value for current slice
IndexSegmentPtr AddSegment | ( | MDObjectPtr | Segment | ) |
Add an index table segment from an "IndexSegment" MDObject.
DRAGONS: Not the most efficient way to do this
IndexSegmentPtr AddSegment | ( | Int64 | StartPosition | ) |
Create a new empty index table segment.
IndexSegmentPtr GetSegment | ( | Position | EditUnit | ) |
Get the segment containing a specified edit unit.
bool AddIndexEntry | ( | Position | EditUnit, | |
Int8 | TemporalOffset, | |||
Int8 | KeyFrameOffset, | |||
UInt8 | Flags, | |||
UInt64 | StreamOffset, | |||
int | SliceCount = 0 , |
|||
UInt32 * | SliceOffsets = NULL , |
|||
int | PosCount = 0 , |
|||
Rational * | PosTable = NULL | |||
) |
Add a single index entry creating segments as required.
IndexPosPtr Lookup | ( | Position | EditUnit, | |
int | SubItem = 0 , |
|||
bool | Reorder = true | |||
) |
Perform an index table look-up.
Note that the return value is relative to the start of the EC in frame-wrapping, but relative to the start of the value of the first KLV in the first edit unit in the essence container in clip-wrapping
Fudge to correct index entry.
Free memory by purging the specified range from the index.
DRAGONS: This function needs testing, also it could be improved to purge partial segments as well
size_t WriteIndex | ( | DataChunk & | Buffer | ) |
Write this index table to a memory buffer.
ReorderIndexPtr GetReorder | ( | void | ) | [inline] |
Get a pointer to the reorder index object (if one has been enabled).
ReorderIndexPtr EnableReorder | ( | void | ) | [inline] |
Enable reordering and get a pointer to the reorder index object.
Byte count for each and every edit unit, if CBR, else zero.
int BaseDeltaCount |
Number of entries in BaseDeltaArray.
Deltas for CBR data and base delta array for VBR segments.
Map of edit unit position to index entry for VBR.
int NSL |
NSL as defined in SMPTE-337M (number of slices minus 1).
int NPE |
NPE as defined in SMPTE-337M (number of PosTable entries).
int IndexEntrySize |
Size of each index entry (11 + 4*NSL + 8*NPE).
Pointer to our reorder index if we are using one (used for building reordered indexes).
The entries will be built into segments by function xxx()
const Position IndexLowest [static] |
The lowest valid index position, used to flag omitted "start" parameters.
DRAGONS: Why isn't this initialized here in the header file? Because MSVC 6 won't allow that!!