| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |