Don't call SetPreviewFormat if capturing to textures.
This fix an issue seen on Huawei Y300 where the camera feed is black and white if we capture to textures and setpreviewformat is called. BUG=webrtc:4993 Review URL: https://codereview.webrtc.org/1502223002 Cr-Commit-Position: refs/heads/master@{#10941}
This commit is contained in:
@ -550,7 +550,10 @@ public class VideoCapturerAndroid extends VideoCapturer implements
|
||||
parameters.setPreviewFpsRange(captureFormat.minFramerate, captureFormat.maxFramerate);
|
||||
}
|
||||
parameters.setPreviewSize(captureFormat.width, captureFormat.height);
|
||||
parameters.setPreviewFormat(captureFormat.imageFormat);
|
||||
|
||||
if (!isCapturingToTexture) {
|
||||
parameters.setPreviewFormat(captureFormat.imageFormat);
|
||||
}
|
||||
// Picture size is for taking pictures and not for preview/video, but we need to set it anyway
|
||||
// as a workaround for an aspect ratio problem on Nexus 7.
|
||||
final android.hardware.Camera.Size pictureSize =
|
||||
|
||||
Reference in New Issue
Block a user