32 lines
779 B
Java
32 lines
779 B
Java
package org.jcodec.common;
|
|
|
|
import java.nio.ByteBuffer;
|
|
import org.jcodec.common.model.ColorSpace;
|
|
import org.jcodec.common.model.Picture;
|
|
|
|
public abstract class VideoEncoder {
|
|
public abstract EncodedFrame encodeFrame(Picture paramPicture, ByteBuffer paramByteBuffer);
|
|
|
|
public abstract ColorSpace[] getSupportedColorSpaces();
|
|
|
|
public abstract int estimateBufferSize(Picture paramPicture);
|
|
|
|
public static class EncodedFrame {
|
|
private ByteBuffer data;
|
|
|
|
private boolean keyFrame;
|
|
|
|
public EncodedFrame(ByteBuffer data, boolean keyFrame) {
|
|
this.data = data;
|
|
this.keyFrame = keyFrame;
|
|
}
|
|
|
|
public ByteBuffer getData() {
|
|
return this.data;
|
|
}
|
|
|
|
public boolean isKeyFrame() {
|
|
return this.keyFrame;
|
|
}
|
|
}
|
|
}
|