GetBox() public static method

public static GetBox ( byte boxBytes, int &start, int end ) : Box
boxBytes byte
start int
end int
return Box
コード例 #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);
             }
         }
     }
 }
コード例 #2
0
 public MovieFragmentBox(byte[] boxBytes, int start, int end) : base(ID.moof)
 {
     while (start < end)
     {
         Box box = Mp4Utils.GetBox(boxBytes, ref start, end);
         if (box == null)
         {
         }
         else if (box.ID == ID.traf)
         {
             this.traf = (box as TrackFragmentBox);
         }
         else if (box.ID == ID.mfhd)
         {
             this.mfhd = (box as MovieFragmentHeaderBox);
         }
     }
 }
コード例 #3
0
 public Fragment(byte[] boxBytes, int start, int end)
 {
     while (start < end)
     {
         Box box = Mp4Utils.GetBox(boxBytes, ref start, end);
         if (box == null)
         {
         }
         else if (box.ID == ID.mdat)
         {
             this.mdat = (box as MediaDataBox);
         }
         else if (box.ID == ID.moof)
         {
             this.moof = (box as MovieFragmentBox);
         }
     }
 }