Example #1
0
 public int WriteToByteArray(Byte[] dest, int offset)
 {
     bool isRoot = this.AtomCode == null; // このnodeListがルートかどうか
     int bodyLen = WriteBodyToByteArray(dest, offset + (isRoot ? 0 : 8));
     if (!isRoot)
     {
         MP4.UIn32ToBE((UInt32)(bodyLen + 8), dest, offset);
         dest[offset + 4] = AtomCode[0];
         dest[offset + 5] = AtomCode[1];
         dest[offset + 6] = AtomCode[2];
         dest[offset + 7] = AtomCode[3];
     }
     return bodyLen + (isRoot ? 0 : 8);
 }