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 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1132 } | 1132 } |
1133 | 1133 |
1134 return opt_codec; | 1134 return opt_codec; |
1135 }; | 1135 }; |
1136 | 1136 |
1137 for (const auto& spec : specs) { | 1137 for (const auto& spec : specs) { |
1138 // We need to do some extra stuff before adding the main codecs to out. | 1138 // We need to do some extra stuff before adding the main codecs to out. |
1139 rtc::Optional<AudioCodec> opt_codec = map_format(spec.format, nullptr); | 1139 rtc::Optional<AudioCodec> opt_codec = map_format(spec.format, nullptr); |
1140 if (opt_codec) { | 1140 if (opt_codec) { |
1141 AudioCodec& codec = *opt_codec; | 1141 AudioCodec& codec = *opt_codec; |
1142 if (spec.supports_network_adaption) { | 1142 if (spec.info.supports_network_adaption) { |
1143 codec.AddFeedbackParam( | 1143 codec.AddFeedbackParam( |
1144 FeedbackParam(kRtcpFbParamTransportCc, kParamValueEmpty)); | 1144 FeedbackParam(kRtcpFbParamTransportCc, kParamValueEmpty)); |
1145 } | 1145 } |
1146 | 1146 |
1147 if (spec.allow_comfort_noise) { | 1147 if (spec.info.allow_comfort_noise) { |
1148 // Generate a CN entry if the decoder allows it and we support the | 1148 // Generate a CN entry if the decoder allows it and we support the |
1149 // clockrate. | 1149 // clockrate. |
1150 auto cn = generate_cn.find(spec.format.clockrate_hz); | 1150 auto cn = generate_cn.find(spec.format.clockrate_hz); |
1151 if (cn != generate_cn.end()) { | 1151 if (cn != generate_cn.end()) { |
1152 cn->second = true; | 1152 cn->second = true; |
1153 } | 1153 } |
1154 } | 1154 } |
1155 | 1155 |
1156 // Generate a telephone-event entry if we support the clockrate. | 1156 // Generate a telephone-event entry if we support the clockrate. |
1157 auto dtmf = generate_dtmf.find(spec.format.clockrate_hz); | 1157 auto dtmf = generate_dtmf.find(spec.format.clockrate_hz); |
(...skipping 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2693 ssrc); | 2693 ssrc); |
2694 if (it != unsignaled_recv_ssrcs_.end()) { | 2694 if (it != unsignaled_recv_ssrcs_.end()) { |
2695 unsignaled_recv_ssrcs_.erase(it); | 2695 unsignaled_recv_ssrcs_.erase(it); |
2696 return true; | 2696 return true; |
2697 } | 2697 } |
2698 return false; | 2698 return false; |
2699 } | 2699 } |
2700 } // namespace cricket | 2700 } // namespace cricket |
2701 | 2701 |
2702 #endif // HAVE_WEBRTC_VOICE | 2702 #endif // HAVE_WEBRTC_VOICE |
OLD | NEW |