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

Side by Side Diff: content/browser/renderer_host/media/video_capture_controller.cc

Issue 489183003: Log error messages in windows video capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge conflicts? 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
« no previous file with comments | « no previous file | media/video/capture/android/video_capture_device_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "base/debug/trace_event.h" 11 #include "base/debug/trace_event.h"
12 #include "base/metrics/histogram.h" 12 #include "base/metrics/histogram.h"
13 #include "base/metrics/sparse_histogram.h" 13 #include "base/metrics/sparse_histogram.h"
14 #include "base/stl_util.h" 14 #include "base/stl_util.h"
15 #include "base/strings/stringprintf.h"
15 #include "content/browser/renderer_host/media/media_stream_manager.h" 16 #include "content/browser/renderer_host/media/media_stream_manager.h"
16 #include "content/browser/renderer_host/media/video_capture_manager.h" 17 #include "content/browser/renderer_host/media/video_capture_manager.h"
17 #include "content/common/gpu/client/gl_helper.h" 18 #include "content/common/gpu/client/gl_helper.h"
18 #include "content/public/browser/browser_thread.h" 19 #include "content/public/browser/browser_thread.h"
19 #include "gpu/command_buffer/common/mailbox_holder.h" 20 #include "gpu/command_buffer/common/mailbox_holder.h"
20 #include "media/base/video_frame.h" 21 #include "media/base/video_frame.h"
21 #include "media/base/video_util.h" 22 #include "media/base/video_util.h"
22 #include "media/base/yuv_convert.h" 23 #include "media/base/yuv_convert.h"
23 #include "third_party/libyuv/include/libyuv.h" 24 #include "third_party/libyuv/include/libyuv.h"
24 25
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 &VideoCaptureController::DoIncomingCapturedVideoFrameOnIOThread, 510 &VideoCaptureController::DoIncomingCapturedVideoFrameOnIOThread,
510 controller_, 511 controller_,
511 buffer, 512 buffer,
512 buffer_format, 513 buffer_format,
513 frame, 514 frame,
514 timestamp)); 515 timestamp));
515 } 516 }
516 517
517 void VideoCaptureController::VideoCaptureDeviceClient::OnError( 518 void VideoCaptureController::VideoCaptureDeviceClient::OnError(
518 const std::string& reason) { 519 const std::string& reason) {
519 MediaStreamManager::SendMessageToNativeLog( 520 const std::string log_message = base::StringPrintf(
520 "Error on video capture: " + reason); 521 "Error on video capture: %s, OS message: %s",
522 reason.c_str(),
523 logging::SystemErrorCodeToString(
524 logging::GetLastSystemErrorCode()).c_str());
525 DLOG(ERROR) << log_message;
526 MediaStreamManager::SendMessageToNativeLog(log_message);
521 BrowserThread::PostTask(BrowserThread::IO, 527 BrowserThread::PostTask(BrowserThread::IO,
522 FROM_HERE, 528 FROM_HERE,
523 base::Bind(&VideoCaptureController::DoErrorOnIOThread, controller_)); 529 base::Bind(&VideoCaptureController::DoErrorOnIOThread, controller_));
524 } 530 }
525 531
526 void VideoCaptureController::VideoCaptureDeviceClient::OnLog( 532 void VideoCaptureController::VideoCaptureDeviceClient::OnLog(
527 const std::string& message) { 533 const std::string& message) {
528 MediaStreamManager::SendMessageToNativeLog("Video capture: " + message); 534 MediaStreamManager::SendMessageToNativeLog("Video capture: " + message);
529 } 535 }
530 536
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 } 683 }
678 return NULL; 684 return NULL;
679 } 685 }
680 686
681 int VideoCaptureController::GetClientCount() { 687 int VideoCaptureController::GetClientCount() {
682 DCHECK_CURRENTLY_ON(BrowserThread::IO); 688 DCHECK_CURRENTLY_ON(BrowserThread::IO);
683 return controller_clients_.size(); 689 return controller_clients_.size();
684 } 690 }
685 691
686 } // namespace content 692 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | media/video/capture/android/video_capture_device_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698