| 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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 private: | 397 private: |
| 398 static const int kDynamicPayloadTypeMin = 96; | 398 static const int kDynamicPayloadTypeMin = 96; |
| 399 static const int kDynamicPayloadTypeMax = 127; | 399 static const int kDynamicPayloadTypeMax = 127; |
| 400 }; | 400 }; |
| 401 | 401 |
| 402 // Helper class used for finding duplicate RTP Header extension ids among | 402 // Helper class used for finding duplicate RTP Header extension ids among |
| 403 // audio and video extensions. | 403 // audio and video extensions. |
| 404 class UsedRtpHeaderExtensionIds : public UsedIds<webrtc::RtpExtension> { | 404 class UsedRtpHeaderExtensionIds : public UsedIds<webrtc::RtpExtension> { |
| 405 public: | 405 public: |
| 406 UsedRtpHeaderExtensionIds() | 406 UsedRtpHeaderExtensionIds() |
| 407 : UsedIds<webrtc::RtpExtension>(kLocalIdMin, kLocalIdMax) {} | 407 : UsedIds<webrtc::RtpExtension>(webrtc::RtpExtension::kMinId, |
| 408 webrtc::RtpExtension::kMaxId) {} |
| 408 | 409 |
| 409 private: | 410 private: |
| 410 // Min and Max local identifier for one-byte header extensions, per RFC5285. | |
| 411 static const int kLocalIdMin = 1; | |
| 412 static const int kLocalIdMax = 14; | |
| 413 }; | 411 }; |
| 414 | 412 |
| 415 static bool IsSctp(const MediaContentDescription* desc) { | 413 static bool IsSctp(const MediaContentDescription* desc) { |
| 416 return ((desc->protocol() == kMediaProtocolSctp) || | 414 return ((desc->protocol() == kMediaProtocolSctp) || |
| 417 (desc->protocol() == kMediaProtocolDtlsSctp)); | 415 (desc->protocol() == kMediaProtocolDtlsSctp)); |
| 418 } | 416 } |
| 419 | 417 |
| 420 // Adds a StreamParams for each Stream in Streams with media type | 418 // Adds a StreamParams for each Stream in Streams with media type |
| 421 // media_type to content_description. | 419 // media_type to content_description. |
| 422 // |current_params| - All currently known StreamParams of any media type. | 420 // |current_params| - All currently known StreamParams of any media type. |
| (...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1274 } | 1272 } |
| 1275 | 1273 |
| 1276 MediaSessionDescriptionFactory::MediaSessionDescriptionFactory( | 1274 MediaSessionDescriptionFactory::MediaSessionDescriptionFactory( |
| 1277 ChannelManager* channel_manager, | 1275 ChannelManager* channel_manager, |
| 1278 const TransportDescriptionFactory* transport_desc_factory) | 1276 const TransportDescriptionFactory* transport_desc_factory) |
| 1279 : secure_(SEC_DISABLED), | 1277 : secure_(SEC_DISABLED), |
| 1280 add_legacy_(true), | 1278 add_legacy_(true), |
| 1281 transport_desc_factory_(transport_desc_factory) { | 1279 transport_desc_factory_(transport_desc_factory) { |
| 1282 channel_manager->GetSupportedAudioSendCodecs(&audio_send_codecs_); | 1280 channel_manager->GetSupportedAudioSendCodecs(&audio_send_codecs_); |
| 1283 channel_manager->GetSupportedAudioReceiveCodecs(&audio_recv_codecs_); | 1281 channel_manager->GetSupportedAudioReceiveCodecs(&audio_recv_codecs_); |
| 1284 channel_manager->GetSupportedAudioSendCodecs(&audio_send_codecs_); | |
| 1285 channel_manager->GetSupportedAudioRtpHeaderExtensions(&audio_rtp_extensions_); | 1282 channel_manager->GetSupportedAudioRtpHeaderExtensions(&audio_rtp_extensions_); |
| 1286 channel_manager->GetSupportedVideoCodecs(&video_codecs_); | 1283 channel_manager->GetSupportedVideoCodecs(&video_codecs_); |
| 1287 channel_manager->GetSupportedVideoRtpHeaderExtensions(&video_rtp_extensions_); | 1284 channel_manager->GetSupportedVideoRtpHeaderExtensions(&video_rtp_extensions_); |
| 1288 channel_manager->GetSupportedDataCodecs(&data_codecs_); | 1285 channel_manager->GetSupportedDataCodecs(&data_codecs_); |
| 1289 NegotiateCodecs(audio_recv_codecs_, audio_send_codecs_, | 1286 NegotiateCodecs(audio_recv_codecs_, audio_send_codecs_, |
| 1290 &audio_sendrecv_codecs_); | 1287 &audio_sendrecv_codecs_); |
| 1291 } | 1288 } |
| 1292 | 1289 |
| 1293 const AudioCodecs& MediaSessionDescriptionFactory::audio_sendrecv_codecs() | 1290 const AudioCodecs& MediaSessionDescriptionFactory::audio_sendrecv_codecs() |
| 1294 const { | 1291 const { |
| (...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2196 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO)); | 2193 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO)); |
| 2197 } | 2194 } |
| 2198 | 2195 |
| 2199 DataContentDescription* GetFirstDataContentDescription( | 2196 DataContentDescription* GetFirstDataContentDescription( |
| 2200 SessionDescription* sdesc) { | 2197 SessionDescription* sdesc) { |
| 2201 return static_cast<DataContentDescription*>( | 2198 return static_cast<DataContentDescription*>( |
| 2202 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA)); | 2199 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA)); |
| 2203 } | 2200 } |
| 2204 | 2201 |
| 2205 } // namespace cricket | 2202 } // namespace cricket |
| OLD | NEW |