com.itshidu.ffmpeg.nut.Stream Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ffmpeg-java Show documentation
Show all versions of ffmpeg-java Show documentation
Java Interface for FFmpeg Command-line
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];
}
}