OLD | NEW |
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 Loading... |
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 << ", "; |
| 115 ss << "total_bps: " << total_bitrate_bps << ", "; |
| 116 ss << "width: " << width << ", "; |
| 117 ss << "height: " << height << ", "; |
| 118 ss << "key: " << frame_counts.key_frames << ", "; |
| 119 ss << "delta: " << frame_counts.delta_frames << ", "; |
| 120 ss << "network_fps: " << network_frame_rate << ", "; |
| 121 ss << "decode_fps: " << decode_frame_rate << ", "; |
| 122 ss << "render_fps: " << render_frame_rate << ", "; |
| 123 ss << "decode_ms: " << decode_ms << ", "; |
| 124 ss << "max_decode_ms: " << max_decode_ms << ", "; |
| 125 ss << "cur_delay_ms: " << current_delay_ms << ", "; |
| 126 ss << "targ_delay_ms: " << target_delay_ms << ", "; |
| 127 ss << "jb_delay_ms: " << jitter_buffer_ms << ", "; |
| 128 ss << "min_playout_delay_ms: " << min_playout_delay_ms << ", "; |
| 129 ss << "discarded: " << discarded_packets << ", "; |
| 130 ss << "sync_offset_ms: " << sync_offset_ms << ", "; |
| 131 ss << "cum_loss: " << rtcp_stats.cumulative_lost << ", "; |
| 132 ss << "max_ext_seq: " << rtcp_stats.extended_max_sequence_number << ", "; |
| 133 ss << "nack: " << rtcp_packet_type_counts.nack_packets << ", "; |
| 134 ss << "fir: " << rtcp_packet_type_counts.fir_packets << ", "; |
| 135 ss << "pli: " << rtcp_packet_type_counts.pli_packets; |
| 136 ss << '}'; |
| 137 return ss.str(); |
| 138 } |
| 139 |
112 namespace { | 140 namespace { |
113 VideoCodec CreateDecoderVideoCodec(const VideoReceiveStream::Decoder& decoder) { | 141 VideoCodec CreateDecoderVideoCodec(const VideoReceiveStream::Decoder& decoder) { |
114 VideoCodec codec; | 142 VideoCodec codec; |
115 memset(&codec, 0, sizeof(codec)); | 143 memset(&codec, 0, sizeof(codec)); |
116 | 144 |
117 codec.plType = decoder.payload_type; | 145 codec.plType = decoder.payload_type; |
118 strncpy(codec.plName, decoder.payload_name.c_str(), sizeof(codec.plName)); | 146 strncpy(codec.plName, decoder.payload_name.c_str(), sizeof(codec.plName)); |
119 if (decoder.payload_name == "VP8") { | 147 if (decoder.payload_name == "VP8") { |
120 codec.codecType = kVideoCodecVP8; | 148 codec.codecType = kVideoCodecVP8; |
121 } else if (decoder.payload_name == "VP9") { | 149 } else if (decoder.payload_name == "VP9") { |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 const std::vector<uint16_t>& sequence_numbers) { | 390 const std::vector<uint16_t>& sequence_numbers) { |
363 rtp_stream_receiver_.RequestPacketRetransmit(sequence_numbers); | 391 rtp_stream_receiver_.RequestPacketRetransmit(sequence_numbers); |
364 } | 392 } |
365 | 393 |
366 void VideoReceiveStream::RequestKeyFrame() { | 394 void VideoReceiveStream::RequestKeyFrame() { |
367 rtp_stream_receiver_.RequestKeyFrame(); | 395 rtp_stream_receiver_.RequestKeyFrame(); |
368 } | 396 } |
369 | 397 |
370 } // namespace internal | 398 } // namespace internal |
371 } // namespace webrtc | 399 } // namespace webrtc |
OLD | NEW |