All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.itshidu.ffmpeg.nut.Stream Maven / Gradle / Ivy

The newest version!
package com.itshidu.ffmpeg.nut;

import org.apache.commons.lang3.math.Fraction;

import java.io.IOException;

public class Stream {
  final StreamHeaderPacket header;

  final Fraction timeBase;
  long last_pts = 0;

  public Stream(MainHeaderPacket header, StreamHeaderPacket streamHeader) throws IOException {
    this.header = streamHeader;
    if (streamHeader.timeBaseId >= header.timeBase.length) {
      throw new IOException(
          "Invalid timeBaseId " + streamHeader.timeBaseId + " must be < " + header.timeBase.length);
    }
    this.timeBase = header.timeBase[streamHeader.timeBaseId];
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy