Sample Description Endianness

Q: What is the endianness of the QuickTime Sample Description structures and their extensions?

A: Sample description structures store information that allows QuickTime to decode media samples. The data stored in the sample description structure will vary depending on the media type it is describing. For example, in the case of video media, the sample descriptions are image description structures.

Sample description structures are always native-endian.

QuickTime will flip sample descriptions appropriately for storage in movie files (.mov). Sample description are always big-endian in the movie file.

Sample description extensions are always big-endian.

The low-level Sample Description Extension APIs; GetSoundDescriptionExtension, AddSoundDescriptionExtension, GetImageDescriptionExtension and AddImageDescriptionExtension always take and return big-endian data.

The higher-level property based APIs for accessing Sample Description Extensions (added in QuickTime 7.0); QTSoundDescriptionGetProperty, QTSoundDescriptionSetProperty, ICMImageDescriptionGetProperty and ICMImageDescriptionSetProperty know the details of the data they're accessing and therefore present native-endian interfaces.

Developers are encouraged to use the modern property based APIs when working with Sample Description Extensions thereby eliminating endian concerns.

References

Media Data Atom Types

Back to Top 

Document Revision History

DateNotes
2008-03-17First Version

Posted: 2008-03-17


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.