| 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 2194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2205 &last_captured_frame_format); | 2205 &last_captured_frame_format); |
| 2206 info.input_frame_width = last_captured_frame_format.width; | 2206 info.input_frame_width = last_captured_frame_format.width; |
| 2207 info.input_frame_height = last_captured_frame_format.height; | 2207 info.input_frame_height = last_captured_frame_format.height; |
| 2208 } | 2208 } |
| 2209 if (capturer_->video_adapter() != nullptr) { | 2209 if (capturer_->video_adapter() != nullptr) { |
| 2210 info.adapt_changes += capturer_->video_adapter()->adaptation_changes(); | 2210 info.adapt_changes += capturer_->video_adapter()->adaptation_changes(); |
| 2211 info.adapt_reason = capturer_->video_adapter()->adapt_reason(); | 2211 info.adapt_reason = capturer_->video_adapter()->adapt_reason(); |
| 2212 } | 2212 } |
| 2213 } | 2213 } |
| 2214 } | 2214 } |
| 2215 info.encoder_implementation_name = stats.encoder_implementation_name; |
| 2215 info.ssrc_groups = ssrc_groups_; | 2216 info.ssrc_groups = ssrc_groups_; |
| 2216 info.framerate_input = stats.input_frame_rate; | 2217 info.framerate_input = stats.input_frame_rate; |
| 2217 info.framerate_sent = stats.encode_frame_rate; | 2218 info.framerate_sent = stats.encode_frame_rate; |
| 2218 info.avg_encode_ms = stats.avg_encode_time_ms; | 2219 info.avg_encode_ms = stats.avg_encode_time_ms; |
| 2219 info.encode_usage_percent = stats.encode_usage_percent; | 2220 info.encode_usage_percent = stats.encode_usage_percent; |
| 2220 | 2221 |
| 2221 info.nominal_bitrate = stats.media_bitrate_bps; | 2222 info.nominal_bitrate = stats.media_bitrate_bps; |
| 2222 | 2223 |
| 2223 info.send_frame_width = 0; | 2224 info.send_frame_width = 0; |
| 2224 info.send_frame_height = 0; | 2225 info.send_frame_height = 0; |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2574 } | 2575 } |
| 2575 return ""; | 2576 return ""; |
| 2576 } | 2577 } |
| 2577 | 2578 |
| 2578 VideoReceiverInfo | 2579 VideoReceiverInfo |
| 2579 WebRtcVideoChannel2::WebRtcVideoReceiveStream::GetVideoReceiverInfo() { | 2580 WebRtcVideoChannel2::WebRtcVideoReceiveStream::GetVideoReceiverInfo() { |
| 2580 VideoReceiverInfo info; | 2581 VideoReceiverInfo info; |
| 2581 info.ssrc_groups = ssrc_groups_; | 2582 info.ssrc_groups = ssrc_groups_; |
| 2582 info.add_ssrc(config_.rtp.remote_ssrc); | 2583 info.add_ssrc(config_.rtp.remote_ssrc); |
| 2583 webrtc::VideoReceiveStream::Stats stats = stream_->GetStats(); | 2584 webrtc::VideoReceiveStream::Stats stats = stream_->GetStats(); |
| 2585 info.decoder_implementation_name = stats.decoder_implementation_name; |
| 2584 info.bytes_rcvd = stats.rtp_stats.transmitted.payload_bytes + | 2586 info.bytes_rcvd = stats.rtp_stats.transmitted.payload_bytes + |
| 2585 stats.rtp_stats.transmitted.header_bytes + | 2587 stats.rtp_stats.transmitted.header_bytes + |
| 2586 stats.rtp_stats.transmitted.padding_bytes; | 2588 stats.rtp_stats.transmitted.padding_bytes; |
| 2587 info.packets_rcvd = stats.rtp_stats.transmitted.packets; | 2589 info.packets_rcvd = stats.rtp_stats.transmitted.packets; |
| 2588 info.packets_lost = stats.rtcp_stats.cumulative_lost; | 2590 info.packets_lost = stats.rtcp_stats.cumulative_lost; |
| 2589 info.fraction_lost = | 2591 info.fraction_lost = |
| 2590 static_cast<float>(stats.rtcp_stats.fraction_lost) / (1 << 8); | 2592 static_cast<float>(stats.rtcp_stats.fraction_lost) / (1 << 8); |
| 2591 | 2593 |
| 2592 info.framerate_rcvd = stats.network_frame_rate; | 2594 info.framerate_rcvd = stats.network_frame_rate; |
| 2593 info.framerate_decoded = stats.decode_frame_rate; | 2595 info.framerate_decoded = stats.decode_frame_rate; |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2725 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2727 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
| 2726 } | 2728 } |
| 2727 } | 2729 } |
| 2728 | 2730 |
| 2729 return video_codecs; | 2731 return video_codecs; |
| 2730 } | 2732 } |
| 2731 | 2733 |
| 2732 } // namespace cricket | 2734 } // namespace cricket |
| 2733 | 2735 |
| 2734 #endif // HAVE_WEBRTC_VIDEO | 2736 #endif // HAVE_WEBRTC_VIDEO |
| OLD | NEW |