public Mp4File(Mp4Stream stream, Mp4BoxFactory factory, bool moovOnly) { this.Boxes = new List <Mp4Box>(); bool flag = true; while (flag) { long position = stream.Position; Mp4Box item = factory.Read(stream); if (item != null) { this.Boxes.Add(item); if (item.Type == Mp4BoxType.MOOV) { this.Movie = new Mp4Movie((Mp4MoovBox)item, stream); if (moovOnly) { flag = false; } } else if (item.Type == Mp4BoxType.FTYP) { this.FileType = (Mp4FtypBox)item; } else if ((item.Type == Mp4BoxType.MDAT) && (this.Movie == null)) { this.MoovIsBeforeMdat = false; } } else { flag = false; } } }
public Mp4RtpHintSampleEntry(uint size, Mp4Stream stream, Mp4BoxFactory factory) : base(size, Mp4BoxType.RTP_) { uint fieldsSize = this.GetFieldsSize(); this.ReadFields(stream); base.ReadChildren(stream, factory, (long)((size - 8) - fieldsSize)); }
public Mp4AudioSampleEntry(uint size, uint format, Mp4Stream stream, Mp4BoxFactory factory) : base(size, format) { this.ReadFields(stream); uint fieldsSize = this.GetFieldsSize(); base.ReadChildren(stream, factory, (long)((size - 8) - fieldsSize)); }
public Mp4MpegAudioSampleEntry(uint size, uint type, Mp4Stream stream, Mp4BoxFactory factory) : base(size, type, stream, factory) { this.Esds = base.GetChild <Mp4EsdsBox>(Mp4BoxType.ESDS); if ((this.Esds == null) && (base.QtVersion > 0)) { this.Esds = this.FindChild <Mp4EsdsBox>("wave/esds"); } }
public Mp4VisualSampleEntry(uint size, uint format, Mp4Stream stream, Mp4BoxFactory factory) : base(size, format) { this.Predefined2 = new byte[12]; uint fieldsSize = this.GetFieldsSize(); this.ReadFields(stream); base.ReadChildren(stream, factory, (long)((size - 8) - fieldsSize)); }
public Mp4SampleEntry(uint size, uint type, Mp4Stream stream, Mp4BoxFactory factory) : base(size, type) { this.Reserved = new byte[6]; uint fieldsSize = this.GetFieldsSize(); this.ReadFields(stream); base.ReadChildren(stream, factory, (long)((size - 8) - fieldsSize)); }
public void ReadChildren(Mp4Stream stream, Mp4BoxFactory factory, long size) { this.Children = new List <Mp4Box>(); Mp4Box item = null; long bytesAvailable = size; factory.PushContext(base.Type); while ((bytesAvailable > 0L) && ((item = factory.Read(stream, ref bytesAvailable)) != null)) { item.Parent = this; this.Children.Add(item); } factory.PopContext(); }
public Mp4DrefBox(uint size, Mp4Stream stream, Mp4BoxFactory factory) : base(size, Mp4BoxType.DREF, 0L, stream) { uint num = stream.ReadUInt32(); this.Entries = new List <Mp4Box>((int)num); uint num2 = num; long bytesAvailable = (size - 12) - 4; while (num2-- > 0) { Mp4Box item = null; while ((item = factory.Read(stream, ref bytesAvailable)) != null) { this.Entries.Add(item); } } }
public Mp4StsdBox(uint size, Mp4Stream stream, Mp4BoxFactory factory) : base(size, Mp4BoxType.STSD, 0L, stream) { uint num = stream.ReadUInt32(); factory.PushContext(base.Type); long bytesAvailable = (size - 12) - 4; this.Entries = new List <Mp4Box>((int)num); for (int i = 0; i < num; i++) { Mp4Box item = factory.Read(stream, ref bytesAvailable); if (item != null) { this.Entries.Add(item); } } factory.PopContext(); }
public Mp4EncvSampleEntry(uint size, uint type, Mp4Stream stream, Mp4BoxFactory factory) : base(size, type, stream, factory) { }
public Mp4MoofBox(uint size, Mp4Stream stream, Mp4BoxFactory factory) : base(size, Mp4BoxType.MOOF, 0L, stream, factory) { }
public Mp4Hvc1SampleEntry(uint size, Mp4Stream stream, Mp4BoxFactory factory) : base(size, Mp4BoxType.HVC1, stream, factory) { this.HvccBox = base.GetChild <Mp4HvccBox>(Mp4BoxType.HVCC); }
public Mp4Mp4aSampleEntry(uint size, Mp4Stream stream, Mp4BoxFactory factory) : base(size, Mp4BoxType.MP4A, stream, factory) { }
public Mp4TrakBox(uint size, Mp4Stream stream, Mp4BoxFactory factory) : base(size, Mp4BoxType.TRAK, 0L, stream, factory) { this.TkhdBox = this.FindChild <Mp4TkhdBox>("tkhd"); this.MdhdBox = this.FindChild <Mp4MdhdBox>("mdia/mdhd"); }
public Mp4File(Mp4Stream stream, Mp4BoxFactory factory) : this(stream, factory, false) { }
public Mp4EdtsBox(uint size, Mp4Stream stream, Mp4BoxFactory factory) : base(size, Mp4BoxType.EDTS, 0L, stream, factory) { }
public Mp4MetaBox(uint size, Mp4Stream stream, Mp4BoxFactory factory) : base(size, Mp4BoxType.META, 0L, stream, factory) { }
public Mp4MvexBox(uint size, Mp4Stream stream, Mp4BoxFactory factory) : base(size, Mp4BoxType.MVEX, 0L, stream, factory) { }
public Mp4EncvSampleEntry(uint size, Mp4Stream stream, Mp4BoxFactory factory) : this(size, Mp4BoxType.ENCV, stream, factory) { }
public Mp4DrmiSampleEntry(uint size, Mp4Stream stream, Mp4BoxFactory factory) : base(size, Mp4BoxType.DRMI, stream, factory) { }
public Mp4MoovBox(uint size, ulong largeSize, Mp4Stream stream, Mp4BoxFactory factory) : base(size, Mp4BoxType.MOOV, largeSize, stream, factory) { }
public Mp4ContainerBox(uint size, uint type, ulong largeSize, Mp4Stream stream, Mp4BoxFactory factory) : base(size, type, largeSize) { if (this.HeaderSize == 12) { stream.Position += 4L; } this.ReadChildren(stream, factory, size - this.HeaderSize); }
public Mp4StblBox(uint size, Mp4Stream stream, Mp4BoxFactory factory) : base(size, Mp4BoxType.STBL, 0L, stream, factory) { }
public Mp4TrefBox(uint size, Mp4Stream stream, Mp4BoxFactory factory) : base(size, Mp4BoxType.TREF, 0L, stream, factory) { }
public Mp4DinfBox(uint size, Mp4Stream stream, Mp4BoxFactory factory) : base(size, Mp4BoxType.DINF, 0L, stream, factory) { }