Structure

SMPTETime

Specifies a time stamp as one of the SMPTE time types.

Declaration

typedef struct SMPTETime {
    ...
} SMPTETime;

Overview

SMPTE (Society of Motion Picture and Television Engineers, pronounced “SIMPtee”) times are used to correlate a point in an audio stream with an external event. For example, a SMPTE time can be used to correlate a sound in an audio file with a video frame in a movie file.

Note that the frames referred to by this structure are video frames, where a video frame is a single complete image. (Compare with the definition of audio frames in the discussion for AudioStreamBasicDescription.)

A complete SMPTE time description takes 80 bits, including 32 user bits that contain vendor-specific information. The actual time-code portion of the SMPTE time description is normally sent in several messages, each message containing a portion of the time code. (The user bits are sent in a separate message.) Typically, the SMPTE time description is divided up into 8 1-byte messages, with the first nibble of each message specifying which portion of the time code is contained in the message and the second nibble containing the time information. Four such messages are normally sent with each video frame.

Video data contains somewhere from 24 to 60 frames per second (as specified by the SMPTE time type—see SMPTE Timecode Type Constants) and each video frame has an associated SMPTE time. SMPTE time is based on a 24-hour clock. Each frame’s SMPTE time consists of an hour, minute, and second value, plus the number of the frame within the second. Because audio data is sampled at a much higher rate (MP3 data is sampled at over 100,000 bits per second, for example), it is frequently desirable to correlate the audio data with a time within the persistence period of a single video frame. For this reason, the time period during which a single video frame is displayed is subdivided into subframes (typically 80 or 100 subframes per frame, as specified by the mSubFrameDivisor field). The mSubFrames field specifies the number of subframes into the video frame represented by this time structure.

Topics

Instance Properties

mCounter

The total number of messages received. It takes 8 messages to carry a full SMPTE time code.

mFlags

A set of flags that indicate the SMPTE state (see SMPTE State Flags).

mFrames

The value of the frames portion of the SMPTE time.

mHours

The value of the hours portion of the SMPTE time.

mMinutes

The value of the minutes portion of the SMPTE time.

mSeconds

The value of the seconds portion of the SMPTE time.

mSubframeDivisor

The number of subframes per video frame (typically 80).

mSubframes

A subframe offset to the HH:MM:SS:FF time. You can use this field to position a time marker somewhere within the time span represented by a video frame, if necessary.

mType

A SMPTE time type constant indicating the kind of SMPTE time used (see SMPTE Timecode Type Constants).