OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 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 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1259 add_legacy_(true), | 1259 add_legacy_(true), |
1260 transport_desc_factory_(transport_desc_factory) { | 1260 transport_desc_factory_(transport_desc_factory) { |
1261 } | 1261 } |
1262 | 1262 |
1263 MediaSessionDescriptionFactory::MediaSessionDescriptionFactory( | 1263 MediaSessionDescriptionFactory::MediaSessionDescriptionFactory( |
1264 ChannelManager* channel_manager, | 1264 ChannelManager* channel_manager, |
1265 const TransportDescriptionFactory* transport_desc_factory) | 1265 const TransportDescriptionFactory* transport_desc_factory) |
1266 : secure_(SEC_DISABLED), | 1266 : secure_(SEC_DISABLED), |
1267 add_legacy_(true), | 1267 add_legacy_(true), |
1268 transport_desc_factory_(transport_desc_factory) { | 1268 transport_desc_factory_(transport_desc_factory) { |
| 1269 #ifdef HAVE_MEDIA |
1269 channel_manager->GetSupportedAudioSendCodecs(&audio_send_codecs_); | 1270 channel_manager->GetSupportedAudioSendCodecs(&audio_send_codecs_); |
1270 channel_manager->GetSupportedAudioReceiveCodecs(&audio_recv_codecs_); | 1271 channel_manager->GetSupportedAudioReceiveCodecs(&audio_recv_codecs_); |
1271 channel_manager->GetSupportedAudioRtpHeaderExtensions(&audio_rtp_extensions_); | 1272 channel_manager->GetSupportedAudioRtpHeaderExtensions(&audio_rtp_extensions_); |
1272 channel_manager->GetSupportedVideoCodecs(&video_codecs_); | 1273 channel_manager->GetSupportedVideoCodecs(&video_codecs_); |
1273 channel_manager->GetSupportedVideoRtpHeaderExtensions(&video_rtp_extensions_); | 1274 channel_manager->GetSupportedVideoRtpHeaderExtensions(&video_rtp_extensions_); |
1274 channel_manager->GetSupportedDataCodecs(&data_codecs_); | 1275 channel_manager->GetSupportedDataCodecs(&data_codecs_); |
1275 NegotiateCodecs(audio_recv_codecs_, audio_send_codecs_, | 1276 NegotiateCodecs(audio_recv_codecs_, audio_send_codecs_, |
1276 &audio_sendrecv_codecs_); | 1277 &audio_sendrecv_codecs_); |
| 1278 #endif |
1277 } | 1279 } |
1278 | 1280 |
1279 const AudioCodecs& MediaSessionDescriptionFactory::audio_sendrecv_codecs() | 1281 const AudioCodecs& MediaSessionDescriptionFactory::audio_sendrecv_codecs() |
1280 const { | 1282 const { |
1281 return audio_sendrecv_codecs_; | 1283 return audio_sendrecv_codecs_; |
1282 } | 1284 } |
1283 | 1285 |
1284 const AudioCodecs& MediaSessionDescriptionFactory::audio_send_codecs() const { | 1286 const AudioCodecs& MediaSessionDescriptionFactory::audio_send_codecs() const { |
1285 return audio_send_codecs_; | 1287 return audio_send_codecs_; |
1286 } | 1288 } |
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2183 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO)); | 2185 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO)); |
2184 } | 2186 } |
2185 | 2187 |
2186 DataContentDescription* GetFirstDataContentDescription( | 2188 DataContentDescription* GetFirstDataContentDescription( |
2187 SessionDescription* sdesc) { | 2189 SessionDescription* sdesc) { |
2188 return static_cast<DataContentDescription*>( | 2190 return static_cast<DataContentDescription*>( |
2189 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA)); | 2191 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA)); |
2190 } | 2192 } |
2191 | 2193 |
2192 } // namespace cricket | 2194 } // namespace cricket |
OLD | NEW |