OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1621 if (stream_ != NULL) { | 1621 if (stream_ != NULL) { |
1622 call_->DestroyVideoSendStream(stream_); | 1622 call_->DestroyVideoSendStream(stream_); |
1623 } | 1623 } |
1624 DestroyVideoEncoder(&allocated_encoder_); | 1624 DestroyVideoEncoder(&allocated_encoder_); |
1625 UpdateHistograms(); | 1625 UpdateHistograms(); |
1626 } | 1626 } |
1627 | 1627 |
1628 void WebRtcVideoChannel2::WebRtcVideoSendStream::UpdateHistograms() const { | 1628 void WebRtcVideoChannel2::WebRtcVideoSendStream::UpdateHistograms() const { |
1629 const int kMinRequiredFrames = 200; | 1629 const int kMinRequiredFrames = 200; |
1630 if (frame_count_ > kMinRequiredFrames) { | 1630 if (frame_count_ > kMinRequiredFrames) { |
1631 RTC_LOGGED_HISTOGRAM_PERCENTAGE( | 1631 RTC_HISTOGRAM_PERCENTAGE("WebRTC.Video.CpuLimitedResolutionInPercent", |
1632 "WebRTC.Video.CpuLimitedResolutionInPercent", | 1632 cpu_restricted_frame_count_ * 100 / frame_count_); |
1633 cpu_restricted_frame_count_ * 100 / frame_count_); | |
1634 } | 1633 } |
1635 } | 1634 } |
1636 | 1635 |
1637 void WebRtcVideoChannel2::WebRtcVideoSendStream::OnFrame( | 1636 void WebRtcVideoChannel2::WebRtcVideoSendStream::OnFrame( |
1638 const VideoFrame& frame) { | 1637 const VideoFrame& frame) { |
1639 TRACE_EVENT0("webrtc", "WebRtcVideoSendStream::OnFrame"); | 1638 TRACE_EVENT0("webrtc", "WebRtcVideoSendStream::OnFrame"); |
1640 webrtc::VideoFrame video_frame(frame.video_frame_buffer(), | 1639 webrtc::VideoFrame video_frame(frame.video_frame_buffer(), |
1641 frame.rotation(), | 1640 frame.rotation(), |
1642 frame.timestamp_us()); | 1641 frame.timestamp_us()); |
1643 | 1642 |
(...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2693 rtx_mapping[video_codecs[i].codec.id] != | 2692 rtx_mapping[video_codecs[i].codec.id] != |
2694 fec_settings.red_payload_type) { | 2693 fec_settings.red_payload_type) { |
2695 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2694 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
2696 } | 2695 } |
2697 } | 2696 } |
2698 | 2697 |
2699 return video_codecs; | 2698 return video_codecs; |
2700 } | 2699 } |
2701 | 2700 |
2702 } // namespace cricket | 2701 } // namespace cricket |
OLD | NEW |