public override bool Parse(QtParser parser) { if (!base.Parse(parser)) { return(false); } // This atom is not flagged a full atom to be able to parse the // version byte over here. To preserve memory, // the version byte is not made available in QtAtom. byte version = parser.GetByte(QtAtom.Attribute.Version); ParseFlags(parser); if (version == 1) { parser.GetLongDateTime(Attribute.CreationTime, "{0:F}"); parser.GetLongDateTime(Attribute.ModificationTime, "{0:F}"); parser.GetUInt(Attribute.TimeScale); parser.GetULong(Attribute.Duration); } else // version == 0 { parser.GetDateTime(Attribute.CreationTime, "{0:F}"); parser.GetDateTime(Attribute.ModificationTime, "{0:F}"); parser.GetUInt(Attribute.TimeScale); parser.GetUInt(Attribute.Duration); } parser.GetFixed16_16(Attribute.PreferredRate); parser.GetFixed8_8(Attribute.PreferredVolume); parser.GetUShort(Attribute.Reserved); parser.GetUInt(Attribute.Reserved); parser.GetUInt(Attribute.Reserved); Matrix matrix = parser.GetMatrix(Attribute.MatrixStructure); // Matrix check from From ISO_IEC_15444-12_2005 Base Media File Format parser.CheckAttribute(Attribute.MatrixStructure, matrix.U == 0.0, false); parser.CheckAttribute(Attribute.MatrixStructure, matrix.V == 0.0, false); parser.CheckAttribute(Attribute.MatrixStructure, matrix.W == 1.0, false); parser.GetUInt(Attribute.PreviewTime); parser.GetUInt(Attribute.PreviewDuration); parser.GetUInt(Attribute.PosterTime); parser.GetUInt(Attribute.SelectionTime); parser.GetUInt(Attribute.SelectionDuration); parser.GetUInt(Attribute.CurrentTime); uint nextTrackID = parser.GetUInt(Attribute.NextTrackID); parser.CheckAttribute(Attribute.NextTrackID, nextTrackID != 0, false); return(this.Valid); }
public override bool Parse(QtParser parser) { if (!base.Parse(parser)) { return(false); } parser.GetDateTime(Attribute.CreationTime, "{0:F}"); parser.GetDateTime(Attribute.ModificationTime, "{0:F}"); parser.GetUInt(Attribute.Timescale); parser.GetUInt(Attribute.Duration); // TODO Language parser.GetUShort(Attribute.Language); // codes < 0x800 Macintosh language codes // codes >= 0x800 ISO language codes parser.GetUShort(Attribute.Quality); return(this.Valid); }