Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Timecode Media

Timecode media is used to store time code data in QuickTime movies. It has a media type of 'tmcd'.

In this section:

Timecode Sample Description
Timecode Media Information Atom


Timecode Sample Description

The timecode sample description contains information that defines how to interpret time code media data. This sample description is based on the standard sample description header, as described in “Sample Description Atoms.”

The data format field in the sample description is always set to 'tmcd'.

The timecode media handler also adds some of its own fields to the sample description.

Reserved

A 32-bit integer that is reserved for future use. Set this field to 0.

Flags

A 32-bit integer containing flags that identify some timecode characteristics. The following flags are defined.

Drop frame

Indicates whether the timecode is drop frame. Set it to 1 if the timecode is drop frame. This flag’s value is 0x0001.

24 hour max

Indicates whether the timecode wraps after 24 hours. Set it to 1 if the timecode wraps. This flag’s value is 0x0002.

Negative times OK

Indicates whether negative time values are allowed. Set it to 1 if the timecode supports negative values. This flag’s value is 0x0004.

Counter

Indicates whether the time value corresponds to a tape counter value. Set it to 1 if the timecode values are tape counter values. This flag’s value is 0x0008.

Time scale

A 32-bit integer that specifies the time scale for interpreting the frame duration field.

Frame duration

A 32-bit integer that indicates how long each frame lasts in real time.

Number of frames

An 8-bit integer that contains the number of frames per second for the timecode format. If the time is a counter, this is the number of frames for each counter tick.

Reserved

A 24-bit quantity that must be set to 0.

Source reference

A user data atom containing information about the source tape. The only currently used user data list entry is the 'name' type. This entry contains a text item specifying the name of the source tape.

Timecode Media Information Atom

The timecode media also requires a media information atom. This atom contains information governing how the timecode text is displayed. This media information atom is stored in a base media information atom (see “Base Media Information Atoms” for more information). The type of the timecode media information atom is 'tcmi'.

The timecode media information atom contains the following fields:

Size

A 32-bit integer that specifies the number of bytes in this time code media information atom.

Type

A 32-bit integer that identifies the atom type; this field must be set to 'tcmi'.

Version

A 1-byte specification of the version of this timecode media information atom.

Flags

A 3-byte space for timecode media information flags. Set this field to 0.

Text font

A 16-bit integer that indicates the font to use. Set this field to 0 to use the system font. If the font name field contains a valid name, ignore this field.

Text face

A 16-bit integer that indicates the font’s style. Set this field to 0 for normal text. You can enable other style options by using one or more of the following bit masks:

0x0001 Bold

0x0002 Italic

0x0004 Underline

0x0008 Outline

0x0010 Shadow

0x0020 Condense

0x0040 Extend

Text size

A 16-bit integer that specifies the point size of the time code text.

Text color

A 48-bit RGB color value for the timecode text.

Background color

A 48-bit RGB background color for the timecode text.

Font name

A Pascal string specifying the name of the timecode text’s font.

Timecode Sample Data

There are two different sample data formats used by timecode media.

If the Counter flag is set to 1 in the timecode sample description, the sample data is a counter value. Each sample contains a 32-bit integer counter value.

If the Counter flag is set to 0 in the timecode sample description, the sample data format is a timecode record, as follows.

Hours

An 8-bit unsigned integer that indicates the starting number of hours.

Negative

A 1-bit value indicating the time’s sign. If bit is set to 1, the timecode record value is negative.

Minutes

A 7-bit integer that contains the starting number of minutes.

Seconds

An 8-bit unsigned integer indicating the starting number of seconds.

Frames

An 8-bit unsigned integer that specifies the starting number of frames. This field’s value cannot exceed the value of the number of frames field in the timecode sample description.



< Previous PageNext Page > Hide TOC


Last updated: 2007-09-04




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice