Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Unified Diff: content/browser/renderer_host/media/video_capture_controller.cc

Issue 2428263004: 16 bpp video stream capture, render and createImageBitmap(video) using (CPU) shared memory buffers (Closed)
Patch Set: Split webrtc_depth_capture_browsertest. Thanks phoglund@, Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/media/video_capture_controller.cc
diff --git a/content/browser/renderer_host/media/video_capture_controller.cc b/content/browser/renderer_host/media/video_capture_controller.cc
index 4455c94f01c931ac96272eef71e3b2358be71304..f9c91568fcf6eec2202d3d09e964f68c09409ade 100644
--- a/content/browser/renderer_host/media/video_capture_controller.cc
+++ b/content/browser/renderer_host/media/video_capture_controller.cc
@@ -213,7 +213,8 @@ void VideoCaptureController::AddClient(
// Check that requested VideoCaptureParams are valid and supported. If not,
// report an error immediately and punt.
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_storage != media::PIXEL_STORAGE_CPU) {
// Crash in debug builds since the renderer should not have asked for
// invalid or unsupported parameters.
@@ -416,8 +417,9 @@ void VideoCaptureController::OnIncomingCapturedVideoFrame(
new base::DictionaryValue());
frame->metadata()->MergeInternalValuesInto(metadata.get());
- // Only I420 pixel format is currently supported.
- DCHECK_EQ(frame->format(), media::PIXEL_FORMAT_I420)
+ // Only I420 and Y16 pixel formats are currently supported.
+ DCHECK(frame->format() == media::PIXEL_FORMAT_I420 ||
+ frame->format() == media::PIXEL_FORMAT_Y16)
<< "Unsupported pixel format: "
<< media::VideoPixelFormatToString(frame->format());

Powered by Google App Engine
This is Rietveld 408576698