Class ASF_Object_TimecodeIndex

Description

This top-level ASF object supplies timecode indexing information for the

streams of an ASF file. It includes stream-specific indexing information based on the timecodes found in the file. If the Timecode Index Object is used, it is recommended that timecodes be stored as a Payload Extension System on the appropriate stream. It is also recommended that every timecode appearing in the ASF file have a corresponging index entry.

The index is designed to be broken into blocks to facilitate storage that is more space-efficient by using 32-bit offsets relative to a 64-bit base. That is, each index block has a full 64-bit offset in the block header that is added to the 32-bit offsets found in each index entry. If a file is larger than 2^32 bytes, then multiple index blocks can be used to fully index the entire large file while still keeping index entry offsets at 32 bits.

To locate an object with a particular timecode in an ASF file, one would typically look through the Timecode Index Object in blocks of the appropriate range and try to locate the nearest possible timecode. The corresponding Offset field values of the Index Entry are byte offsets that, when combined with the Block Position value of the Index Block, indicate the starting location in bytes of an ASF Data Packet relative to the start of the first ASF Data Packet in the file.

Any ASF file containing a Timecode Index Object shall also contain a Timecode Index Parameters Object in its ASF Header.

Located in /ASF/Object/TimecodeIndex.php (line 76)

ASF_Object
   |
   --ASF_Object_TimecodeIndex
Class Constant Summary
Method Summary
ASF_Object_TimecodeIndex __construct (Reader $reader, [ &$options = array()], Array $options)
Array getIndexBlocks ()
Variables

Inherited Variables

Inherited from ASF_Object

ASF_Object::$_options
ASF_Object::$_reader
Methods
Constructor __construct (line 114)

Constructs the class with given parameters and reads object related data from the ASF file.

  • access: public
ASF_Object_TimecodeIndex __construct (Reader $reader, [ &$options = array()], Array $options)
  • Reader $reader: The reader object.
  • Array $options: The options array.
  • &$options

Redefinition of:
ASF_Object::__construct()
Constructs the class with given parameters and options.
getIndexBlocks (line 180)

Returns an array of index entries. Each entry consists of the following keys.

  • timecodeRange -- Specifies the timecode range for this block. Subsequent blocks must contain range numbers greater than or equal to this one.
  • blockPositions -- Specifies a list of byte offsets of the beginnings of the blocks relative to the beginning of the first Data Packet (for example, the beginning of the Data Object + 50 bytes).
    • timecode -- This is the 4-byte timecode for these entries.
    • offsets -- Specifies the offset. An offset value of 0xffffffff indicates an invalid offset value.

    • access: public
    Array getIndexBlocks ()
    getIndexSpecifiers (line 159)

    Returns an array of index specifiers. Each entry consists of the following keys.

    • streamNumber -- Specifies the stream number that the Index Specifiers refer to. Valid values are between 1 and 127.
    • indexType -- Specifies the type of index.

    • access: public
    Array getIndexSpecifiers ()

    Inherited Methods

    Inherited From ASF_Object

    ASF_Object::__construct()
    ASF_Object::getIdentifier()
    ASF_Object::getOffset()
    ASF_Object::getOption()
    ASF_Object::getOptions()
    ASF_Object::getParent()
    ASF_Object::getSize()
    ASF_Object::setIdentifier()
    ASF_Object::setOffset()
    ASF_Object::setOption()
    ASF_Object::setOptions()
    ASF_Object::setParent()
    ASF_Object::setSize()
    ASF_Object::__get()
    ASF_Object::__set()
    Class Constants
    NEAREST_PAST_CLEANPOINT = 3 (line 99)

    Indicates that the index type is Nearest Past Cleanpoint. The Nearest Past Cleanpoint indexes point to the closest data packet containing an entire object (or first fragment of an object) that has the Cleanpoint Flag set.

    Nearest Past Cleanpoint is the most common type of index.

    NEAREST_PAST_DATA_PACKET = 1 (line 83)

    Indicates that the index type is Nearest Past Data Packet. The Nearest Past Data Packet indexes point to the data packet whose presentation time is closest to the index entry time.

    NEAREST_PAST_MEDIA = 2 (line 90)

    Indicates that the index type is Nearest Past Media. The Nearest Past Object indexes point to the closest data packet containing an entire object or first fragment of an object.

    Documentation generated on Fri, 05 Sep 2008 20:19:43 +0300 by phpDocumentor 1.4.1