| 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 ss << ", local_renderer: " | 153 ss << ", local_renderer: " |
| 154 << (local_renderer ? "(VideoRenderer)" : "nullptr"); | 154 << (local_renderer ? "(VideoRenderer)" : "nullptr"); |
| 155 ss << ", render_delay_ms: " << render_delay_ms; | 155 ss << ", render_delay_ms: " << render_delay_ms; |
| 156 ss << ", target_delay_ms: " << target_delay_ms; | 156 ss << ", target_delay_ms: " << target_delay_ms; |
| 157 ss << ", suspend_below_min_bitrate: " << (suspend_below_min_bitrate ? "on" | 157 ss << ", suspend_below_min_bitrate: " << (suspend_below_min_bitrate ? "on" |
| 158 : "off"); | 158 : "off"); |
| 159 ss << '}'; | 159 ss << '}'; |
| 160 return ss.str(); | 160 return ss.str(); |
| 161 } | 161 } |
| 162 | 162 |
| 163 std::string VideoSendStream::Stats::ToString(int64_t time_ms) const { |
| 164 std::stringstream ss; |
| 165 ss << "VideoSendStream stats:" << time_ms << ",{"; |
| 166 ss << "[in_fps:" << input_frame_rate << "],"; |
| 167 ss << "[enc_fps:" << encode_frame_rate << "],"; |
| 168 ss << "[enc_ms:" << avg_encode_time_ms << "],"; |
| 169 ss << "[enc_usage_perc:" << encode_usage_percent << "],"; |
| 170 ss << "[target_bps:" << target_media_bitrate_bps << "],"; |
| 171 ss << "[media_bps:" << media_bitrate_bps << "],"; |
| 172 ss << "[suspended:" << (suspended ? "true" : "false") << "],"; |
| 173 ss << "[bw_adapted:" << (bw_limited_resolution ? "true" : "false") << "]"; |
| 174 ss << '}'; |
| 175 for (const auto& substream : substreams) { |
| 176 ss << " {ssrc:" << substream.first << ","; |
| 177 ss << substream.second.ToString(); |
| 178 ss << '}'; |
| 179 } |
| 180 return ss.str(); |
| 181 } |
| 182 |
| 183 std::string VideoSendStream::StreamStats::ToString() const { |
| 184 std::stringstream ss; |
| 185 ss << "[w:" << width << "],"; |
| 186 ss << "[h:" << height << "],"; |
| 187 ss << "[key:" << frame_counts.key_frames << "],"; |
| 188 ss << "[delta:" << frame_counts.delta_frames << "],"; |
| 189 ss << "[tot_bps:" << total_bitrate_bps << "],"; |
| 190 ss << "[retransmit_bps:" << retransmit_bitrate_bps << "],"; |
| 191 ss << "[avg_delay_ms:" << avg_delay_ms << "],"; |
| 192 ss << "[max_delay_ms:" << max_delay_ms << "],"; |
| 193 ss << "[nack:" << rtcp_packet_type_counts.nack_packets << "],"; |
| 194 ss << "[fir:" << rtcp_packet_type_counts.fir_packets << "],"; |
| 195 ss << "[pli:" << rtcp_packet_type_counts.pli_packets << "]"; |
| 196 return ss.str(); |
| 197 } |
| 198 |
| 163 namespace { | 199 namespace { |
| 164 | 200 |
| 165 VideoCodecType PayloadNameToCodecType(const std::string& payload_name) { | 201 VideoCodecType PayloadNameToCodecType(const std::string& payload_name) { |
| 166 if (payload_name == "VP8") | 202 if (payload_name == "VP8") |
| 167 return kVideoCodecVP8; | 203 return kVideoCodecVP8; |
| 168 if (payload_name == "VP9") | 204 if (payload_name == "VP9") |
| 169 return kVideoCodecVP9; | 205 return kVideoCodecVP9; |
| 170 if (payload_name == "H264") | 206 if (payload_name == "H264") |
| 171 return kVideoCodecH264; | 207 return kVideoCodecH264; |
| 172 return kVideoCodecGeneric; | 208 return kVideoCodecGeneric; |
| (...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 930 &module_nack_rate); | 966 &module_nack_rate); |
| 931 *sent_video_rate_bps += module_video_rate; | 967 *sent_video_rate_bps += module_video_rate; |
| 932 *sent_nack_rate_bps += module_nack_rate; | 968 *sent_nack_rate_bps += module_nack_rate; |
| 933 *sent_fec_rate_bps += module_fec_rate; | 969 *sent_fec_rate_bps += module_fec_rate; |
| 934 } | 970 } |
| 935 return 0; | 971 return 0; |
| 936 } | 972 } |
| 937 | 973 |
| 938 } // namespace internal | 974 } // namespace internal |
| 939 } // namespace webrtc | 975 } // namespace webrtc |
| OLD | NEW |