OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 #include "webrtc/config.h" | 10 #include "webrtc/config.h" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 ss << ']'; | 110 ss << ']'; |
111 | 111 |
112 ss << '}'; | 112 ss << '}'; |
113 return ss.str(); | 113 return ss.str(); |
114 } | 114 } |
115 | 115 |
116 VideoEncoderConfig::VideoEncoderConfig() | 116 VideoEncoderConfig::VideoEncoderConfig() |
117 : content_type(ContentType::kRealtimeVideo), | 117 : content_type(ContentType::kRealtimeVideo), |
118 encoder_specific_settings(nullptr), | 118 encoder_specific_settings(nullptr), |
119 min_transmit_bitrate_bps(0), | 119 min_transmit_bitrate_bps(0), |
120 max_bitrate_bps(0), | 120 expect_encode_from_texture(false) {} |
121 number_of_streams(0) {} | |
122 | 121 |
123 VideoEncoderConfig::~VideoEncoderConfig() = default; | 122 VideoEncoderConfig::~VideoEncoderConfig() = default; |
124 | 123 |
125 std::string VideoEncoderConfig::ToString() const { | 124 std::string VideoEncoderConfig::ToString() const { |
126 std::stringstream ss; | 125 std::stringstream ss; |
127 ss << "{content_type: "; | 126 |
| 127 ss << "{streams: ["; |
| 128 for (size_t i = 0; i < streams.size(); ++i) { |
| 129 ss << streams[i].ToString(); |
| 130 if (i != streams.size() - 1) |
| 131 ss << ", "; |
| 132 } |
| 133 ss << ']'; |
| 134 ss << ", content_type: "; |
128 switch (content_type) { | 135 switch (content_type) { |
129 case ContentType::kRealtimeVideo: | 136 case ContentType::kRealtimeVideo: |
130 ss << "kRealtimeVideo"; | 137 ss << "kRealtimeVideo"; |
131 break; | 138 break; |
132 case ContentType::kScreen: | 139 case ContentType::kScreen: |
133 ss << "kScreenshare"; | 140 ss << "kScreenshare"; |
134 break; | 141 break; |
135 } | 142 } |
136 ss << ", encoder_specific_settings: "; | 143 ss << ", encoder_specific_settings: "; |
137 ss << (encoder_specific_settings != NULL ? "(ptr)" : "NULL"); | 144 ss << (encoder_specific_settings != NULL ? "(ptr)" : "NULL"); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 VideoEncoderConfig::Vp9EncoderSpecificSettings::Vp9EncoderSpecificSettings( | 197 VideoEncoderConfig::Vp9EncoderSpecificSettings::Vp9EncoderSpecificSettings( |
191 const VideoCodecVP9& specifics) | 198 const VideoCodecVP9& specifics) |
192 : specifics_(specifics) {} | 199 : specifics_(specifics) {} |
193 | 200 |
194 void VideoEncoderConfig::Vp9EncoderSpecificSettings::FillVideoCodecVp9( | 201 void VideoEncoderConfig::Vp9EncoderSpecificSettings::FillVideoCodecVp9( |
195 VideoCodecVP9* vp9_settings) const { | 202 VideoCodecVP9* vp9_settings) const { |
196 *vp9_settings = specifics_; | 203 *vp9_settings = specifics_; |
197 } | 204 } |
198 | 205 |
199 } // namespace webrtc | 206 } // namespace webrtc |
OLD | NEW |