To Seek By SMPTE Time Code Using the Synchronous Reader
[The feature associated with this page, Windows Media Format 11 SDK, is a legacy feature. It has been superseded by Source Reader and Sink Writer. Source Reader and Sink Writer have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use Source Reader and Sink Writer instead of Windows Media Format 11 SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
The synchronous reader object can seek to a point in a file based on the SMPTE time code associated with a video stream. Time code data is encapsulated in WMT_TIMECODE_EXTENSION_DATA structures that are attached to video samples as data unit extensions.
SMPTE time codes are defined by a range and a time code within that range. A range is a continuous series of time codes. Each time code is defined by hours, minutes, seconds, and frames.
To seek data in an ASF file by SMPTE time code using the synchronous reader, perform the following steps.
- Set the starting time code and ending time code for sample delivery by calling IWMSyncReader::SetRangeByFrame. You must specify the stream number of a video stream indexed by time code. The synchronous reader will synchronize the rest of the outputs to the presentation time of the specified frame of the specified stream.
- Begin retrieving samples with calls to IWMSyncReader::GetNextSample. Proceed as you normally would with the synchronous reader.
Related topics