[openbeos] Re: Implementing MP4

  • From: "François Revol" <revol@xxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Tue, 05 Jul 2005 14:26:07 +0200 CEST

> > 
> > Can't B_MPEG_FORMAT_FAMILY be reused there?
> > I dunno how much MPEG4 differ from MPEG2 & MPEG1, but at least they 
> > all share
> > the same MPEG format family links, right?
> 
> Possibly but the media_mpeg_description is defined as a single id 
> with 
> an enumeration

that one is defined for the .mpg format, not for a format using 4CCs.

> but MPEG-4 needs something more like the quicktime one
> 
> typedef struct { 
>         uint32 codec; 
>         uint32 vendor; 
> } media_quicktime_description; 
> 
> where codec is the quicktime fourcc type and vendor is the vendor 
> code 
> from the file.

MP4 uses 4CCS just like QT.
There is no reason not to use that, besides, MP4 really is QT 
with some twists.
Also, libavformat doesn't have a separate list of 4CCs for mov and mp4.

> Possibly, I am not sure how usefull vendor is but the enum for 
> mpeg_id 
> would concern me if we started placing codec values in the id.

Usually it's 0. You could try to use '.MP4' to differentiate official 
MP4 
codes from QT, but I don't think it's useful.

> Does adding something to an enum cause an issue?  I think the 
no.

> GetMP4FormatFor function would just be a usefull to have but not 
> essential since there is a generic MakeFormatFor function.  It looks 
The Get*FormatFor() are not virtual anyway, so adding them isn't big 
deal.

> like there is room in the union for more structs.

Yes.


François.


Other related posts: