Working with Indexes

The Windows Media Format SDK supports seeking and striding through content. Seeking enables you to specify a place on the file's timeline to begin playback. Striding enables you to fast-forward and rewind the output of a file. Files must be indexed to take advantage of these features. An index is a series of values representing positions in the file (either presentation times, frame numbers, or SMTPE time codes) with corresponding offsets into the data section of the file for each. Indexing is most important for video streams, as audio stream presentation time can be easily estimated. However, some audio streams may require indexes as well. By default, the writer will index every new ASF file. If changes are made to the content of a file, you must refresh the index yourself using the indexer object.

The indexer supports both temporal and frame-based indexing as well as indexing based on SMPTE time codes (if present). The writer will create a temporal index by default for every new video stream encoded to a file. You must explicitly configure and call the indexer to create a frame-based or SMPTE time code index.

When changes are made to the content of an ASF file, it must be indexed again.

The following sections present example code for performing common indexing tasks.

In addition, the DSCopy sample application illustrates the use of the indexer. For more information, see Sample Applications.

 

 

Show: