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

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: Code review feedback 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_unittest.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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 cricket::ContentAction action, 372 cricket::ContentAction action,
373 std::string* error_desc); 373 std::string* error_desc);
374 374
375 // Returns true and the TransportInfo of the given |content_name| 375 // Returns true and the TransportInfo of the given |content_name|
376 // from |description|. Returns false if it's not available. 376 // from |description|. Returns false if it's not available.
377 static bool GetTransportDescription( 377 static bool GetTransportDescription(
378 const cricket::SessionDescription* description, 378 const cricket::SessionDescription* description,
379 const std::string& content_name, 379 const std::string& content_name,
380 cricket::TransportDescription* info); 380 cricket::TransportDescription* info);
381 381
382 // Returns the name of the transport channel when BUNDLE is enabled, or
383 // nullptr if the channel is not part of any bundle.
384 const std::string* GetBundleTransportName(
385 const cricket::ContentInfo* content,
386 const cricket::ContentGroup* bundle);
387
382 // Cause all the BaseChannels in the bundle group to have the same 388 // Cause all the BaseChannels in the bundle group to have the same
383 // transport channel. 389 // transport channel.
384 bool EnableBundle(const cricket::ContentGroup& bundle); 390 bool EnableBundle(const cricket::ContentGroup& bundle);
385 391
386 // Enables media channels to allow sending of media. 392 // Enables media channels to allow sending of media.
387 void EnableChannels(); 393 void EnableChannels();
388 // Returns the media index for a local ice candidate given the content name. 394 // Returns the media index for a local ice candidate given the content name.
389 // Returns false if the local session description does not have a media 395 // Returns false if the local session description does not have a media
390 // content called |content_name|. 396 // content called |content_name|.
391 bool GetLocalCandidateMediaIndex(const std::string& content_name, 397 bool GetLocalCandidateMediaIndex(const std::string& content_name,
392 int* sdp_mline_index); 398 int* sdp_mline_index);
393 // Uses all remote candidates in |remote_desc| in this session. 399 // Uses all remote candidates in |remote_desc| in this session.
394 bool UseCandidatesInSessionDescription( 400 bool UseCandidatesInSessionDescription(
395 const SessionDescriptionInterface* remote_desc); 401 const SessionDescriptionInterface* remote_desc);
396 // Uses |candidate| in this session. 402 // Uses |candidate| in this session.
397 bool UseCandidate(const IceCandidateInterface* candidate); 403 bool UseCandidate(const IceCandidateInterface* candidate);
398 // Deletes the corresponding channel of contents that don't exist in |desc|. 404 // Deletes the corresponding channel of contents that don't exist in |desc|.
399 // |desc| can be null. This means that all channels are deleted. 405 // |desc| can be null. This means that all channels are deleted.
400 void RemoveUnusedChannels(const cricket::SessionDescription* desc); 406 void RemoveUnusedChannels(const cricket::SessionDescription* desc);
401 407
402 // Allocates media channels based on the |desc|. If |desc| doesn't have 408 // Allocates media channels based on the |desc|. If |desc| doesn't have
403 // the BUNDLE option, this method will disable BUNDLE in PortAllocator. 409 // the BUNDLE option, this method will disable BUNDLE in PortAllocator.
404 // This method will also delete any existing media channels before creating. 410 // This method will also delete any existing media channels before creating.
405 bool CreateChannels(const cricket::SessionDescription* desc); 411 bool CreateChannels(const cricket::SessionDescription* desc);
406 412
407 // Helper methods to create media channels. 413 // Helper methods to create media channels.
408 bool CreateVoiceChannel(const cricket::ContentInfo* content); 414 bool CreateVoiceChannel(const cricket::ContentInfo* content,
409 bool CreateVideoChannel(const cricket::ContentInfo* content); 415 const std::string* bundle_transport);
410 bool CreateDataChannel(const cricket::ContentInfo* content); 416 bool CreateVideoChannel(const cricket::ContentInfo* content,
417 const std::string* bundle_transport);
418 bool CreateDataChannel(const cricket::ContentInfo* content,
419 const std::string* bundle_transport);
411 420
412 // Listens to SCTP CONTROL messages on unused SIDs and process them as OPEN 421 // Listens to SCTP CONTROL messages on unused SIDs and process them as OPEN
413 // messages. 422 // messages.
414 void OnDataChannelMessageReceived(cricket::DataChannel* channel, 423 void OnDataChannelMessageReceived(cricket::DataChannel* channel,
415 const cricket::ReceiveDataParams& params, 424 const cricket::ReceiveDataParams& params,
416 const rtc::CopyOnWriteBuffer& payload); 425 const rtc::CopyOnWriteBuffer& payload);
417 426
418 std::string BadStateErrMsg(State state); 427 std::string BadStateErrMsg(State state);
419 void SetIceConnectionState(PeerConnectionInterface::IceConnectionState state); 428 void SetIceConnectionState(PeerConnectionInterface::IceConnectionState state);
420 void SetIceConnectionReceiving(bool receiving); 429 void SetIceConnectionReceiving(bool receiving);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 PeerConnectionInterface::BundlePolicy bundle_policy_; 519 PeerConnectionInterface::BundlePolicy bundle_policy_;
511 520
512 // Declares the RTCP mux policy for the WebRTCSession. 521 // Declares the RTCP mux policy for the WebRTCSession.
513 PeerConnectionInterface::RtcpMuxPolicy rtcp_mux_policy_; 522 PeerConnectionInterface::RtcpMuxPolicy rtcp_mux_policy_;
514 523
515 RTC_DISALLOW_COPY_AND_ASSIGN(WebRtcSession); 524 RTC_DISALLOW_COPY_AND_ASSIGN(WebRtcSession);
516 }; 525 };
517 } // namespace webrtc 526 } // namespace webrtc
518 527
519 #endif // WEBRTC_API_WEBRTCSESSION_H_ 528 #endif // WEBRTC_API_WEBRTCSESSION_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/webrtcsession.cc » ('j') | webrtc/api/webrtcsession_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698