Esempio n. 1
0
 @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;
   }
 }
  @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);
  }
 @Override
 public void decode(MP4InputStream in) throws IOException {
   originalFormat = in.readBytes(4);
 }
Esempio n. 4
0
  @Override
  public void decode(MP4InputStream in) throws IOException {
    decodeCommon(in);

    framesPerSample = in.read();
  }