public class VideoFrame extends java.lang.Object implements RefCounted
限定符和类型 | 类和说明 |
---|---|
static interface |
VideoFrame.Buffer
Implements image storage medium.
|
static interface |
VideoFrame.I420Buffer
Interface for I420 buffers.
|
static interface |
VideoFrame.TextureBuffer
Interface for buffers that are stored as a single texture, either in OES or RGB format.
|
构造器和说明 |
---|
VideoFrame(VideoFrame.Buffer buffer,
int rotation,
long timestampNs)
Constructs a new VideoFrame backed by the given
buffer . |
限定符和类型 | 方法和说明 |
---|---|
static VideoFrame.Buffer |
cropAndScaleI420(VideoFrame.I420Buffer buffer,
int cropX,
int cropY,
int cropWidth,
int cropHeight,
int scaleWidth,
int scaleHeight) |
VideoFrame.Buffer |
getBuffer() |
int |
getRotatedHeight() |
int |
getRotatedWidth() |
int |
getRotation()
Rotation of the frame in degrees.
|
long |
getTimestampNs()
Timestamp of the frame in nano seconds.
|
void |
release()
Decreases ref count by one.
|
void |
retain()
Increases ref count by one.
|
public VideoFrame(VideoFrame.Buffer buffer, int rotation, long timestampNs)
buffer
.public VideoFrame.Buffer getBuffer()
public int getRotation()
public long getTimestampNs()
public int getRotatedWidth()
public int getRotatedHeight()
public void retain()
RefCounted
retain
在接口中 RefCounted
public void release()
RefCounted
release
在接口中 RefCounted
public static VideoFrame.Buffer cropAndScaleI420(VideoFrame.I420Buffer buffer, int cropX, int cropY, int cropWidth, int cropHeight, int scaleWidth, int scaleHeight)