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

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

Issue 2428263004: 16 bpp video stream capture, render and createImageBitmap(video) using (CPU) shared memory buffers (Closed)
Patch Set: review #30 fix. Thanks danakj@. Created 4 years, 2 months 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_manager.cc
diff --git a/content/browser/renderer_host/media/video_capture_manager.cc b/content/browser/renderer_host/media/video_capture_manager.cc
index daaa731f957afec1cbabe60072bd62d5394ec99a..0d0d48b6805d210b856335039f7483e85942df1c 100644
--- a/content/browser/renderer_host/media/video_capture_manager.cc
+++ b/content/browser/renderer_host/media/video_capture_manager.cc
@@ -89,9 +89,11 @@ void ConsolidateCaptureFormats(media::VideoCaptureFormats* formats) {
formats->erase(last, formats->end());
// Mark all formats as I420, since this is what the renderer side will get
// anyhow: the actual pixel format is decided at the device level.
+ // Don't do this for Y16 format as it is handled separatelly.
for (media::VideoCaptureFormats::iterator it = formats->begin();
it != formats->end(); ++it) {
- it->pixel_format = media::PIXEL_FORMAT_I420;
+ if (it->pixel_format != media::PIXEL_FORMAT_Y16)
+ it->pixel_format = media::PIXEL_FORMAT_I420;
}
mcasas 2016/10/25 22:44:43 Ugh, old code! Suggestion: for (const auto form
aleksandar.stojiljkovic 2016/10/26 14:02:18 Thanks. Done.
}

Powered by Google App Engine
This is Rietveld 408576698