Пример #1
0
 public void ToBuffer(ref FMp4MessagePackWriter writer)
 {
     Start(ref writer);
     if (TrackFragmentRandomAccessBox != null)
     {
         TrackFragmentRandomAccessBox.ToBuffer(ref writer);
     }
     if (MovieFragmentRandomAccessOffsetBox != null)
     {
         MovieFragmentRandomAccessOffsetBox.ToBuffer(ref writer);
     }
     End(ref writer);
 }
        public void ToBuffer(ref FMp4MessagePackWriter writer)
        {
            Start(ref writer);
            if (TrackFragmentRandomAccessBox != null)
            {
                TrackFragmentRandomAccessBox.ToBuffer(ref writer);
            }
            if (MovieFragmentRandomAccessOffsetBox != null)
            {
                MovieFragmentRandomAccessOffsetBox.ToBuffer(ref writer);
            }
            End(ref writer);
            var mfraSizePosition = writer.GetMfraSizePosition();

            if (mfraSizePosition > 0)
            {
                writer.WriteInt32Return(writer.GetCurrentPosition() - SizePosition, mfraSizePosition);
                writer.ClearMfraSizePosition();
            }
        }