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

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

Issue 1829193003: Request frame for new sinks from MediaStreamVideoTrack (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: miu@ nit. Created 4 years, 9 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 <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 const SourceStoppedCallback& stop_callback, 391 const SourceStoppedCallback& stop_callback,
392 const StreamDeviceInfo& device_info) 392 const StreamDeviceInfo& device_info)
393 : source_(new LocalVideoCapturerSource(device_info)) { 393 : source_(new LocalVideoCapturerSource(device_info)) {
394 SetStopCallback(stop_callback); 394 SetStopCallback(stop_callback);
395 SetDeviceInfo(device_info); 395 SetDeviceInfo(device_info);
396 } 396 }
397 397
398 MediaStreamVideoCapturerSource::~MediaStreamVideoCapturerSource() { 398 MediaStreamVideoCapturerSource::~MediaStreamVideoCapturerSource() {
399 } 399 }
400 400
401 void MediaStreamVideoCapturerSource::RequestRefreshFrame() {
402 source_->RequestRefreshFrame();
403 }
404
401 void MediaStreamVideoCapturerSource::GetCurrentSupportedFormats( 405 void MediaStreamVideoCapturerSource::GetCurrentSupportedFormats(
402 int max_requested_width, 406 int max_requested_width,
403 int max_requested_height, 407 int max_requested_height,
404 double max_requested_frame_rate, 408 double max_requested_frame_rate,
405 const VideoCaptureDeviceFormatsCB& callback) { 409 const VideoCaptureDeviceFormatsCB& callback) {
406 source_->GetCurrentSupportedFormats( 410 source_->GetCurrentSupportedFormats(
407 max_requested_width, 411 max_requested_width,
408 max_requested_height, 412 max_requested_height,
409 max_requested_frame_rate, 413 max_requested_frame_rate,
410 callback); 414 callback);
(...skipping 25 matching lines...) Expand all
436 void MediaStreamVideoCapturerSource::OnStarted(bool result) { 440 void MediaStreamVideoCapturerSource::OnStarted(bool result) {
437 OnStartDone(result ? MEDIA_DEVICE_OK : MEDIA_DEVICE_TRACK_START_FAILURE); 441 OnStartDone(result ? MEDIA_DEVICE_OK : MEDIA_DEVICE_TRACK_START_FAILURE);
438 } 442 }
439 443
440 const char* 444 const char*
441 MediaStreamVideoCapturerSource::GetPowerLineFrequencyForTesting() const { 445 MediaStreamVideoCapturerSource::GetPowerLineFrequencyForTesting() const {
442 return kPowerLineFrequency; 446 return kPowerLineFrequency;
443 } 447 }
444 448
445 } // namespace content 449 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698