13.07.2015 Views

Quicktime File Format (2012-08-14).pdf

Quicktime File Format (2012-08-14).pdf

Quicktime File Format (2012-08-14).pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Movie AtomsCompressed Movie ResourcesCompressing movie resources using data compression typically reduces the size of the movie resource by 50%or more. For QuickTime movies that are streamed over the Internet, this can substantially reduce the startuplatency of the movie, and therefore has a number of distinct advantages.Allowing QuickTime to Compress the Movie ResourceMost application developers won’t need to know the details of how movie resources are compressed. TheMovie Toolbox FlattenMovie and FlattenMovieData functions compress the movie resource if so requestedby the application. To accomplish this, applications only need to set the flattenCompressMovieResourceflag when calling either function. The QuickTime movie export component also provides users with the optionof compressing the movie resource when exporting or creating a new movie through export.Structure of a Compressed Movie ResourceA compressed movie resource, similar to an uncompressed movie resource, is made up of a group of QuickTimeatoms arranged in a hierarchy.Like an uncompressed movie resource, the outermost atom is a movie atom. Within the movie atom, there isa single compressed movie atom, which contains all other required atoms. The compressed movie atom hastwo sub atoms. The first is a data compression atom, which contains a single 32-bit integer that identifies whatlossless data compression algorithm was used to compress the movie resource. The second child atom is thecompressed movie data, which contains the compressed movie resource itself. The first 32-bit integer in thecompressed movie data atom indicates the uncompressed size of the movie resource, and then the compressedmovie resource data follows.The contents of a complete compressed movie are shown in Table 2-5 (page 118). The constants that definethe atom types are defined in Movies<strong>Format</strong>.h. The four-character codes for each atom type are also shown.Table 2-5Atom typeMovieContents of complete compressed movieFour-character code'moov'Compressed movieData compression atomCompressed movie data32-bit integer'cmov''dcom''cmvd'Uncompressed size<strong>2012</strong>-<strong>08</strong>-<strong>14</strong> | © 2004, <strong>2012</strong> Apple Inc. All Rights Reserved.118

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!