| 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 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 std::string UlpfecConfig::ToString() const { | 25 std::string UlpfecConfig::ToString() const { |
| 26 std::stringstream ss; | 26 std::stringstream ss; |
| 27 ss << "{ulpfec_payload_type: " << ulpfec_payload_type; | 27 ss << "{ulpfec_payload_type: " << ulpfec_payload_type; |
| 28 ss << ", red_payload_type: " << red_payload_type; | 28 ss << ", red_payload_type: " << red_payload_type; |
| 29 ss << ", red_rtx_payload_type: " << red_rtx_payload_type; | 29 ss << ", red_rtx_payload_type: " << red_rtx_payload_type; |
| 30 ss << '}'; | 30 ss << '}'; |
| 31 return ss.str(); | 31 return ss.str(); |
| 32 } | 32 } |
| 33 | 33 |
| 34 FlexfecConfig::FlexfecConfig() |
| 35 : flexfec_payload_type(-1), flexfec_ssrc(0), protected_media_ssrcs() {} |
| 36 |
| 37 FlexfecConfig::~FlexfecConfig() = default; |
| 38 |
| 34 std::string FlexfecConfig::ToString() const { | 39 std::string FlexfecConfig::ToString() const { |
| 35 std::stringstream ss; | 40 std::stringstream ss; |
| 36 ss << "{flexfec_payload_type: " << flexfec_payload_type; | 41 ss << "{flexfec_payload_type: " << flexfec_payload_type; |
| 37 ss << ", flexfec_ssrc: " << flexfec_ssrc; | 42 ss << ", flexfec_ssrc: " << flexfec_ssrc; |
| 38 ss << ", protected_media_ssrcs: ["; | 43 ss << ", protected_media_ssrcs: ["; |
| 39 size_t i = 0; | 44 size_t i = 0; |
| 40 for (; i + 1 < protected_media_ssrcs.size(); ++i) | 45 for (; i + 1 < protected_media_ssrcs.size(); ++i) |
| 41 ss << protected_media_ssrcs[i] << ", "; | 46 ss << protected_media_ssrcs[i] << ", "; |
| 42 if (!protected_media_ssrcs.empty()) | 47 if (!protected_media_ssrcs.empty()) |
| 43 ss << protected_media_ssrcs[i]; | 48 ss << protected_media_ssrcs[i]; |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 return ss.str(); | 132 return ss.str(); |
| 128 } | 133 } |
| 129 | 134 |
| 130 VideoEncoderConfig::VideoEncoderConfig() | 135 VideoEncoderConfig::VideoEncoderConfig() |
| 131 : content_type(ContentType::kRealtimeVideo), | 136 : content_type(ContentType::kRealtimeVideo), |
| 132 encoder_specific_settings(nullptr), | 137 encoder_specific_settings(nullptr), |
| 133 min_transmit_bitrate_bps(0), | 138 min_transmit_bitrate_bps(0), |
| 134 max_bitrate_bps(0), | 139 max_bitrate_bps(0), |
| 135 number_of_streams(0) {} | 140 number_of_streams(0) {} |
| 136 | 141 |
| 142 VideoEncoderConfig::VideoEncoderConfig(VideoEncoderConfig&&) = default; |
| 143 |
| 137 VideoEncoderConfig::~VideoEncoderConfig() = default; | 144 VideoEncoderConfig::~VideoEncoderConfig() = default; |
| 138 | 145 |
| 139 std::string VideoEncoderConfig::ToString() const { | 146 std::string VideoEncoderConfig::ToString() const { |
| 140 std::stringstream ss; | 147 std::stringstream ss; |
| 141 ss << "{content_type: "; | 148 ss << "{content_type: "; |
| 142 switch (content_type) { | 149 switch (content_type) { |
| 143 case ContentType::kRealtimeVideo: | 150 case ContentType::kRealtimeVideo: |
| 144 ss << "kRealtimeVideo"; | 151 ss << "kRealtimeVideo"; |
| 145 break; | 152 break; |
| 146 case ContentType::kScreen: | 153 case ContentType::kScreen: |
| 147 ss << "kScreenshare"; | 154 ss << "kScreenshare"; |
| 148 break; | 155 break; |
| 149 } | 156 } |
| 150 ss << ", encoder_specific_settings: "; | 157 ss << ", encoder_specific_settings: "; |
| 151 ss << (encoder_specific_settings != NULL ? "(ptr)" : "NULL"); | 158 ss << (encoder_specific_settings != NULL ? "(ptr)" : "NULL"); |
| 152 | 159 |
| 153 ss << ", min_transmit_bitrate_bps: " << min_transmit_bitrate_bps; | 160 ss << ", min_transmit_bitrate_bps: " << min_transmit_bitrate_bps; |
| 154 ss << '}'; | 161 ss << '}'; |
| 155 return ss.str(); | 162 return ss.str(); |
| 156 } | 163 } |
| 157 | 164 |
| 165 VideoEncoderConfig::VideoEncoderConfig(const VideoEncoderConfig&) = default; |
| 166 |
| 158 void VideoEncoderConfig::EncoderSpecificSettings::FillEncoderSpecificSettings( | 167 void VideoEncoderConfig::EncoderSpecificSettings::FillEncoderSpecificSettings( |
| 159 VideoCodec* codec) const { | 168 VideoCodec* codec) const { |
| 160 if (codec->codecType == kVideoCodecH264) { | 169 if (codec->codecType == kVideoCodecH264) { |
| 161 FillVideoCodecH264(&codec->codecSpecific.H264); | 170 FillVideoCodecH264(&codec->codecSpecific.H264); |
| 162 } else if (codec->codecType == kVideoCodecVP8) { | 171 } else if (codec->codecType == kVideoCodecVP8) { |
| 163 FillVideoCodecVp8(&codec->codecSpecific.VP8); | 172 FillVideoCodecVp8(&codec->codecSpecific.VP8); |
| 164 } else if (codec->codecType == kVideoCodecVP9) { | 173 } else if (codec->codecType == kVideoCodecVP9) { |
| 165 FillVideoCodecVp9(&codec->codecSpecific.VP9); | 174 FillVideoCodecVp9(&codec->codecSpecific.VP9); |
| 166 } else { | 175 } else { |
| 167 RTC_NOTREACHED() << "Encoder specifics set/used for unknown codec type."; | 176 RTC_NOTREACHED() << "Encoder specifics set/used for unknown codec type."; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 | 212 |
| 204 VideoEncoderConfig::Vp9EncoderSpecificSettings::Vp9EncoderSpecificSettings( | 213 VideoEncoderConfig::Vp9EncoderSpecificSettings::Vp9EncoderSpecificSettings( |
| 205 const VideoCodecVP9& specifics) | 214 const VideoCodecVP9& specifics) |
| 206 : specifics_(specifics) {} | 215 : specifics_(specifics) {} |
| 207 | 216 |
| 208 void VideoEncoderConfig::Vp9EncoderSpecificSettings::FillVideoCodecVp9( | 217 void VideoEncoderConfig::Vp9EncoderSpecificSettings::FillVideoCodecVp9( |
| 209 VideoCodecVP9* vp9_settings) const { | 218 VideoCodecVP9* vp9_settings) const { |
| 210 *vp9_settings = specifics_; | 219 *vp9_settings = specifics_; |
| 211 } | 220 } |
| 212 | 221 |
| 222 DecoderSpecificSettings::DecoderSpecificSettings() = default; |
| 223 |
| 224 DecoderSpecificSettings::~DecoderSpecificSettings() = default; |
| 225 |
| 213 } // namespace webrtc | 226 } // namespace webrtc |
| OLD | NEW |