コード例 #1
0
ファイル: FileTypeBox.java プロジェクト: Tyf0n/musique
 @Override
 public void decode(MP4InputStream in) throws IOException {
   majorBrand = in.readString(4);
   minorVersion = in.readString(4);
   left -= 8;
   compatibleBrands = new String[(int) left / 4];
   for (int i = 0; i < compatibleBrands.length; i++) {
     compatibleBrands[i] = in.readString(4);
     left -= 4;
   }
 }
コード例 #2
0
  @Override
  public void decode(MP4InputStream in) throws IOException {
    super.decode(in);

    trackID = in.readBytes(4);

    // optional fields
    baseDataOffsetPresent = ((flags & 1) == 1);
    baseDataOffset = baseDataOffsetPresent ? in.readBytes(8) : 0;

    sampleDescriptionIndexPresent = ((flags & 2) == 2);
    sampleDescriptionIndex = sampleDescriptionIndexPresent ? in.readBytes(4) : 0;

    defaultSampleDurationPresent = ((flags & 8) == 8);
    defaultSampleDuration = defaultSampleDurationPresent ? in.readBytes(4) : 0;

    defaultSampleSizePresent = ((flags & 16) == 16);
    defaultSampleSize = defaultSampleSizePresent ? in.readBytes(4) : 0;

    defaultSampleFlagsPresent = ((flags & 32) == 32);
    defaultSampleFlags = defaultSampleFlagsPresent ? in.readBytes(4) : 0;

    durationIsEmpty = ((flags & 0x10000) == 0x10000);
  }
コード例 #3
0
 @Override
 public void decode(MP4InputStream in) throws IOException {
   originalFormat = in.readBytes(4);
 }
コード例 #4
0
  @Override
  public void decode(MP4InputStream in) throws IOException {
    decodeCommon(in);

    framesPerSample = in.read();
  }