[Mp4-tech] 'version' in mvhd atom in mp4 file

MRUKANT POPAT mrukant.popat rediffmail.com
Thu Aug 26 13:10:44 EDT 2004


An HTML attachment was scrubbed...
URL: /pipermail/mp4-tech/attachments/20040826/d9c44c84/attachment.html
-------------- next part --------------
hi all,
The MOVIEHEADER atom 'mvhd' had following syntax in 14496-1 on page 266 of specification. 
----------------------------------------------------
aligned(8) class MovieHeaderAtom (unsigned int(32) version) extends FullAtom( mvhd , version, 0)
{ 
  if (version==1)
  {
    unsigned int(64) creation-time; 
    unsigned int(64) modification-time;
    unsigned int(32) timescale;
    unsigned int(64) duration; 
  }
  else
  { // version==0 
    unsigned int(32) creation-time; 
    unsigned int(32) modification-time; 
    unsigned int(32) timescale;
    unsigned int(32) duration; 
  }
  const bit(32)reserved = 0x00010000; 
  const bit(16)reserved = 0x0100;
  const bit(16)reserved = 0;
  const unsigned int(32)[2] reserved = 0; 
  const bit(32)[9] reserved = { 0x00010000, 0, 0, 0, 0x00010000, 0, 0, 0, 0x40000000 };
  const bit(32)[6] reserved = 0;
  unsigned int(32) next-track-ID; 
}
----------------------------------------------
looking at the first line of SDL (syntatic definition language), it declares 'version' of 32 bits [unsigned int(32) version], which I think is a typo, because version is used to check if other data-fields are 64 bits or 32 bits inside the mvhd atom and that 'version' is part of definition of 'FullAtom' which ('version') is 8 bits in size.
Can any one comment on it.
regards,
MRUKANT


More information about the Mp4-tech mailing list