Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: talk/media/webrtc/webrtcvideoengine2.cc

Issue 1406903002: Expose codec implementation names in stats. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: feedback Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2218 matching lines...) Expand 10 before | Expand all | Expand 10 after
2229 &last_captured_frame_format); 2229 &last_captured_frame_format);
2230 info.input_frame_width = last_captured_frame_format.width; 2230 info.input_frame_width = last_captured_frame_format.width;
2231 info.input_frame_height = last_captured_frame_format.height; 2231 info.input_frame_height = last_captured_frame_format.height;
2232 } 2232 }
2233 if (capturer_->video_adapter() != nullptr) { 2233 if (capturer_->video_adapter() != nullptr) {
2234 info.adapt_changes += capturer_->video_adapter()->adaptation_changes(); 2234 info.adapt_changes += capturer_->video_adapter()->adaptation_changes();
2235 info.adapt_reason = capturer_->video_adapter()->adapt_reason(); 2235 info.adapt_reason = capturer_->video_adapter()->adapt_reason();
2236 } 2236 }
2237 } 2237 }
2238 } 2238 }
2239 info.encoder_implementation_name = stats.encoder_implementation_name;
2239 info.ssrc_groups = ssrc_groups_; 2240 info.ssrc_groups = ssrc_groups_;
2240 info.framerate_input = stats.input_frame_rate; 2241 info.framerate_input = stats.input_frame_rate;
2241 info.framerate_sent = stats.encode_frame_rate; 2242 info.framerate_sent = stats.encode_frame_rate;
2242 info.avg_encode_ms = stats.avg_encode_time_ms; 2243 info.avg_encode_ms = stats.avg_encode_time_ms;
2243 info.encode_usage_percent = stats.encode_usage_percent; 2244 info.encode_usage_percent = stats.encode_usage_percent;
2244 2245
2245 info.nominal_bitrate = stats.media_bitrate_bps; 2246 info.nominal_bitrate = stats.media_bitrate_bps;
2246 2247
2247 info.send_frame_width = 0; 2248 info.send_frame_width = 0;
2248 info.send_frame_height = 0; 2249 info.send_frame_height = 0;
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
2598 } 2599 }
2599 return ""; 2600 return "";
2600 } 2601 }
2601 2602
2602 VideoReceiverInfo 2603 VideoReceiverInfo
2603 WebRtcVideoChannel2::WebRtcVideoReceiveStream::GetVideoReceiverInfo() { 2604 WebRtcVideoChannel2::WebRtcVideoReceiveStream::GetVideoReceiverInfo() {
2604 VideoReceiverInfo info; 2605 VideoReceiverInfo info;
2605 info.ssrc_groups = ssrc_groups_; 2606 info.ssrc_groups = ssrc_groups_;
2606 info.add_ssrc(config_.rtp.remote_ssrc); 2607 info.add_ssrc(config_.rtp.remote_ssrc);
2607 webrtc::VideoReceiveStream::Stats stats = stream_->GetStats(); 2608 webrtc::VideoReceiveStream::Stats stats = stream_->GetStats();
2609 info.decoder_implementation_name = stats.decoder_implementation_name;
2608 info.bytes_rcvd = stats.rtp_stats.transmitted.payload_bytes + 2610 info.bytes_rcvd = stats.rtp_stats.transmitted.payload_bytes +
2609 stats.rtp_stats.transmitted.header_bytes + 2611 stats.rtp_stats.transmitted.header_bytes +
2610 stats.rtp_stats.transmitted.padding_bytes; 2612 stats.rtp_stats.transmitted.padding_bytes;
2611 info.packets_rcvd = stats.rtp_stats.transmitted.packets; 2613 info.packets_rcvd = stats.rtp_stats.transmitted.packets;
2612 info.packets_lost = stats.rtcp_stats.cumulative_lost; 2614 info.packets_lost = stats.rtcp_stats.cumulative_lost;
2613 info.fraction_lost = 2615 info.fraction_lost =
2614 static_cast<float>(stats.rtcp_stats.fraction_lost) / (1 << 8); 2616 static_cast<float>(stats.rtcp_stats.fraction_lost) / (1 << 8);
2615 2617
2616 info.framerate_rcvd = stats.network_frame_rate; 2618 info.framerate_rcvd = stats.network_frame_rate;
2617 info.framerate_decoded = stats.decode_frame_rate; 2619 info.framerate_decoded = stats.decode_frame_rate;
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
2749 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; 2751 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id];
2750 } 2752 }
2751 } 2753 }
2752 2754
2753 return video_codecs; 2755 return video_codecs;
2754 } 2756 }
2755 2757
2756 } // namespace cricket 2758 } // namespace cricket
2757 2759
2758 #endif // HAVE_WEBRTC_VIDEO 2760 #endif // HAVE_WEBRTC_VIDEO
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698