OSX API for accessing data structures like Quicktime atoms or MPEG boxes

Quicktime, MPEG- or AIFF files all seem to organize their data items into chunks like this:

0x00 chunk 1 header (size as UInt32 + ID as 4-char-code)
0x08 chunk 1 data
...
0xA0 chunk 2 header
0xA8 chunk 2 data
...
and so on.

      

When reading such a file, it is easy to jump to the chunk of interest, because each chunk declares its own size. Of course, chunks can also be nested.

In the Quicktime world these chunks are called "atoms", in MPEG they are called "boxes".

My question is: Is there some common API in Mac OSX to navigate and access these chunks? I know this is pretty easy to implement, but I'd rather use something proper than hack it together.

Also, I'm curious if such a data structure has a common name, another "Atoms" or "Boxes". It seems so simple and useful to me, it should exist in many other areas besides Quicktime or MPEG.

Thanks, Sebastian

+2


source to share


1 answer


The only Apple-provided MPEG decoding services I know of are through QuickTime, so the Atoms API will be generic.



0


source







All Articles