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