1 package com.netease.nimlib.sdk.avchat.video;
5 public abstract class AVChatBuffer implements VideoFrame.Buffer {
7 private final VideoFrame.Buffer buffer;
15 return buffer.getWidth();
20 return buffer.getHeight();
26 return buffer.getFormat();
31 public VideoFrame.Buffer
mirror(
boolean mirrorVertical,
boolean mirrorHorizontal){
32 return buffer.mirror(mirrorVertical,mirrorHorizontal);
36 public VideoFrame.Buffer
rotate(
int rotation){
37 return buffer.rotate(rotation);
41 public VideoFrame.I420Buffer
toI420() {
42 return buffer.toI420();
46 public VideoFrame.Buffer
toFormat(
int format) {
47 return buffer.toFormat(format);
67 VideoFrame.Buffer out = buffer.cropAndScale(cropX,
77 if (buffer instanceof VideoFrame.I420Buffer) {
79 }
else if (buffer instanceof VideoFrame.TextureBuffer) {
VideoFrame.Buffer toFormat(int format)
AVChatBuffer cropAndScale(int cropX, int cropY, int cropWidth, int cropHeight, int scaleWidth, int scaleHeight)
VideoFrame.Buffer mirror(boolean mirrorVertical, boolean mirrorHorizontal)
VideoFrame.Buffer rotate(int rotation)
VideoFrame.I420Buffer toI420()
void toBytes(byte[] target)