Example #1
0
 public TrackFragmentBox(byte[] boxBytes, int start, int end) : base(ID.traf)
 {
     while (start < end)
     {
         Box box = Mp4Utils.GetBox(boxBytes, ref start, end);
         if (box != null)
         {
             ID iD = box.ID;
             if (iD == ID.tfhd)
             {
                 this.tfhd = (box as TrackFragmentHeaderBox);
             }
             else if (iD == ID.sdtp)
             {
                 this.sdtp = (box as SampleDependencyTypeBox);
             }
             else if (iD == ID.trun)
             {
                 this.trun = (box as TrackRunBox);
             }
             else if (iD == ID.tfrf)
             {
                 this.tfrf = (box as TfrfBox);
             }
             else if (iD == ID.tfxd)
             {
                 this.tfxd = (box as TfxdBox);
             }
         }
     }
 }
Example #2
0
 public TrackFragmentBox(byte[] boxBytes, int start, int end)
     : base(ID.traf)
 {
     while (start < end) {
     Box box = Mp4Utils.GetBox(boxBytes, ref start, end);
     if (box != null) {
       ID iD = box.ID;
       if (iD == ID.tfhd) {
     this.tfhd = (box as TrackFragmentHeaderBox);
       } else if (iD == ID.sdtp) {
     this.sdtp = (box as SampleDependencyTypeBox);
       } else if (iD == ID.trun) {
     this.trun = (box as TrackRunBox);
       } else if (iD == ID.tfrf) {
     this.tfrf = (box as TfrfBox);
       } else if (iD == ID.tfxd) {
     this.tfxd = (box as TfxdBox);
       }
     }
       }
 }