pbos@webrtc.org | 1e92b0a | 2014-05-15 09:35:06 +0000 | [diff] [blame] | 1 | /* |
| 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 | |
| 15 | namespace webrtc { |
| 16 | std::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 | |
| 24 | std::string RtpExtension::ToString() const { |
| 25 | std::stringstream ss; |
| 26 | ss << "{name: " << name; |
| 27 | ss << ", id: " << id; |
| 28 | ss << '}'; |
| 29 | return ss.str(); |
| 30 | } |
| 31 | |
| 32 | std::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 | |
| 42 | ss << ", temporal_layers: {"; |
| 43 | for (size_t i = 0; i < temporal_layers.size(); ++i) { |
| 44 | ss << temporal_layers[i]; |
| 45 | if (i != temporal_layers.size() - 1) |
| 46 | ss << "}, {"; |
| 47 | } |
| 48 | ss << '}'; |
| 49 | |
| 50 | ss << '}'; |
| 51 | return ss.str(); |
| 52 | } |
pbos@webrtc.org | ad3b5a5 | 2014-10-24 09:23:21 +0000 | [diff] [blame] | 53 | |
| 54 | std::string VideoEncoderConfig::ToString() const { |
| 55 | std::stringstream ss; |
| 56 | |
| 57 | ss << "{streams: {"; |
| 58 | for (size_t i = 0; i < streams.size(); ++i) { |
| 59 | ss << streams[i].ToString(); |
| 60 | if (i != streams.size() - 1) |
| 61 | ss << "}, {"; |
| 62 | } |
| 63 | ss << '}'; |
| 64 | 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.org | 1e92b0a | 2014-05-15 09:35:06 +0000 | [diff] [blame] | 81 | } // namespace webrtc |