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

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

Issue 541163002: Clarify resolution change behaviors of video capture devices (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed build 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 | Annotate | Revision Log
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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::VideoCaptureParams& params,
235 const VideoCaptureDeliverFrameCB& frame_callback) { 235 const VideoCaptureDeliverFrameCB& frame_callback) {
236 media::VideoCaptureParams new_params(params); 236 media::VideoCaptureParams new_params(params);
237 if (device_info().device.type == MEDIA_TAB_VIDEO_CAPTURE || 237 if (device_info().device.type == MEDIA_TAB_VIDEO_CAPTURE ||
238 device_info().device.type == MEDIA_DESKTOP_VIDEO_CAPTURE) { 238 device_info().device.type == MEDIA_DESKTOP_VIDEO_CAPTURE) {
239 new_params.allow_resolution_change = true; 239 new_params.resolution_change_policy =
240 media::RESOLUTION_POLICY_DYNAMIC_WITHIN_LIMIT;
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

Powered by Google App Engine
This is Rietveld 408576698