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

Side by Side Diff: content/renderer/media/media_stream_video_capturer_source.cc

Issue 528783002: Change MediaStreamVideoSource::StartSourceImpl to use VideoCaptureFormat instead of VideoCapturePar… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 6 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/renderer/media/media_stream_video_capturer_source.h" 5 #include "content/renderer/media/media_stream_video_capturer_source.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "content/renderer/media/video_capture_impl_manager.h" 10 #include "content/renderer/media/video_capture_impl_manager.h"
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 double max_requested_frame_rate, 224 double max_requested_frame_rate,
225 const VideoCaptureDeviceFormatsCB& callback) { 225 const VideoCaptureDeviceFormatsCB& callback) {
226 delegate_->GetCurrentSupportedFormats( 226 delegate_->GetCurrentSupportedFormats(
227 max_requested_width, 227 max_requested_width,
228 max_requested_height, 228 max_requested_height,
229 max_requested_frame_rate, 229 max_requested_frame_rate,
230 callback); 230 callback);
231 } 231 }
232 232
233 void MediaStreamVideoCapturerSource::StartSourceImpl( 233 void MediaStreamVideoCapturerSource::StartSourceImpl(
234 const media::VideoCaptureParams& params, 234 const media::VideoCaptureFormat& format,
235 const VideoCaptureDeliverFrameCB& frame_callback) { 235 const VideoCaptureDeliverFrameCB& frame_callback) {
236 media::VideoCaptureParams new_params(params); 236 media::VideoCaptureParams new_params;
237 new_params.requested_format = format;
237 if (device_info().device.type == MEDIA_TAB_VIDEO_CAPTURE || 238 if (device_info().device.type == MEDIA_TAB_VIDEO_CAPTURE ||
238 device_info().device.type == MEDIA_DESKTOP_VIDEO_CAPTURE) { 239 device_info().device.type == MEDIA_DESKTOP_VIDEO_CAPTURE) {
239 new_params.allow_resolution_change = true; 240 new_params.allow_resolution_change = true;
240 } 241 }
241 delegate_->StartCapture( 242 delegate_->StartCapture(
242 new_params, 243 new_params,
243 frame_callback, 244 frame_callback,
244 base::Bind(&MediaStreamVideoCapturerSource::OnStartDone, 245 base::Bind(&MediaStreamVideoCapturerSource::OnStartDone,
245 base::Unretained(this))); 246 base::Unretained(this)));
246 } 247 }
247 248
248 void MediaStreamVideoCapturerSource::StopSourceImpl() { 249 void MediaStreamVideoCapturerSource::StopSourceImpl() {
249 delegate_->StopCapture(); 250 delegate_->StopCapture();
250 } 251 }
251 252
252 } // namespace content 253 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_video_capturer_source.h ('k') | content/renderer/media/media_stream_video_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698