Media Foundation Time Stamps

The Time Stamp defines a media sample's start and finish times, measured in stream time. The time stamp is sometimes called the presentation time.

When a renderer sink receives a sample, it schedules rendering based on the time stamp. If the sample arrives late, or has no time stamp, the sink renders the sample immediately. Otherwise, the sink waits until the sample's start time before it renders the sample

Media Sources and parser transforms are responsible for setting the correct time stamps on the samples they process. Use the following guidelines:

Optionally, the Media Foundation Transform (MFT) can also specify a media time for the sample. In a video stream The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor Also known as a decoder, this is a module or algorithm to decompress data. before you can play (see) it., media time represents the frame number. In an audio stream, media time represents the sample number in the packet. For example, if each packet contains one second of 44.1 kilohertz (kHz) audio, the first packet has a media start time of zero and a media stop time of 44100. In a seekable stream, the media time is always relative to the start time of the stream. For example, suppose you seek to 2 seconds from the start of a 15-fps video stream. The first media sample after the seek has a time stamp of zero but a media time of 30

Media Foundation Sinks (Renderers or Archiving sinks) can use the media time to determine whether frames or samples have been dropped, by checking for gaps. However, transforms are not required to set the media time.

Help Version 21.0.2021.4.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Media Foundation C API Help