mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2025-01-09 13:43:22 +00:00
91 lines
2.5 KiB
Java
91 lines
2.5 KiB
Java
package org.webrtc;
|
|
|
|
import java.nio.ByteBuffer;
|
|
import org.webrtc.VideoFrame;
|
|
|
|
/* loaded from: classes3.dex */
|
|
class WrappedNativeI420Buffer implements VideoFrame.I420Buffer {
|
|
private final ByteBuffer dataU;
|
|
private final ByteBuffer dataV;
|
|
private final ByteBuffer dataY;
|
|
private final int height;
|
|
private final long nativeBuffer;
|
|
private final int strideU;
|
|
private final int strideV;
|
|
private final int strideY;
|
|
private final int width;
|
|
|
|
@Override // org.webrtc.VideoFrame.Buffer
|
|
public int getHeight() {
|
|
return this.height;
|
|
}
|
|
|
|
@Override // org.webrtc.VideoFrame.I420Buffer
|
|
public int getStrideU() {
|
|
return this.strideU;
|
|
}
|
|
|
|
@Override // org.webrtc.VideoFrame.I420Buffer
|
|
public int getStrideV() {
|
|
return this.strideV;
|
|
}
|
|
|
|
@Override // org.webrtc.VideoFrame.I420Buffer
|
|
public int getStrideY() {
|
|
return this.strideY;
|
|
}
|
|
|
|
@Override // org.webrtc.VideoFrame.Buffer
|
|
public int getWidth() {
|
|
return this.width;
|
|
}
|
|
|
|
WrappedNativeI420Buffer(int i, int i2, ByteBuffer byteBuffer, int i3, ByteBuffer byteBuffer2, int i4, ByteBuffer byteBuffer3, int i5, long j) {
|
|
this.width = i;
|
|
this.height = i2;
|
|
this.dataY = byteBuffer;
|
|
this.strideY = i3;
|
|
this.dataU = byteBuffer2;
|
|
this.strideU = i4;
|
|
this.dataV = byteBuffer3;
|
|
this.strideV = i5;
|
|
this.nativeBuffer = j;
|
|
retain();
|
|
}
|
|
|
|
@Override // org.webrtc.VideoFrame.I420Buffer
|
|
public ByteBuffer getDataY() {
|
|
return this.dataY.slice();
|
|
}
|
|
|
|
@Override // org.webrtc.VideoFrame.I420Buffer
|
|
public ByteBuffer getDataU() {
|
|
return this.dataU.slice();
|
|
}
|
|
|
|
@Override // org.webrtc.VideoFrame.I420Buffer
|
|
public ByteBuffer getDataV() {
|
|
return this.dataV.slice();
|
|
}
|
|
|
|
@Override // org.webrtc.VideoFrame.Buffer
|
|
public VideoFrame.I420Buffer toI420() {
|
|
retain();
|
|
return this;
|
|
}
|
|
|
|
@Override // org.webrtc.VideoFrame.Buffer, org.webrtc.RefCounted
|
|
public void retain() {
|
|
JniCommon.nativeAddRef(this.nativeBuffer);
|
|
}
|
|
|
|
@Override // org.webrtc.VideoFrame.Buffer, org.webrtc.RefCounted
|
|
public void release() {
|
|
JniCommon.nativeReleaseRef(this.nativeBuffer);
|
|
}
|
|
|
|
@Override // org.webrtc.VideoFrame.Buffer
|
|
public VideoFrame.Buffer cropAndScale(int i, int i2, int i3, int i4, int i5, int i6) {
|
|
return JavaI420Buffer.cropAndScaleI420(this, i, i2, i3, i4, i5, i6);
|
|
}
|
|
}
|