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

org.jcodec.common.model.AudioFrame Maven / Gradle / Ivy

There is a newer version: 0.2.5
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy