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

Side by Side Diff: webrtc/video/video_receive_stream.cc

Issue 2133073002: Add periodic logging of video stats. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase, address comments Created 4 years, 5 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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 for (size_t i = 0; i < extensions.size(); ++i) { 102 for (size_t i = 0; i < extensions.size(); ++i) {
103 ss << extensions[i].ToString(); 103 ss << extensions[i].ToString();
104 if (i != extensions.size() - 1) 104 if (i != extensions.size() - 1)
105 ss << ", "; 105 ss << ", ";
106 } 106 }
107 ss << ']'; 107 ss << ']';
108 ss << '}'; 108 ss << '}';
109 return ss.str(); 109 return ss.str();
110 } 110 }
111 111
112 std::string VideoReceiveStream::Stats::ToString(int64_t time_ms) const {
113 std::stringstream ss;
114 ss << "VideoReceiveStream stats:" << time_ms << ", {ssrc:" << ssrc << ", ";
stefan-webrtc 2016/08/01 11:14:09 I'd prefer having a space after each ":", same in
åsapersson 2016/08/01 15:55:22 Done.
115 ss << "total_bps:" << total_bitrate_bps << ", ";
116 ss << "width:" << width << ", ";
117 ss << "height:" << height << ", ";
118 ss << "network_fps:" << network_frame_rate << ", ";
119 ss << "decode_fps:" << decode_frame_rate << ", ";
120 ss << "render_fps:" << render_frame_rate << ", ";
121 ss << "decode_ms:" << decode_ms << ", ";
122 ss << "max_decode_ms:" << max_decode_ms << ", ";
123 ss << "cur_delay_ms:" << current_delay_ms << ", ";
124 ss << "targ_delay_ms:" << target_delay_ms << ", ";
125 ss << "jb_delay_ms:" << jitter_buffer_ms << ", ";
126 ss << "min_playout_delay_ms:" << min_playout_delay_ms << ", ";
127 ss << "discarded:" << discarded_packets;
128 ss << '}';
129 return ss.str();
130 }
131
112 namespace { 132 namespace {
113 VideoCodec CreateDecoderVideoCodec(const VideoReceiveStream::Decoder& decoder) { 133 VideoCodec CreateDecoderVideoCodec(const VideoReceiveStream::Decoder& decoder) {
114 VideoCodec codec; 134 VideoCodec codec;
115 memset(&codec, 0, sizeof(codec)); 135 memset(&codec, 0, sizeof(codec));
116 136
117 codec.plType = decoder.payload_type; 137 codec.plType = decoder.payload_type;
118 strncpy(codec.plName, decoder.payload_name.c_str(), sizeof(codec.plName)); 138 strncpy(codec.plName, decoder.payload_name.c_str(), sizeof(codec.plName));
119 if (decoder.payload_name == "VP8") { 139 if (decoder.payload_name == "VP8") {
120 codec.codecType = kVideoCodecVP8; 140 codec.codecType = kVideoCodecVP8;
121 } else if (decoder.payload_name == "VP9") { 141 } else if (decoder.payload_name == "VP9") {
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 const std::vector<uint16_t>& sequence_numbers) { 382 const std::vector<uint16_t>& sequence_numbers) {
363 rtp_stream_receiver_.RequestPacketRetransmit(sequence_numbers); 383 rtp_stream_receiver_.RequestPacketRetransmit(sequence_numbers);
364 } 384 }
365 385
366 void VideoReceiveStream::RequestKeyFrame() { 386 void VideoReceiveStream::RequestKeyFrame() {
367 rtp_stream_receiver_.RequestKeyFrame(); 387 rtp_stream_receiver_.RequestKeyFrame();
368 } 388 }
369 389
370 } // namespace internal 390 } // namespace internal
371 } // namespace webrtc 391 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698