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 MediaStreamManager::SendMessageToNativeLog( | 519 const std::string last_error_message = |
520 "Error on video capture: " + reason); | 520 logging::SystemErrorCodeToString(logging::GetLastSystemErrorCode()); |
521 std::ostringstream log_message; | |
522 log_message << "Error on video capture: " << reason | |
523 << ", OS message: " << last_error_message; | |
tommi (sloooow) - chröme
2014/08/28 08:48:46
exchange last_error_message with the call to Syste
magjed_chromium
2014/08/28 14:50:39
Done.
| |
524 DLOG(ERROR) << log_message.str(); | |
tommi (sloooow) - chröme
2014/08/28 08:48:46
nit: no need to call .str() here
magjed_chromium
2014/08/28 14:50:39
Done.
| |
525 MediaStreamManager::SendMessageToNativeLog(log_message.str()); | |
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 |