[Python-3000] struni and the Apple four-character-codes

Guido van Rossum guido at python.org
Mon Jul 30 19:09:27 CEST 2007


On 7/29/07, Jack Jansen <Jack.Jansen at cwi.nl> wrote:
> One minor point (that may already have been addressed, I've not seen
> the whole discussion): note that 4CCs not only occur on the Mac but
> also in various other contexts: AIFF files use 4CCs to define chunk
> types, MP4 files use them for a gazillion different things (media
> types, codec types, etc). Actually, codec types are generally defined
> by their 4CC, and some times these even get to be used as their
> mainstream name (divx and xvid).
>
> It may be worthwhile to add generalized support somewhere to handle
> converting 4CCs from readable to binary representation. And, of
> course, the world being as it is some formats (Mac OSTypes, for
> example, and probably quicktime/mp4 as well, but I'm not sure)
> represent 4CCs in big-endian order, others (AIFF) in little-endian.

And some support both, detecting the byte order from the 4CC. (This
excludes palindromic 4CCs. :-)

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list