Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: webrtc/pc/mediasession.cc

Issue 2675173003: Adding "adapter" ORTC objects on top of ChannelManager/BaseChannel/etc. (Closed)
Patch Set: Merge with master Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 private: 396 private:
397 static const int kDynamicPayloadTypeMin = 96; 397 static const int kDynamicPayloadTypeMin = 96;
398 static const int kDynamicPayloadTypeMax = 127; 398 static const int kDynamicPayloadTypeMax = 127;
399 }; 399 };
400 400
401 // Helper class used for finding duplicate RTP Header extension ids among 401 // Helper class used for finding duplicate RTP Header extension ids among
402 // audio and video extensions. 402 // audio and video extensions.
403 class UsedRtpHeaderExtensionIds : public UsedIds<webrtc::RtpExtension> { 403 class UsedRtpHeaderExtensionIds : public UsedIds<webrtc::RtpExtension> {
404 public: 404 public:
405 UsedRtpHeaderExtensionIds() 405 UsedRtpHeaderExtensionIds()
406 : UsedIds<webrtc::RtpExtension>(kLocalIdMin, kLocalIdMax) {} 406 : UsedIds<webrtc::RtpExtension>(webrtc::RtpExtension::kMinId,
407 webrtc::RtpExtension::kMaxId) {}
407 408
408 private: 409 private:
409 // Min and Max local identifier for one-byte header extensions, per RFC5285.
410 static const int kLocalIdMin = 1;
411 static const int kLocalIdMax = 14;
412 }; 410 };
413 411
414 static bool IsSctp(const MediaContentDescription* desc) { 412 static bool IsSctp(const MediaContentDescription* desc) {
415 return ((desc->protocol() == kMediaProtocolSctp) || 413 return ((desc->protocol() == kMediaProtocolSctp) ||
416 (desc->protocol() == kMediaProtocolDtlsSctp)); 414 (desc->protocol() == kMediaProtocolDtlsSctp));
417 } 415 }
418 416
419 // Adds a StreamParams for each Stream in Streams with media type 417 // Adds a StreamParams for each Stream in Streams with media type
420 // media_type to content_description. 418 // media_type to content_description.
421 // |current_params| - All currently known StreamParams of any media type. 419 // |current_params| - All currently known StreamParams of any media type.
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 } 1271 }
1274 1272
1275 MediaSessionDescriptionFactory::MediaSessionDescriptionFactory( 1273 MediaSessionDescriptionFactory::MediaSessionDescriptionFactory(
1276 ChannelManager* channel_manager, 1274 ChannelManager* channel_manager,
1277 const TransportDescriptionFactory* transport_desc_factory) 1275 const TransportDescriptionFactory* transport_desc_factory)
1278 : secure_(SEC_DISABLED), 1276 : secure_(SEC_DISABLED),
1279 add_legacy_(true), 1277 add_legacy_(true),
1280 transport_desc_factory_(transport_desc_factory) { 1278 transport_desc_factory_(transport_desc_factory) {
1281 channel_manager->GetSupportedAudioSendCodecs(&audio_send_codecs_); 1279 channel_manager->GetSupportedAudioSendCodecs(&audio_send_codecs_);
1282 channel_manager->GetSupportedAudioReceiveCodecs(&audio_recv_codecs_); 1280 channel_manager->GetSupportedAudioReceiveCodecs(&audio_recv_codecs_);
1283 channel_manager->GetSupportedAudioSendCodecs(&audio_send_codecs_);
1284 channel_manager->GetSupportedAudioRtpHeaderExtensions(&audio_rtp_extensions_); 1281 channel_manager->GetSupportedAudioRtpHeaderExtensions(&audio_rtp_extensions_);
1285 channel_manager->GetSupportedVideoCodecs(&video_codecs_); 1282 channel_manager->GetSupportedVideoCodecs(&video_codecs_);
1286 channel_manager->GetSupportedVideoRtpHeaderExtensions(&video_rtp_extensions_); 1283 channel_manager->GetSupportedVideoRtpHeaderExtensions(&video_rtp_extensions_);
1287 channel_manager->GetSupportedDataCodecs(&data_codecs_); 1284 channel_manager->GetSupportedDataCodecs(&data_codecs_);
1288 NegotiateCodecs(audio_recv_codecs_, audio_send_codecs_, 1285 NegotiateCodecs(audio_recv_codecs_, audio_send_codecs_,
1289 &audio_sendrecv_codecs_); 1286 &audio_sendrecv_codecs_);
1290 } 1287 }
1291 1288
1292 const AudioCodecs& MediaSessionDescriptionFactory::audio_sendrecv_codecs() 1289 const AudioCodecs& MediaSessionDescriptionFactory::audio_sendrecv_codecs()
1293 const { 1290 const {
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
2175 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO)); 2172 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO));
2176 } 2173 }
2177 2174
2178 DataContentDescription* GetFirstDataContentDescription( 2175 DataContentDescription* GetFirstDataContentDescription(
2179 SessionDescription* sdesc) { 2176 SessionDescription* sdesc) {
2180 return static_cast<DataContentDescription*>( 2177 return static_cast<DataContentDescription*>(
2181 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA)); 2178 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA));
2182 } 2179 }
2183 2180
2184 } // namespace cricket 2181 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698