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 2107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2118 } | 2118 } |
2119 } | 2119 } |
2120 | 2120 |
2121 // Get bandwidth limitation info from stream_->GetStats(). | 2121 // Get bandwidth limitation info from stream_->GetStats(). |
2122 // Input resolution (output from video_adapter) can be further scaled down or | 2122 // Input resolution (output from video_adapter) can be further scaled down or |
2123 // higher video layer(s) can be dropped due to bitrate constraints. | 2123 // higher video layer(s) can be dropped due to bitrate constraints. |
2124 // Note, adapt_changes only include changes from the video_adapter. | 2124 // Note, adapt_changes only include changes from the video_adapter. |
2125 if (stats.bw_limited_resolution) | 2125 if (stats.bw_limited_resolution) |
2126 info.adapt_reason |= CoordinatedVideoAdapter::ADAPTREASON_BANDWIDTH; | 2126 info.adapt_reason |= CoordinatedVideoAdapter::ADAPTREASON_BANDWIDTH; |
2127 | 2127 |
| 2128 info.encoder_implementation_name = stats.encoder_implementation_name; |
2128 info.ssrc_groups = ssrc_groups_; | 2129 info.ssrc_groups = ssrc_groups_; |
2129 info.framerate_input = stats.input_frame_rate; | 2130 info.framerate_input = stats.input_frame_rate; |
2130 info.framerate_sent = stats.encode_frame_rate; | 2131 info.framerate_sent = stats.encode_frame_rate; |
2131 info.avg_encode_ms = stats.avg_encode_time_ms; | 2132 info.avg_encode_ms = stats.avg_encode_time_ms; |
2132 info.encode_usage_percent = stats.encode_usage_percent; | 2133 info.encode_usage_percent = stats.encode_usage_percent; |
2133 | 2134 |
2134 info.nominal_bitrate = stats.media_bitrate_bps; | 2135 info.nominal_bitrate = stats.media_bitrate_bps; |
2135 | 2136 |
2136 info.send_frame_width = 0; | 2137 info.send_frame_width = 0; |
2137 info.send_frame_height = 0; | 2138 info.send_frame_height = 0; |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2510 } | 2511 } |
2511 return ""; | 2512 return ""; |
2512 } | 2513 } |
2513 | 2514 |
2514 VideoReceiverInfo | 2515 VideoReceiverInfo |
2515 WebRtcVideoChannel2::WebRtcVideoReceiveStream::GetVideoReceiverInfo() { | 2516 WebRtcVideoChannel2::WebRtcVideoReceiveStream::GetVideoReceiverInfo() { |
2516 VideoReceiverInfo info; | 2517 VideoReceiverInfo info; |
2517 info.ssrc_groups = ssrc_groups_; | 2518 info.ssrc_groups = ssrc_groups_; |
2518 info.add_ssrc(config_.rtp.remote_ssrc); | 2519 info.add_ssrc(config_.rtp.remote_ssrc); |
2519 webrtc::VideoReceiveStream::Stats stats = stream_->GetStats(); | 2520 webrtc::VideoReceiveStream::Stats stats = stream_->GetStats(); |
| 2521 info.decoder_implementation_name = stats.decoder_implementation_name; |
2520 info.bytes_rcvd = stats.rtp_stats.transmitted.payload_bytes + | 2522 info.bytes_rcvd = stats.rtp_stats.transmitted.payload_bytes + |
2521 stats.rtp_stats.transmitted.header_bytes + | 2523 stats.rtp_stats.transmitted.header_bytes + |
2522 stats.rtp_stats.transmitted.padding_bytes; | 2524 stats.rtp_stats.transmitted.padding_bytes; |
2523 info.packets_rcvd = stats.rtp_stats.transmitted.packets; | 2525 info.packets_rcvd = stats.rtp_stats.transmitted.packets; |
2524 info.packets_lost = stats.rtcp_stats.cumulative_lost; | 2526 info.packets_lost = stats.rtcp_stats.cumulative_lost; |
2525 info.fraction_lost = | 2527 info.fraction_lost = |
2526 static_cast<float>(stats.rtcp_stats.fraction_lost) / (1 << 8); | 2528 static_cast<float>(stats.rtcp_stats.fraction_lost) / (1 << 8); |
2527 | 2529 |
2528 info.framerate_rcvd = stats.network_frame_rate; | 2530 info.framerate_rcvd = stats.network_frame_rate; |
2529 info.framerate_decoded = stats.decode_frame_rate; | 2531 info.framerate_decoded = stats.decode_frame_rate; |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2661 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2663 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
2662 } | 2664 } |
2663 } | 2665 } |
2664 | 2666 |
2665 return video_codecs; | 2667 return video_codecs; |
2666 } | 2668 } |
2667 | 2669 |
2668 } // namespace cricket | 2670 } // namespace cricket |
2669 | 2671 |
2670 #endif // HAVE_WEBRTC_VIDEO | 2672 #endif // HAVE_WEBRTC_VIDEO |
OLD | NEW |