OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2004 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 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1176 } | 1176 } |
1177 | 1177 |
1178 return opt_codec; | 1178 return opt_codec; |
1179 }; | 1179 }; |
1180 | 1180 |
1181 for (const auto& spec : specs) { | 1181 for (const auto& spec : specs) { |
1182 // We need to do some extra stuff before adding the main codecs to out. | 1182 // We need to do some extra stuff before adding the main codecs to out. |
1183 rtc::Optional<AudioCodec> opt_codec = map_format(spec.format, nullptr); | 1183 rtc::Optional<AudioCodec> opt_codec = map_format(spec.format, nullptr); |
1184 if (opt_codec) { | 1184 if (opt_codec) { |
1185 AudioCodec& codec = *opt_codec; | 1185 AudioCodec& codec = *opt_codec; |
1186 if (spec.supports_network_adaption) { | 1186 if (spec.info.supports_network_adaption) { |
1187 codec.AddFeedbackParam( | 1187 codec.AddFeedbackParam( |
1188 FeedbackParam(kRtcpFbParamTransportCc, kParamValueEmpty)); | 1188 FeedbackParam(kRtcpFbParamTransportCc, kParamValueEmpty)); |
1189 } | 1189 } |
1190 | 1190 |
1191 if (spec.allow_comfort_noise) { | 1191 if (spec.info.allow_comfort_noise) { |
1192 // Generate a CN entry if the decoder allows it and we support the | 1192 // Generate a CN entry if the decoder allows it and we support the |
1193 // clockrate. | 1193 // clockrate. |
1194 auto cn = generate_cn.find(spec.format.clockrate_hz); | 1194 auto cn = generate_cn.find(spec.format.clockrate_hz); |
1195 if (cn != generate_cn.end()) { | 1195 if (cn != generate_cn.end()) { |
1196 cn->second = true; | 1196 cn->second = true; |
1197 } | 1197 } |
1198 } | 1198 } |
1199 | 1199 |
1200 // Generate a telephone-event entry if we support the clockrate. | 1200 // Generate a telephone-event entry if we support the clockrate. |
1201 auto dtmf = generate_dtmf.find(spec.format.clockrate_hz); | 1201 auto dtmf = generate_dtmf.find(spec.format.clockrate_hz); |
(...skipping 1496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2698 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 2698 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
2699 const auto it = send_streams_.find(ssrc); | 2699 const auto it = send_streams_.find(ssrc); |
2700 if (it != send_streams_.end()) { | 2700 if (it != send_streams_.end()) { |
2701 return it->second->channel(); | 2701 return it->second->channel(); |
2702 } | 2702 } |
2703 return -1; | 2703 return -1; |
2704 } | 2704 } |
2705 } // namespace cricket | 2705 } // namespace cricket |
2706 | 2706 |
2707 #endif // HAVE_WEBRTC_VOICE | 2707 #endif // HAVE_WEBRTC_VOICE |
OLD | NEW |