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

@ -300,6 +300,8 @@ public class VideoCapturerAndroid extends VideoCapturer implements
// Requests a new output format from the video capturer. Captured frames
// by the camera will be scaled/or dropped by the video capturer.
// It does not matter if width and height are flipped. I.E, |width| = 640, |height| = 480 produce
// the same result as |width| = 480, |height| = 640.
// TODO(magjed/perkj): Document what this function does. Change name?
public void onOutputFormatRequest(final int width, final int height, final int framerate) {
cameraThreadHandler.post(new Runnable() {