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

Side by Side Diff: webrtc/media/engine/webrtcvideoengine.cc

Issue 2992043002: Renamed fields in common_types.h/RtcpStatistics. (Closed)
Patch Set: Created 3 years, 4 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 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 2019 matching lines...) Expand 10 before | Expand all | Expand 10 after
2030 info.send_frame_height = 0; 2030 info.send_frame_height = 0;
2031 for (std::map<uint32_t, webrtc::VideoSendStream::StreamStats>::iterator it = 2031 for (std::map<uint32_t, webrtc::VideoSendStream::StreamStats>::iterator it =
2032 stats.substreams.begin(); 2032 stats.substreams.begin();
2033 it != stats.substreams.end(); ++it) { 2033 it != stats.substreams.end(); ++it) {
2034 // TODO(pbos): Wire up additional stats, such as padding bytes. 2034 // TODO(pbos): Wire up additional stats, such as padding bytes.
2035 webrtc::VideoSendStream::StreamStats stream_stats = it->second; 2035 webrtc::VideoSendStream::StreamStats stream_stats = it->second;
2036 info.bytes_sent += stream_stats.rtp_stats.transmitted.payload_bytes + 2036 info.bytes_sent += stream_stats.rtp_stats.transmitted.payload_bytes +
2037 stream_stats.rtp_stats.transmitted.header_bytes + 2037 stream_stats.rtp_stats.transmitted.header_bytes +
2038 stream_stats.rtp_stats.transmitted.padding_bytes; 2038 stream_stats.rtp_stats.transmitted.padding_bytes;
2039 info.packets_sent += stream_stats.rtp_stats.transmitted.packets; 2039 info.packets_sent += stream_stats.rtp_stats.transmitted.packets;
2040 info.packets_lost += stream_stats.rtcp_stats.cumulative_lost; 2040 info.packets_lost += stream_stats.rtcp_stats.packets_lost;
2041 if (stream_stats.width > info.send_frame_width) 2041 if (stream_stats.width > info.send_frame_width)
2042 info.send_frame_width = stream_stats.width; 2042 info.send_frame_width = stream_stats.width;
2043 if (stream_stats.height > info.send_frame_height) 2043 if (stream_stats.height > info.send_frame_height)
2044 info.send_frame_height = stream_stats.height; 2044 info.send_frame_height = stream_stats.height;
2045 info.firs_rcvd += stream_stats.rtcp_packet_type_counts.fir_packets; 2045 info.firs_rcvd += stream_stats.rtcp_packet_type_counts.fir_packets;
2046 info.nacks_rcvd += stream_stats.rtcp_packet_type_counts.nack_packets; 2046 info.nacks_rcvd += stream_stats.rtcp_packet_type_counts.nack_packets;
2047 info.plis_rcvd += stream_stats.rtcp_packet_type_counts.pli_packets; 2047 info.plis_rcvd += stream_stats.rtcp_packet_type_counts.pli_packets;
2048 } 2048 }
2049 2049
2050 if (!stats.substreams.empty()) { 2050 if (!stats.substreams.empty()) {
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
2419 webrtc::VideoReceiveStream::Stats stats = stream_->GetStats(); 2419 webrtc::VideoReceiveStream::Stats stats = stream_->GetStats();
2420 info.decoder_implementation_name = stats.decoder_implementation_name; 2420 info.decoder_implementation_name = stats.decoder_implementation_name;
2421 if (stats.current_payload_type != -1) { 2421 if (stats.current_payload_type != -1) {
2422 info.codec_payload_type = rtc::Optional<int>( 2422 info.codec_payload_type = rtc::Optional<int>(
2423 stats.current_payload_type); 2423 stats.current_payload_type);
2424 } 2424 }
2425 info.bytes_rcvd = stats.rtp_stats.transmitted.payload_bytes + 2425 info.bytes_rcvd = stats.rtp_stats.transmitted.payload_bytes +
2426 stats.rtp_stats.transmitted.header_bytes + 2426 stats.rtp_stats.transmitted.header_bytes +
2427 stats.rtp_stats.transmitted.padding_bytes; 2427 stats.rtp_stats.transmitted.padding_bytes;
2428 info.packets_rcvd = stats.rtp_stats.transmitted.packets; 2428 info.packets_rcvd = stats.rtp_stats.transmitted.packets;
2429 info.packets_lost = stats.rtcp_stats.cumulative_lost; 2429 info.packets_lost = stats.rtcp_stats.packets_lost;
2430 info.fraction_lost = 2430 info.fraction_lost =
2431 static_cast<float>(stats.rtcp_stats.fraction_lost) / (1 << 8); 2431 static_cast<float>(stats.rtcp_stats.fraction_lost) / (1 << 8);
2432 2432
2433 info.framerate_rcvd = stats.network_frame_rate; 2433 info.framerate_rcvd = stats.network_frame_rate;
2434 info.framerate_decoded = stats.decode_frame_rate; 2434 info.framerate_decoded = stats.decode_frame_rate;
2435 info.framerate_output = stats.render_frame_rate; 2435 info.framerate_output = stats.render_frame_rate;
2436 info.frame_width = stats.width; 2436 info.frame_width = stats.width;
2437 info.frame_height = stats.height; 2437 info.frame_height = stats.height;
2438 2438
2439 { 2439 {
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
2641 stream.temporal_layer_thresholds_bps.resize(GetDefaultVp9TemporalLayers() - 2641 stream.temporal_layer_thresholds_bps.resize(GetDefaultVp9TemporalLayers() -
2642 1); 2642 1);
2643 } 2643 }
2644 2644
2645 std::vector<webrtc::VideoStream> streams; 2645 std::vector<webrtc::VideoStream> streams;
2646 streams.push_back(stream); 2646 streams.push_back(stream);
2647 return streams; 2647 return streams;
2648 } 2648 }
2649 2649
2650 } // namespace cricket 2650 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698