Add support for scaling textures in AndroidVideoCapturer.

The idea is to also reuse AndroidTextureBuffer::CropAndScale when scaling in the encoder.

BUG=webrtc:4993
R=magjed@webrtc.org

Review URL: https://codereview.webrtc.org/1471333003 .

Cr-Commit-Position: refs/heads/master@{#10802}
This commit is contained in:
Per
2015-11-26 13:41:44 +01:00
parent fd5dae395b
commit a3c20bb9a0
6 changed files with 112 additions and 4 deletions

View File

@ -54,6 +54,12 @@ class AndroidTextureBuffer : public webrtc::NativeHandleBuffer {
~AndroidTextureBuffer();
rtc::scoped_refptr<VideoFrameBuffer> NativeToI420Buffer() override;
rtc::scoped_refptr<AndroidTextureBuffer> CropAndScale(
int cropped_input_width,
int cropped_input_height,
int dst_widht,
int dst_height);
private:
NativeHandleImpl native_handle_;
rtc::Callback0<void> no_longer_used_cb_;