views:

46

answers:

1

Hi,

Quicktime-, MPEG- or AIFF-files all seem to organize their data elements in 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 a file like that, it's easy to skip to the chunk of interest, because each chunk declares it's own size. Of course, chunks can also be nested.

In the Quicktime world these chunks are called 'Atoms', in MPEG they're called 'Boxes'.

My question: Is there some kind of common API in Mac OSX to navigate and access these chunks? I know it's fairly easy to implement, but I'd rather use something proper than hacking it together myself.

Also, I'm curious if this kind of data structure has a common name other that 'Atoms' or 'Boxes'. To me it seems so simple and useful, it must exist in many other fields besides Quicktime or MPEG.

Thanks, Sebastian

A: 

The only Apple-provided MPEG decoding services that I'm aware of are provided through QuickTime, so the Atoms API would be the common one.

Azeem.Butt