23 lines
1.1 KiB
Java
23 lines
1.1 KiB
Java
package h0.c;
|
|
|
|
import androidx.annotation.Nullable;
|
|
import org.webrtc.VideoFrame;
|
|
import org.webrtc.VideoProcessor;
|
|
/* compiled from: VideoProcessor */
|
|
public final /* synthetic */ class t0 {
|
|
public static void a(VideoProcessor videoProcessor, VideoFrame videoFrame, VideoProcessor.FrameAdaptationParameters frameAdaptationParameters) {
|
|
VideoFrame b = b(videoFrame, frameAdaptationParameters);
|
|
if (b != null) {
|
|
videoProcessor.onFrameCaptured(b);
|
|
b.release();
|
|
}
|
|
}
|
|
|
|
@Nullable
|
|
public static VideoFrame b(VideoFrame videoFrame, VideoProcessor.FrameAdaptationParameters frameAdaptationParameters) {
|
|
if (frameAdaptationParameters.drop) {
|
|
return null;
|
|
}
|
|
return new VideoFrame(videoFrame.getBuffer().cropAndScale(frameAdaptationParameters.cropX, frameAdaptationParameters.cropY, frameAdaptationParameters.cropWidth, frameAdaptationParameters.cropHeight, frameAdaptationParameters.scaleWidth, frameAdaptationParameters.scaleHeight), videoFrame.getRotation(), frameAdaptationParameters.timestampNs);
|
|
}
|
|
}
|