Esempio n. 1
0
        protected override void SaveToStream(Stream stream)
        {
            base.SaveToStream(stream);

            stream.WriteBEUInt32((uint)Entries.Length);

            for (int i = 0; i < Entries.Length; i++)
            {
                ref SampleToChunkEntry entry = ref Entries[i];

                stream.WriteBEUInt32(entry.FirstChunk);
                stream.WriteBEUInt32(entry.SamplesPerChunk);
                stream.WriteBEUInt32(entry.SampleDescriptionIndex);
            }
Esempio n. 2
0
        protected override void LoadFromStream(Stream stream)
        {
            base.LoadFromStream(stream);

            uint entryCount = stream.ReadBEUInt32();

            Entries = new SampleToChunkEntry[entryCount];

            for (uint i = 0; i < entryCount; i++)
            {
                Entries[i] = new SampleToChunkEntry(
                    firstChunk: stream.ReadBEUInt32(),
                    samplesPerChunk: stream.ReadBEUInt32(),
                    sampleDescriptionIndex: stream.ReadBEUInt32()
                    );
            }
        }