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

Unified Diff: content/renderer/media/video_capture_impl.cc

Issue 2121043002: 16 bpp video stream capture, render and WebGL usage - Realsense R200 & SR300 support. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/renderer/media/video_capture_impl.cc
diff --git a/content/renderer/media/video_capture_impl.cc b/content/renderer/media/video_capture_impl.cc
index 1ccd6c63fce441a6407db674e1a7754a12014ffb..26d8bd47abbfb7c440beea618d4899c20a136585 100644
--- a/content/renderer/media/video_capture_impl.cc
+++ b/content/renderer/media/video_capture_impl.cc
@@ -311,12 +311,16 @@ void VideoCaptureImpl::OnBufferReceived(
const gfx::Rect& visible_rect) {
DCHECK(io_task_runner_->BelongsToCurrentThread());
if (state_ != VIDEO_CAPTURE_STATE_STARTED || suspended_ ||
- pixel_format != media::PIXEL_FORMAT_I420 ||
+ (pixel_format != media::PIXEL_FORMAT_I420 &&
+ (pixel_format != media::PIXEL_FORMAT_Y16 ||
+ storage_type != media::VideoFrame::STORAGE_SHMEM)) ||
(storage_type != media::VideoFrame::STORAGE_SHMEM &&
storage_type != media::VideoFrame::STORAGE_GPU_MEMORY_BUFFERS)) {
// Crash in debug builds since the host should not have provided a buffer
// with an unsupported pixel format or storage type.
- DCHECK_EQ(media::PIXEL_FORMAT_I420, pixel_format);
+ DCHECK(media::PIXEL_FORMAT_I420 == pixel_format ||
+ (media::PIXEL_FORMAT_Y16 == pixel_format &&
+ storage_type == media::VideoFrame::STORAGE_SHMEM));
DCHECK(storage_type == media::VideoFrame::STORAGE_SHMEM ||
storage_type == media::VideoFrame::STORAGE_GPU_MEMORY_BUFFERS);
Send(new VideoCaptureHostMsg_BufferReady(device_id_, buffer_id,

Powered by Google App Engine
This is Rietveld 408576698