org.jcodec.common.model.AudioFrame Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jcodec Show documentation
Show all versions of jcodec Show documentation
Pure Java implementation of video/audio codecs and formats
package org.jcodec.common.model;
import java.nio.ByteBuffer;
import javax.sound.sampled.AudioFormat;
/**
* This class is part of JCodec ( www.jcodec.org ) This software is distributed
* under FreeBSD License
*
* @author The JCodec project
*
*/
public class AudioFrame extends AudioBuffer {
private long pts;
private long duration;
private long timescale;
private int frameNo;
public AudioFrame(AudioBuffer other, long pts, long duration, long timescale, int frameNo) {
super(other);
this.pts = pts;
this.duration = duration;
this.timescale = timescale;
this.frameNo = frameNo;
}
public AudioFrame(ByteBuffer buffer, AudioFormat format, int nFrames, long pts, long duration, long timescale, int frameNo) {
super(buffer, format, nFrames);
this.pts = pts;
this.duration = duration;
this.timescale = timescale;
this.frameNo = frameNo;
}
public long getPts() {
return pts;
}
public long getDuration() {
return duration;
}
public long getTimescale() {
return timescale;
}
public int getFrameNo() {
return frameNo;
}
}