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