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

Side by Side Diff: webrtc/api/webrtcsession.h

Issue 1972493002: Do not create a temporary transport channel when using max-bundle (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased on top of the network thread change Created 4 years, 7 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
« no previous file with comments | « no previous file | webrtc/api/webrtcsession.cc » ('j') | webrtc/api/webrtcsession.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 cricket::ContentAction action, 375 cricket::ContentAction action,
376 std::string* error_desc); 376 std::string* error_desc);
377 377
378 // Returns true and the TransportInfo of the given |content_name| 378 // Returns true and the TransportInfo of the given |content_name|
379 // from |description|. Returns false if it's not available. 379 // from |description|. Returns false if it's not available.
380 static bool GetTransportDescription( 380 static bool GetTransportDescription(
381 const cricket::SessionDescription* description, 381 const cricket::SessionDescription* description,
382 const std::string& content_name, 382 const std::string& content_name,
383 cricket::TransportDescription* info); 383 cricket::TransportDescription* info);
384 384
385 // Returns the name of the transport channel when BUNDLE is enabled, or
386 // nullptr if the channel is not part of any bundle.
387 const std::string* GetBundleTransportName(
388 const cricket::ContentInfo* content,
389 const cricket::ContentGroup* bundle);
390
385 // Cause all the BaseChannels in the bundle group to have the same 391 // Cause all the BaseChannels in the bundle group to have the same
386 // transport channel. 392 // transport channel.
387 bool EnableBundle(const cricket::ContentGroup& bundle); 393 bool EnableBundle(const cricket::ContentGroup& bundle);
388 394
389 // Enables media channels to allow sending of media. 395 // Enables media channels to allow sending of media.
390 void EnableChannels(); 396 void EnableChannels();
391 // Returns the media index for a local ice candidate given the content name. 397 // Returns the media index for a local ice candidate given the content name.
392 // Returns false if the local session description does not have a media 398 // Returns false if the local session description does not have a media
393 // content called |content_name|. 399 // content called |content_name|.
394 bool GetLocalCandidateMediaIndex(const std::string& content_name, 400 bool GetLocalCandidateMediaIndex(const std::string& content_name,
395 int* sdp_mline_index); 401 int* sdp_mline_index);
396 // Uses all remote candidates in |remote_desc| in this session. 402 // Uses all remote candidates in |remote_desc| in this session.
397 bool UseCandidatesInSessionDescription( 403 bool UseCandidatesInSessionDescription(
398 const SessionDescriptionInterface* remote_desc); 404 const SessionDescriptionInterface* remote_desc);
399 // Uses |candidate| in this session. 405 // Uses |candidate| in this session.
400 bool UseCandidate(const IceCandidateInterface* candidate); 406 bool UseCandidate(const IceCandidateInterface* candidate);
401 // Deletes the corresponding channel of contents that don't exist in |desc|. 407 // Deletes the corresponding channel of contents that don't exist in |desc|.
402 // |desc| can be null. This means that all channels are deleted. 408 // |desc| can be null. This means that all channels are deleted.
403 void RemoveUnusedChannels(const cricket::SessionDescription* desc); 409 void RemoveUnusedChannels(const cricket::SessionDescription* desc);
404 410
405 // Allocates media channels based on the |desc|. If |desc| doesn't have 411 // Allocates media channels based on the |desc|. If |desc| doesn't have
406 // the BUNDLE option, this method will disable BUNDLE in PortAllocator. 412 // the BUNDLE option, this method will disable BUNDLE in PortAllocator.
407 // This method will also delete any existing media channels before creating. 413 // This method will also delete any existing media channels before creating.
408 bool CreateChannels(const cricket::SessionDescription* desc); 414 bool CreateChannels(const cricket::SessionDescription* desc);
409 415
410 // Helper methods to create media channels. 416 // Helper methods to create media channels.
411 bool CreateVoiceChannel(const cricket::ContentInfo* content); 417 bool CreateVoiceChannel(const cricket::ContentInfo* content,
412 bool CreateVideoChannel(const cricket::ContentInfo* content); 418 const std::string* bundle_transport);
413 bool CreateDataChannel(const cricket::ContentInfo* content); 419 bool CreateVideoChannel(const cricket::ContentInfo* content,
420 const std::string* bundle_transport);
421 bool CreateDataChannel(const cricket::ContentInfo* content,
422 const std::string* bundle_transport);
414 423
415 // Listens to SCTP CONTROL messages on unused SIDs and process them as OPEN 424 // Listens to SCTP CONTROL messages on unused SIDs and process them as OPEN
416 // messages. 425 // messages.
417 void OnDataChannelMessageReceived(cricket::DataChannel* channel, 426 void OnDataChannelMessageReceived(cricket::DataChannel* channel,
418 const cricket::ReceiveDataParams& params, 427 const cricket::ReceiveDataParams& params,
419 const rtc::CopyOnWriteBuffer& payload); 428 const rtc::CopyOnWriteBuffer& payload);
420 429
421 std::string BadStateErrMsg(State state); 430 std::string BadStateErrMsg(State state);
422 void SetIceConnectionState(PeerConnectionInterface::IceConnectionState state); 431 void SetIceConnectionState(PeerConnectionInterface::IceConnectionState state);
423 void SetIceConnectionReceiving(bool receiving); 432 void SetIceConnectionReceiving(bool receiving);
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 PeerConnectionInterface::BundlePolicy bundle_policy_; 523 PeerConnectionInterface::BundlePolicy bundle_policy_;
515 524
516 // Declares the RTCP mux policy for the WebRTCSession. 525 // Declares the RTCP mux policy for the WebRTCSession.
517 PeerConnectionInterface::RtcpMuxPolicy rtcp_mux_policy_; 526 PeerConnectionInterface::RtcpMuxPolicy rtcp_mux_policy_;
518 527
519 RTC_DISALLOW_COPY_AND_ASSIGN(WebRtcSession); 528 RTC_DISALLOW_COPY_AND_ASSIGN(WebRtcSession);
520 }; 529 };
521 } // namespace webrtc 530 } // namespace webrtc
522 531
523 #endif // WEBRTC_API_WEBRTCSESSION_H_ 532 #endif // WEBRTC_API_WEBRTCSESSION_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/webrtcsession.cc » ('j') | webrtc/api/webrtcsession.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698