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

Side by Side Diff: content/browser/renderer_host/media/video_capture_device_client.cc

Issue 1036063002: MEDIASUBTYPE_RGB32 support for Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/media/video_capture_device_client.h" 5 #include "content/browser/renderer_host/media/video_capture_device_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "content/browser/renderer_host/media/video_capture_buffer_pool.h" 10 #include "content/browser/renderer_host/media/video_capture_buffer_pool.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 #if defined(OS_WIN) 156 #if defined(OS_WIN)
157 // TODO(wjia): Currently, for RGB24 on WIN, capture device always 157 // TODO(wjia): Currently, for RGB24 on WIN, capture device always
158 // passes in positive src_width and src_height. Remove this hardcoded 158 // passes in positive src_width and src_height. Remove this hardcoded
159 // value when nagative src_height is supported. The negative src_height 159 // value when nagative src_height is supported. The negative src_height
160 // indicates that vertical flipping is needed. 160 // indicates that vertical flipping is needed.
161 flip = true; 161 flip = true;
162 #endif 162 #endif
163 break; 163 break;
164 case media::PIXEL_FORMAT_ARGB: 164 case media::PIXEL_FORMAT_ARGB:
165 origin_colorspace = libyuv::FOURCC_ARGB; 165 origin_colorspace = libyuv::FOURCC_ARGB;
166 #if defined(OS_WIN)
167 flip = true;
mcasas 2015/03/27 01:02:11 Please be sure that devices using PIXEL_FORMAT_ARG
emircan 2015/03/27 17:50:39 I see your concern. In order to not change the exi
168 #endif
166 break; 169 break;
167 case media::PIXEL_FORMAT_MJPEG: 170 case media::PIXEL_FORMAT_MJPEG:
168 origin_colorspace = libyuv::FOURCC_MJPG; 171 origin_colorspace = libyuv::FOURCC_MJPG;
169 break; 172 break;
170 default: 173 default:
171 NOTREACHED(); 174 NOTREACHED();
172 } 175 }
173 176
174 // The input |length| can be greater than the required buffer size because of 177 // The input |length| can be greater than the required buffer size because of
175 // paddings and/or alignments, but it cannot be smaller. 178 // paddings and/or alignments, but it cannot be smaller.
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 } 360 }
358 361
359 void VideoCaptureDeviceClient::OnLog( 362 void VideoCaptureDeviceClient::OnLog(
360 const std::string& message) { 363 const std::string& message) {
361 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, 364 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
362 base::Bind(&VideoCaptureController::DoLogOnIOThread, 365 base::Bind(&VideoCaptureController::DoLogOnIOThread,
363 controller_, message)); 366 controller_, message));
364 } 367 }
365 368
366 } // namespace content 369 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | media/video/capture/win/sink_input_pin_win.cc » ('j') | media/video/capture/win/sink_input_pin_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698