OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 2211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2222 &last_captured_frame_format); | 2222 &last_captured_frame_format); |
2223 info.input_frame_width = last_captured_frame_format.width; | 2223 info.input_frame_width = last_captured_frame_format.width; |
2224 info.input_frame_height = last_captured_frame_format.height; | 2224 info.input_frame_height = last_captured_frame_format.height; |
2225 } | 2225 } |
2226 if (capturer_->video_adapter() != nullptr) { | 2226 if (capturer_->video_adapter() != nullptr) { |
2227 info.adapt_changes += capturer_->video_adapter()->adaptation_changes(); | 2227 info.adapt_changes += capturer_->video_adapter()->adaptation_changes(); |
2228 info.adapt_reason = capturer_->video_adapter()->adapt_reason(); | 2228 info.adapt_reason = capturer_->video_adapter()->adapt_reason(); |
2229 } | 2229 } |
2230 } | 2230 } |
2231 } | 2231 } |
| 2232 info.encoder_implementation_name = stats.encoder_implementation_name; |
2232 info.ssrc_groups = ssrc_groups_; | 2233 info.ssrc_groups = ssrc_groups_; |
2233 info.framerate_input = stats.input_frame_rate; | 2234 info.framerate_input = stats.input_frame_rate; |
2234 info.framerate_sent = stats.encode_frame_rate; | 2235 info.framerate_sent = stats.encode_frame_rate; |
2235 info.avg_encode_ms = stats.avg_encode_time_ms; | 2236 info.avg_encode_ms = stats.avg_encode_time_ms; |
2236 info.encode_usage_percent = stats.encode_usage_percent; | 2237 info.encode_usage_percent = stats.encode_usage_percent; |
2237 | 2238 |
2238 info.nominal_bitrate = stats.media_bitrate_bps; | 2239 info.nominal_bitrate = stats.media_bitrate_bps; |
2239 | 2240 |
2240 info.send_frame_width = 0; | 2241 info.send_frame_width = 0; |
2241 info.send_frame_height = 0; | 2242 info.send_frame_height = 0; |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2605 } | 2606 } |
2606 return ""; | 2607 return ""; |
2607 } | 2608 } |
2608 | 2609 |
2609 VideoReceiverInfo | 2610 VideoReceiverInfo |
2610 WebRtcVideoChannel2::WebRtcVideoReceiveStream::GetVideoReceiverInfo() { | 2611 WebRtcVideoChannel2::WebRtcVideoReceiveStream::GetVideoReceiverInfo() { |
2611 VideoReceiverInfo info; | 2612 VideoReceiverInfo info; |
2612 info.ssrc_groups = ssrc_groups_; | 2613 info.ssrc_groups = ssrc_groups_; |
2613 info.add_ssrc(config_.rtp.remote_ssrc); | 2614 info.add_ssrc(config_.rtp.remote_ssrc); |
2614 webrtc::VideoReceiveStream::Stats stats = stream_->GetStats(); | 2615 webrtc::VideoReceiveStream::Stats stats = stream_->GetStats(); |
| 2616 info.decoder_implementation_name = stats.decoder_implementation_name; |
2615 info.bytes_rcvd = stats.rtp_stats.transmitted.payload_bytes + | 2617 info.bytes_rcvd = stats.rtp_stats.transmitted.payload_bytes + |
2616 stats.rtp_stats.transmitted.header_bytes + | 2618 stats.rtp_stats.transmitted.header_bytes + |
2617 stats.rtp_stats.transmitted.padding_bytes; | 2619 stats.rtp_stats.transmitted.padding_bytes; |
2618 info.packets_rcvd = stats.rtp_stats.transmitted.packets; | 2620 info.packets_rcvd = stats.rtp_stats.transmitted.packets; |
2619 info.packets_lost = stats.rtcp_stats.cumulative_lost; | 2621 info.packets_lost = stats.rtcp_stats.cumulative_lost; |
2620 info.fraction_lost = | 2622 info.fraction_lost = |
2621 static_cast<float>(stats.rtcp_stats.fraction_lost) / (1 << 8); | 2623 static_cast<float>(stats.rtcp_stats.fraction_lost) / (1 << 8); |
2622 | 2624 |
2623 info.framerate_rcvd = stats.network_frame_rate; | 2625 info.framerate_rcvd = stats.network_frame_rate; |
2624 info.framerate_decoded = stats.decode_frame_rate; | 2626 info.framerate_decoded = stats.decode_frame_rate; |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2756 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2758 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
2757 } | 2759 } |
2758 } | 2760 } |
2759 | 2761 |
2760 return video_codecs; | 2762 return video_codecs; |
2761 } | 2763 } |
2762 | 2764 |
2763 } // namespace cricket | 2765 } // namespace cricket |
2764 | 2766 |
2765 #endif // HAVE_WEBRTC_VIDEO | 2767 #endif // HAVE_WEBRTC_VIDEO |
OLD | NEW |