protected void getContent(IsoOutputStream os) throws IOException {
    os.writeUInt32(trackId);
    long temp;
    temp = reserved << 6;
    temp = temp | ((lengthSizeOfTrafNum & 0x3) << 4);
    temp = temp | ((lengthSizeOfTrunNum & 0x3) << 2);
    temp = temp | (lengthSizeOfSampleNum & 0x3);
    os.writeUInt32(temp);
    os.writeUInt32(entries.size());

    for (Entry entry : entries) {
      if (getVersion() == 1) {
        os.writeUInt64(entry.time);
        os.writeUInt64(entry.moofOffset);
      } else {
        os.writeUInt32(entry.time);
        os.writeUInt32(entry.moofOffset);
      }
      os.write(toByteArray(lengthSizeOfTrafNum + 1, entry.trafNumber));
      os.write(toByteArray(lengthSizeOfTrunNum + 1, entry.trunNumber));
      os.write(toByteArray(lengthSizeOfSampleNum + 1, entry.sampleNumber));
    }
  }
示例#2
0
 protected void getContent(IsoOutputStream isos) throws IOException {
   isos.writeIso639(language);
   isos.writeStringZeroTerm(title);
 }
 protected void getContent(IsoOutputStream os) throws IOException {
   os.writeStringNoTerm(dataReferenceType);
   os.writeUInt32(dataReferenceSize);
   os.writeStringNoTerm(dataReference);
 }
 protected void getContent(IsoOutputStream isos) throws IOException {
   isos.write(IsoFile.fourCCtoBytes(classificationEntity));
   isos.writeUInt16(classificationTableIndex);
   isos.writeIso639(language);
   isos.writeStringZeroTerm(classificationInfo);
 }
 protected void getContent(IsoOutputStream os) throws IOException {
   os.writeUInt32(maxSamplePerFrame);
   os.writeUInt8(unknown1);
   os.writeUInt8(sampleSize);
   os.writeUInt8(historyMult);
   os.writeUInt8(initialHistory);
   os.writeUInt8(kModifier);
   os.writeUInt8(channels);
   os.writeUInt16(unknown2);
   os.writeUInt32(maxCodedFrameSize);
   os.writeUInt32(bitRate);
   os.writeUInt32(sampleRate);
 }