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 2007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2018 | 2018 |
2019 VideoSenderInfo WebRtcVideoChannel2::WebRtcVideoSendStream::GetVideoSenderInfo( | 2019 VideoSenderInfo WebRtcVideoChannel2::WebRtcVideoSendStream::GetVideoSenderInfo( |
2020 bool log_stats) { | 2020 bool log_stats) { |
2021 VideoSenderInfo info; | 2021 VideoSenderInfo info; |
2022 RTC_DCHECK_RUN_ON(&thread_checker_); | 2022 RTC_DCHECK_RUN_ON(&thread_checker_); |
2023 for (uint32_t ssrc : parameters_.config.rtp.ssrcs) | 2023 for (uint32_t ssrc : parameters_.config.rtp.ssrcs) |
2024 info.add_ssrc(ssrc); | 2024 info.add_ssrc(ssrc); |
2025 | 2025 |
2026 if (parameters_.codec_settings) { | 2026 if (parameters_.codec_settings) { |
2027 info.codec_name = parameters_.codec_settings->codec.name; | 2027 info.codec_name = parameters_.codec_settings->codec.name; |
2028 info.codec_payload_type = rtc::Optional<uint32_t>( | 2028 info.codec_payload_type = rtc::Optional<int>( |
2029 static_cast<uint32_t>(parameters_.codec_settings->codec.id)); | 2029 parameters_.codec_settings->codec.id); |
2030 } | 2030 } |
2031 | 2031 |
2032 if (stream_ == NULL) | 2032 if (stream_ == NULL) |
2033 return info; | 2033 return info; |
2034 | 2034 |
2035 webrtc::VideoSendStream::Stats stats = stream_->GetStats(); | 2035 webrtc::VideoSendStream::Stats stats = stream_->GetStats(); |
2036 | 2036 |
2037 if (log_stats) | 2037 if (log_stats) |
2038 LOG(LS_INFO) << stats.ToString(rtc::TimeMillis()); | 2038 LOG(LS_INFO) << stats.ToString(rtc::TimeMillis()); |
2039 | 2039 |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2429 | 2429 |
2430 VideoReceiverInfo | 2430 VideoReceiverInfo |
2431 WebRtcVideoChannel2::WebRtcVideoReceiveStream::GetVideoReceiverInfo( | 2431 WebRtcVideoChannel2::WebRtcVideoReceiveStream::GetVideoReceiverInfo( |
2432 bool log_stats) { | 2432 bool log_stats) { |
2433 VideoReceiverInfo info; | 2433 VideoReceiverInfo info; |
2434 info.ssrc_groups = stream_params_.ssrc_groups; | 2434 info.ssrc_groups = stream_params_.ssrc_groups; |
2435 info.add_ssrc(config_.rtp.remote_ssrc); | 2435 info.add_ssrc(config_.rtp.remote_ssrc); |
2436 webrtc::VideoReceiveStream::Stats stats = stream_->GetStats(); | 2436 webrtc::VideoReceiveStream::Stats stats = stream_->GetStats(); |
2437 info.decoder_implementation_name = stats.decoder_implementation_name; | 2437 info.decoder_implementation_name = stats.decoder_implementation_name; |
2438 if (stats.current_payload_type != -1) { | 2438 if (stats.current_payload_type != -1) { |
2439 info.codec_payload_type = rtc::Optional<uint32_t>( | 2439 info.codec_payload_type = rtc::Optional<int>( |
2440 static_cast<uint32_t>(stats.current_payload_type)); | 2440 stats.current_payload_type); |
2441 } | 2441 } |
2442 info.bytes_rcvd = stats.rtp_stats.transmitted.payload_bytes + | 2442 info.bytes_rcvd = stats.rtp_stats.transmitted.payload_bytes + |
2443 stats.rtp_stats.transmitted.header_bytes + | 2443 stats.rtp_stats.transmitted.header_bytes + |
2444 stats.rtp_stats.transmitted.padding_bytes; | 2444 stats.rtp_stats.transmitted.padding_bytes; |
2445 info.packets_rcvd = stats.rtp_stats.transmitted.packets; | 2445 info.packets_rcvd = stats.rtp_stats.transmitted.packets; |
2446 info.packets_lost = stats.rtcp_stats.cumulative_lost; | 2446 info.packets_lost = stats.rtcp_stats.cumulative_lost; |
2447 info.fraction_lost = | 2447 info.fraction_lost = |
2448 static_cast<float>(stats.rtcp_stats.fraction_lost) / (1 << 8); | 2448 static_cast<float>(stats.rtcp_stats.fraction_lost) / (1 << 8); |
2449 | 2449 |
2450 info.framerate_rcvd = stats.network_frame_rate; | 2450 info.framerate_rcvd = stats.network_frame_rate; |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2590 rtx_mapping[video_codecs[i].codec.id] != | 2590 rtx_mapping[video_codecs[i].codec.id] != |
2591 ulpfec_config.red_payload_type) { | 2591 ulpfec_config.red_payload_type) { |
2592 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2592 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
2593 } | 2593 } |
2594 } | 2594 } |
2595 | 2595 |
2596 return video_codecs; | 2596 return video_codecs; |
2597 } | 2597 } |
2598 | 2598 |
2599 } // namespace cricket | 2599 } // namespace cricket |
OLD | NEW |