OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/rtc_video_encoder.h" | 5 #include "content/renderer/media/rtc_video_encoder.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
579 | 579 |
580 RTCVideoEncoder::~RTCVideoEncoder() { | 580 RTCVideoEncoder::~RTCVideoEncoder() { |
581 DVLOG(3) << "~RTCVideoEncoder"; | 581 DVLOG(3) << "~RTCVideoEncoder"; |
582 DCHECK(thread_checker_.CalledOnValidThread()); | 582 DCHECK(thread_checker_.CalledOnValidThread()); |
583 Release(); | 583 Release(); |
584 DCHECK(!impl_.get()); | 584 DCHECK(!impl_.get()); |
585 } | 585 } |
586 | 586 |
587 int32_t RTCVideoEncoder::InitEncode(const webrtc::VideoCodec* codec_settings, | 587 int32_t RTCVideoEncoder::InitEncode(const webrtc::VideoCodec* codec_settings, |
588 int32_t number_of_cores, | 588 int32_t number_of_cores, |
589 uint32_t max_payload_size) { | 589 size_t max_payload_size) { |
590 DVLOG(1) << "InitEncode(): codecType=" << codec_settings->codecType | 590 DVLOG(1) << "InitEncode(): codecType=" << codec_settings->codecType |
591 << ", width=" << codec_settings->width | 591 << ", width=" << codec_settings->width |
592 << ", height=" << codec_settings->height | 592 << ", height=" << codec_settings->height |
593 << ", startBitrate=" << codec_settings->startBitrate; | 593 << ", startBitrate=" << codec_settings->startBitrate; |
594 DCHECK(thread_checker_.CalledOnValidThread()); | 594 DCHECK(thread_checker_.CalledOnValidThread()); |
595 DCHECK(!impl_.get()); | 595 DCHECK(!impl_.get()); |
596 | 596 |
597 media::VideoCodecProfile profile = WebRTCVideoCodecToVideoCodecProfile( | 597 media::VideoCodecProfile profile = WebRTCVideoCodecToVideoCodecProfile( |
598 video_codec_type_, codec_settings); | 598 video_codec_type_, codec_settings); |
599 | 599 |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 UMA_HISTOGRAM_BOOLEAN("Media.RTCVideoEncoderInitEncodeSuccess", | 771 UMA_HISTOGRAM_BOOLEAN("Media.RTCVideoEncoderInitEncodeSuccess", |
772 init_retval == WEBRTC_VIDEO_CODEC_OK); | 772 init_retval == WEBRTC_VIDEO_CODEC_OK); |
773 if (init_retval == WEBRTC_VIDEO_CODEC_OK) { | 773 if (init_retval == WEBRTC_VIDEO_CODEC_OK) { |
774 UMA_HISTOGRAM_ENUMERATION("Media.RTCVideoEncoderProfile", | 774 UMA_HISTOGRAM_ENUMERATION("Media.RTCVideoEncoderProfile", |
775 profile, | 775 profile, |
776 media::VIDEO_CODEC_PROFILE_MAX + 1); | 776 media::VIDEO_CODEC_PROFILE_MAX + 1); |
777 } | 777 } |
778 } | 778 } |
779 | 779 |
780 } // namespace content | 780 } // namespace content |
OLD | NEW |