blob: 357f636704528e680dbcd62419228d42bd4521ce [file] [log] [blame]
pbos@webrtc.org1e92b0a2014-05-15 09:35:06 +00001/*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10#include "webrtc/config.h"
11
12#include <sstream>
13#include <string>
14
15namespace webrtc {
16std::string FecConfig::ToString() const {
17 std::stringstream ss;
18 ss << "{ulpfec_payload_type: " << ulpfec_payload_type;
19 ss << ", red_payload_type: " << red_payload_type;
20 ss << '}';
21 return ss.str();
22}
23
24std::string RtpExtension::ToString() const {
25 std::stringstream ss;
26 ss << "{name: " << name;
27 ss << ", id: " << id;
28 ss << '}';
29 return ss.str();
30}
31
32std::string VideoStream::ToString() const {
33 std::stringstream ss;
34 ss << "{width: " << width;
35 ss << ", height: " << height;
36 ss << ", max_framerate: " << max_framerate;
37 ss << ", min_bitrate_bps:" << min_bitrate_bps;
38 ss << ", target_bitrate_bps:" << target_bitrate_bps;
39 ss << ", max_bitrate_bps:" << max_bitrate_bps;
40 ss << ", max_qp: " << max_qp;
41
pbos@webrtc.org931e3da2014-11-06 09:35:08 +000042 ss << ", temporal_layer_thresholds_bps: [";
pbos@webrtc.orgb7ed7792014-10-31 13:08:10 +000043 for (size_t i = 0; i < temporal_layer_thresholds_bps.size(); ++i) {
44 ss << temporal_layer_thresholds_bps[i];
45 if (i != temporal_layer_thresholds_bps.size() - 1)
pbos@webrtc.org931e3da2014-11-06 09:35:08 +000046 ss << ", ";
pbos@webrtc.org1e92b0a2014-05-15 09:35:06 +000047 }
pbos@webrtc.org931e3da2014-11-06 09:35:08 +000048 ss << ']';
pbos@webrtc.org1e92b0a2014-05-15 09:35:06 +000049
50 ss << '}';
51 return ss.str();
52}
pbos@webrtc.orgad3b5a52014-10-24 09:23:21 +000053
54std::string VideoEncoderConfig::ToString() const {
55 std::stringstream ss;
56
pbos@webrtc.org931e3da2014-11-06 09:35:08 +000057 ss << "{streams: [";
pbos@webrtc.orgad3b5a52014-10-24 09:23:21 +000058 for (size_t i = 0; i < streams.size(); ++i) {
59 ss << streams[i].ToString();
60 if (i != streams.size() - 1)
pbos@webrtc.org931e3da2014-11-06 09:35:08 +000061 ss << ", ";
pbos@webrtc.orgad3b5a52014-10-24 09:23:21 +000062 }
pbos@webrtc.org931e3da2014-11-06 09:35:08 +000063 ss << ']';
pbos@webrtc.orgad3b5a52014-10-24 09:23:21 +000064 ss << ", content_type: ";
65 switch (content_type) {
66 case kRealtimeVideo:
67 ss << "kRealtimeVideo";
68 break;
69 case kScreenshare:
70 ss << "kScreenshare";
71 break;
72 }
73 ss << ", encoder_specific_settings: ";
74 ss << (encoder_specific_settings != NULL ? "(ptr)" : "NULL");
75
76 ss << ", min_transmit_bitrate_bps: " << min_transmit_bitrate_bps;
77 ss << '}';
78 return ss.str();
79}
80
pbos@webrtc.org1e92b0a2014-05-15 09:35:06 +000081} // namespace webrtc