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 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 if (!has_received_frames_) { | 629 if (!has_received_frames_) { |
630 UMA_HISTOGRAM_COUNTS("Media.VideoCapture.Width", | 630 UMA_HISTOGRAM_COUNTS("Media.VideoCapture.Width", |
631 buffer_format.frame_size.width()); | 631 buffer_format.frame_size.width()); |
632 UMA_HISTOGRAM_COUNTS("Media.VideoCapture.Height", | 632 UMA_HISTOGRAM_COUNTS("Media.VideoCapture.Height", |
633 buffer_format.frame_size.height()); | 633 buffer_format.frame_size.height()); |
634 UMA_HISTOGRAM_ASPECT_RATIO("Media.VideoCapture.AspectRatio", | 634 UMA_HISTOGRAM_ASPECT_RATIO("Media.VideoCapture.AspectRatio", |
635 buffer_format.frame_size.width(), | 635 buffer_format.frame_size.width(), |
636 buffer_format.frame_size.height()); | 636 buffer_format.frame_size.height()); |
637 UMA_HISTOGRAM_COUNTS("Media.VideoCapture.FrameRate", | 637 UMA_HISTOGRAM_COUNTS("Media.VideoCapture.FrameRate", |
638 buffer_format.frame_rate); | 638 buffer_format.frame_rate); |
639 UMA_HISTOGRAM_ENUMERATION("Media.VideoCapture.PixelFormat", | |
640 buffer_format.pixel_format, | |
641 media::PIXEL_FORMAT_MAX); | |
642 has_received_frames_ = true; | 639 has_received_frames_ = true; |
643 } | 640 } |
644 | 641 |
645 buffer_pool_->HoldForConsumers(buffer->id(), count); | 642 buffer_pool_->HoldForConsumers(buffer->id(), count); |
646 } | 643 } |
647 | 644 |
648 void VideoCaptureController::DoErrorOnIOThread() { | 645 void VideoCaptureController::DoErrorOnIOThread() { |
649 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 646 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
650 state_ = VIDEO_CAPTURE_STATE_ERROR; | 647 state_ = VIDEO_CAPTURE_STATE_ERROR; |
651 | 648 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 710 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
714 int active_client_count = 0; | 711 int active_client_count = 0; |
715 for (ControllerClient* client : controller_clients_) { | 712 for (ControllerClient* client : controller_clients_) { |
716 if (!client->paused) | 713 if (!client->paused) |
717 ++active_client_count; | 714 ++active_client_count; |
718 } | 715 } |
719 return active_client_count; | 716 return active_client_count; |
720 } | 717 } |
721 | 718 |
722 } // namespace content | 719 } // namespace content |
OLD | NEW |