| 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 18 matching lines...) Expand all Loading... |
| 29 class MediaStreamObserver; | 29 class MediaStreamObserver; |
| 30 class VideoRtpReceiver; | 30 class VideoRtpReceiver; |
| 31 | 31 |
| 32 // Populates |session_options| from |rtc_options|, and returns true if options | 32 // Populates |session_options| from |rtc_options|, and returns true if options |
| 33 // are valid. | 33 // are valid. |
| 34 // |session_options|->transport_options map entries must exist in order for | 34 // |session_options|->transport_options map entries must exist in order for |
| 35 // them to be populated from |rtc_options|. | 35 // them to be populated from |rtc_options|. |
| 36 bool ExtractMediaSessionOptions( | 36 bool ExtractMediaSessionOptions( |
| 37 const PeerConnectionInterface::RTCOfferAnswerOptions& rtc_options, | 37 const PeerConnectionInterface::RTCOfferAnswerOptions& rtc_options, |
| 38 bool is_offer, | 38 bool is_offer, |
| 39 bool ice_renomination, |
| 39 cricket::MediaSessionOptions* session_options); | 40 cricket::MediaSessionOptions* session_options); |
| 40 | 41 |
| 41 // Populates |session_options| from |constraints|, and returns true if all | 42 // Populates |session_options| from |constraints|, and returns true if all |
| 42 // mandatory constraints are satisfied. | 43 // mandatory constraints are satisfied. |
| 43 // Assumes that |session_options|->transport_options map entries exist. | 44 // Assumes that |session_options|->transport_options map entries exist. |
| 44 // Will also set defaults if corresponding constraints are not present: | 45 // Will also set defaults if corresponding constraints are not present: |
| 45 // recv_audio=true, recv_video=true, bundle_enabled=true. | 46 // recv_audio=true, recv_video=true, bundle_enabled=true. |
| 46 // Other fields will be left with existing values. | 47 // Other fields will be left with existing values. |
| 47 // | 48 // |
| 48 // Deprecated. Will be removed once callers that use constraints are gone. | 49 // Deprecated. Will be removed once callers that use constraints are gone. |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 // Returns a MediaSessionOptions struct with options decided by | 233 // Returns a MediaSessionOptions struct with options decided by |
| 233 // |constraints|, the local MediaStreams and DataChannels. | 234 // |constraints|, the local MediaStreams and DataChannels. |
| 234 // Deprecated, use version without constraints. | 235 // Deprecated, use version without constraints. |
| 235 virtual bool GetOptionsForAnswer( | 236 virtual bool GetOptionsForAnswer( |
| 236 const MediaConstraintsInterface* constraints, | 237 const MediaConstraintsInterface* constraints, |
| 237 cricket::MediaSessionOptions* session_options); | 238 cricket::MediaSessionOptions* session_options); |
| 238 virtual bool GetOptionsForAnswer( | 239 virtual bool GetOptionsForAnswer( |
| 239 const RTCOfferAnswerOptions& options, | 240 const RTCOfferAnswerOptions& options, |
| 240 cricket::MediaSessionOptions* session_options); | 241 cricket::MediaSessionOptions* session_options); |
| 241 | 242 |
| 243 void InitializeOptionsForAnswer( |
| 244 cricket::MediaSessionOptions* session_options); |
| 245 |
| 242 // Helper function for options processing. | 246 // Helper function for options processing. |
| 243 // Deprecated. | 247 // Deprecated. |
| 244 virtual void FinishOptionsForAnswer( | 248 virtual void FinishOptionsForAnswer( |
| 245 cricket::MediaSessionOptions* session_options); | 249 cricket::MediaSessionOptions* session_options); |
| 246 | 250 |
| 247 // Remove all local and remote tracks of type |media_type|. | 251 // Remove all local and remote tracks of type |media_type|. |
| 248 // Called when a media type is rejected (m-line set to port 0). | 252 // Called when a media type is rejected (m-line set to port 0). |
| 249 void RemoveTracks(cricket::MediaType media_type); | 253 void RemoveTracks(cricket::MediaType media_type); |
| 250 | 254 |
| 251 // Makes sure a MediaStreamTrack is created for each StreamParam in |streams|, | 255 // Makes sure a MediaStreamTrack is created for each StreamParam in |streams|, |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 TrackInfos local_video_tracks_; | 411 TrackInfos local_video_tracks_; |
| 408 | 412 |
| 409 SctpSidAllocator sid_allocator_; | 413 SctpSidAllocator sid_allocator_; |
| 410 // label -> DataChannel | 414 // label -> DataChannel |
| 411 std::map<std::string, rtc::scoped_refptr<DataChannel>> rtp_data_channels_; | 415 std::map<std::string, rtc::scoped_refptr<DataChannel>> rtp_data_channels_; |
| 412 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_; | 416 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_; |
| 413 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_to_free_; | 417 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_to_free_; |
| 414 | 418 |
| 415 bool remote_peer_supports_msid_ = false; | 419 bool remote_peer_supports_msid_ = false; |
| 416 | 420 |
| 421 bool ice_renomination_ = false; |
| 422 |
| 417 std::vector<rtc::scoped_refptr<RtpSenderProxyWithInternal<RtpSenderInternal>>> | 423 std::vector<rtc::scoped_refptr<RtpSenderProxyWithInternal<RtpSenderInternal>>> |
| 418 senders_; | 424 senders_; |
| 419 std::vector< | 425 std::vector< |
| 420 rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>>> | 426 rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>>> |
| 421 receivers_; | 427 receivers_; |
| 422 | 428 |
| 423 std::unique_ptr<WebRtcSession> session_; | 429 std::unique_ptr<WebRtcSession> session_; |
| 424 std::unique_ptr<StatsCollector> stats_; | 430 std::unique_ptr<StatsCollector> stats_; |
| 425 }; | 431 }; |
| 426 | 432 |
| 427 } // namespace webrtc | 433 } // namespace webrtc |
| 428 | 434 |
| 429 #endif // WEBRTC_API_PEERCONNECTION_H_ | 435 #endif // WEBRTC_API_PEERCONNECTION_H_ |
| OLD | NEW |