Commit 68ad7e04 authored by Peter Qiu's avatar Peter Qiu Committed by Commit Bot

Allow client to request NV12 for video capture

The client is using the supported pixel format reported
by the capture device to start capturing, NV12 is
supported by some capture devices on Chrome OS and virtual
capture devices. So we should allow the client to request
NV12 as the capture pixel format.

      device

Bug: b/166284508
Test: Manually on Cast device that use NV12 virtual capture
Change-Id: I8fd713ec46c52f49928bed5fedc51bdcc342c855
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2416757Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Commit-Queue: Peter Qiu <zqiu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#809424}
parent 661292fd
...@@ -294,7 +294,8 @@ void VideoCaptureController::AddClient( ...@@ -294,7 +294,8 @@ void VideoCaptureController::AddClient(
if (!params.IsValid() || if (!params.IsValid() ||
!(params.requested_format.pixel_format == media::PIXEL_FORMAT_I420 || !(params.requested_format.pixel_format == media::PIXEL_FORMAT_I420 ||
params.requested_format.pixel_format == media::PIXEL_FORMAT_Y16 || params.requested_format.pixel_format == media::PIXEL_FORMAT_Y16 ||
params.requested_format.pixel_format == media::PIXEL_FORMAT_ARGB)) { params.requested_format.pixel_format == media::PIXEL_FORMAT_ARGB ||
params.requested_format.pixel_format == media::PIXEL_FORMAT_NV12)) {
// Crash in debug builds since the renderer should not have asked for // Crash in debug builds since the renderer should not have asked for
// invalid or unsupported parameters. // invalid or unsupported parameters.
LOG(DFATAL) << "Invalid or unsupported video capture parameters requested: " LOG(DFATAL) << "Invalid or unsupported video capture parameters requested: "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment