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

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: report what we fell back from Created 5 years, 2 months 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 2213 matching lines...) Expand 10 before | Expand all | Expand 10 after
2224 &last_captured_frame_format); 2224 &last_captured_frame_format);
2225 info.input_frame_width = last_captured_frame_format.width; 2225 info.input_frame_width = last_captured_frame_format.width;
2226 info.input_frame_height = last_captured_frame_format.height; 2226 info.input_frame_height = last_captured_frame_format.height;
2227 } 2227 }
2228 if (capturer_->video_adapter() != nullptr) { 2228 if (capturer_->video_adapter() != nullptr) {
2229 info.adapt_changes += capturer_->video_adapter()->adaptation_changes(); 2229 info.adapt_changes += capturer_->video_adapter()->adaptation_changes();
2230 info.adapt_reason = capturer_->video_adapter()->adapt_reason(); 2230 info.adapt_reason = capturer_->video_adapter()->adapt_reason();
2231 } 2231 }
2232 } 2232 }
2233 } 2233 }
2234 info.encoder_implementation_name = stats.encoder_implementation_name;
2234 info.ssrc_groups = ssrc_groups_; 2235 info.ssrc_groups = ssrc_groups_;
2235 info.framerate_input = stats.input_frame_rate; 2236 info.framerate_input = stats.input_frame_rate;
2236 info.framerate_sent = stats.encode_frame_rate; 2237 info.framerate_sent = stats.encode_frame_rate;
2237 info.avg_encode_ms = stats.avg_encode_time_ms; 2238 info.avg_encode_ms = stats.avg_encode_time_ms;
2238 info.encode_usage_percent = stats.encode_usage_percent; 2239 info.encode_usage_percent = stats.encode_usage_percent;
2239 2240
2240 info.nominal_bitrate = stats.media_bitrate_bps; 2241 info.nominal_bitrate = stats.media_bitrate_bps;
2241 2242
2242 info.send_frame_width = 0; 2243 info.send_frame_width = 0;
2243 info.send_frame_height = 0; 2244 info.send_frame_height = 0;
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
2593 } 2594 }
2594 return ""; 2595 return "";
2595 } 2596 }
2596 2597
2597 VideoReceiverInfo 2598 VideoReceiverInfo
2598 WebRtcVideoChannel2::WebRtcVideoReceiveStream::GetVideoReceiverInfo() { 2599 WebRtcVideoChannel2::WebRtcVideoReceiveStream::GetVideoReceiverInfo() {
2599 VideoReceiverInfo info; 2600 VideoReceiverInfo info;
2600 info.ssrc_groups = ssrc_groups_; 2601 info.ssrc_groups = ssrc_groups_;
2601 info.add_ssrc(config_.rtp.remote_ssrc); 2602 info.add_ssrc(config_.rtp.remote_ssrc);
2602 webrtc::VideoReceiveStream::Stats stats = stream_->GetStats(); 2603 webrtc::VideoReceiveStream::Stats stats = stream_->GetStats();
2604 info.decoder_implementation_name = stats.decoder_implementation_name;
2603 info.bytes_rcvd = stats.rtp_stats.transmitted.payload_bytes + 2605 info.bytes_rcvd = stats.rtp_stats.transmitted.payload_bytes +
2604 stats.rtp_stats.transmitted.header_bytes + 2606 stats.rtp_stats.transmitted.header_bytes +
2605 stats.rtp_stats.transmitted.padding_bytes; 2607 stats.rtp_stats.transmitted.padding_bytes;
2606 info.packets_rcvd = stats.rtp_stats.transmitted.packets; 2608 info.packets_rcvd = stats.rtp_stats.transmitted.packets;
2607 info.packets_lost = stats.rtcp_stats.cumulative_lost; 2609 info.packets_lost = stats.rtcp_stats.cumulative_lost;
2608 info.fraction_lost = 2610 info.fraction_lost =
2609 static_cast<float>(stats.rtcp_stats.fraction_lost) / (1 << 8); 2611 static_cast<float>(stats.rtcp_stats.fraction_lost) / (1 << 8);
2610 2612
2611 info.framerate_rcvd = stats.network_frame_rate; 2613 info.framerate_rcvd = stats.network_frame_rate;
2612 info.framerate_decoded = stats.decode_frame_rate; 2614 info.framerate_decoded = stats.decode_frame_rate;
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
2744 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; 2746 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id];
2745 } 2747 }
2746 } 2748 }
2747 2749
2748 return video_codecs; 2750 return video_codecs;
2749 } 2751 }
2750 2752
2751 } // namespace cricket 2753 } // namespace cricket
2752 2754
2753 #endif // HAVE_WEBRTC_VIDEO 2755 #endif // HAVE_WEBRTC_VIDEO
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698