Android: Add support for cropping textures
BUG=b/28622232 R=glaznev@webrtc.org, nisse@webrtc.org Review URL: https://codereview.webrtc.org/1965953003 . Cr-Commit-Position: refs/heads/master@{#12720}
This commit is contained in:
@ -683,9 +683,9 @@ int32_t MediaCodecVideoEncoder::EncodeOnCodecThread(
|
||||
if (frame.video_frame_buffer()->native_handle() != nullptr) {
|
||||
rtc::scoped_refptr<webrtc::VideoFrameBuffer> scaled_buffer(
|
||||
static_cast<AndroidTextureBuffer*>(
|
||||
frame.video_frame_buffer().get())->ScaleAndRotate(
|
||||
scaled_resolution.width,
|
||||
scaled_resolution.height,
|
||||
frame.video_frame_buffer().get())->CropScaleAndRotate(
|
||||
frame.width(), frame.height(),
|
||||
scaled_resolution.width, scaled_resolution.height,
|
||||
webrtc::kVideoRotation_0));
|
||||
input_frame.set_video_frame_buffer(scaled_buffer);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user