Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_controller.h" | 5 #include "content/browser/renderer_host/media/video_capture_controller.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 509 &VideoCaptureController::DoIncomingCapturedVideoFrameOnIOThread, | 509 &VideoCaptureController::DoIncomingCapturedVideoFrameOnIOThread, |
| 510 controller_, | 510 controller_, |
| 511 buffer, | 511 buffer, |
| 512 buffer_format, | 512 buffer_format, |
| 513 frame, | 513 frame, |
| 514 timestamp)); | 514 timestamp)); |
| 515 } | 515 } |
| 516 | 516 |
| 517 void VideoCaptureController::VideoCaptureDeviceClient::OnError( | 517 void VideoCaptureController::VideoCaptureDeviceClient::OnError( |
| 518 const std::string& reason) { | 518 const std::string& reason) { |
| 519 const std::string last_error_message = | |
| 520 logging::SystemErrorCodeToString(logging::GetLastSystemErrorCode()); | |
| 521 const std::string log_message = | |
| 522 reason + ", OS message: " + last_error_message; | |
| 523 DLOG(ERROR) << log_message; | |
|
tommi (sloooow) - chröme
2014/08/27 14:46:18
log_message could be a std::ostringstream which wo
magjed_chromium
2014/08/27 17:03:27
Done.
| |
| 519 MediaStreamManager::SendMessageToNativeLog( | 524 MediaStreamManager::SendMessageToNativeLog( |
| 520 "Error on video capture: " + reason); | 525 "Error on video capture: " + log_message); |
|
tommi (sloooow) - chröme
2014/08/27 14:46:18
"Error on video capture: " could be made the first
magjed_chromium
2014/08/27 17:03:27
Done.
| |
| 521 BrowserThread::PostTask(BrowserThread::IO, | 526 BrowserThread::PostTask(BrowserThread::IO, |
| 522 FROM_HERE, | 527 FROM_HERE, |
| 523 base::Bind(&VideoCaptureController::DoErrorOnIOThread, controller_)); | 528 base::Bind(&VideoCaptureController::DoErrorOnIOThread, controller_)); |
| 524 } | 529 } |
| 525 | 530 |
| 526 void VideoCaptureController::VideoCaptureDeviceClient::OnLog( | 531 void VideoCaptureController::VideoCaptureDeviceClient::OnLog( |
| 527 const std::string& message) { | 532 const std::string& message) { |
| 528 MediaStreamManager::SendMessageToNativeLog("Video capture: " + message); | 533 MediaStreamManager::SendMessageToNativeLog("Video capture: " + message); |
| 529 } | 534 } |
| 530 | 535 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 676 } | 681 } |
| 677 return NULL; | 682 return NULL; |
| 678 } | 683 } |
| 679 | 684 |
| 680 int VideoCaptureController::GetClientCount() { | 685 int VideoCaptureController::GetClientCount() { |
| 681 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 686 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 682 return controller_clients_.size(); | 687 return controller_clients_.size(); |
| 683 } | 688 } |
| 684 | 689 |
| 685 } // namespace content | 690 } // namespace content |
| OLD | NEW |