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

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

Issue 2224563004: Add signaling to support ICE renomination. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: . Created 4 years, 4 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/peerconnection.cc » ('j') | webrtc/api/peerconnection.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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 // Returns a MediaSessionOptions struct with options decided by 232 // Returns a MediaSessionOptions struct with options decided by
233 // |constraints|, the local MediaStreams and DataChannels. 233 // |constraints|, the local MediaStreams and DataChannels.
234 // Deprecated, use version without constraints. 234 // Deprecated, use version without constraints.
235 virtual bool GetOptionsForAnswer( 235 virtual bool GetOptionsForAnswer(
236 const MediaConstraintsInterface* constraints, 236 const MediaConstraintsInterface* constraints,
237 cricket::MediaSessionOptions* session_options); 237 cricket::MediaSessionOptions* session_options);
238 virtual bool GetOptionsForAnswer( 238 virtual bool GetOptionsForAnswer(
239 const RTCOfferAnswerOptions& options, 239 const RTCOfferAnswerOptions& options,
240 cricket::MediaSessionOptions* session_options); 240 cricket::MediaSessionOptions* session_options);
241 241
242 void InitializeMediaSessionOptions(
243 bool is_offer,
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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 // is applied. 368 // is applied.
365 bool ReconfigurePortAllocator_n(const RTCConfiguration& configuration); 369 bool ReconfigurePortAllocator_n(const RTCConfiguration& configuration);
366 370
367 // Starts recording an Rtc EventLog using the supplied platform file. 371 // Starts recording an Rtc EventLog using the supplied platform file.
368 // This function should only be called from the worker thread. 372 // This function should only be called from the worker thread.
369 bool StartRtcEventLog_w(rtc::PlatformFile file, int64_t max_size_bytes); 373 bool StartRtcEventLog_w(rtc::PlatformFile file, int64_t max_size_bytes);
370 // Starts recording an Rtc EventLog using the supplied platform file. 374 // Starts recording an Rtc EventLog using the supplied platform file.
371 // This function should only be called from the worker thread. 375 // This function should only be called from the worker thread.
372 void StopRtcEventLog_w(); 376 void StopRtcEventLog_w();
373 377
378 cricket::TransportOptions MakeTransportOptions() {
379 cricket::TransportOptions options;
380 options.ice_renomination = ice_renomination_;
381 return options;
382 }
383
374 // Storing the factory as a scoped reference pointer ensures that the memory 384 // Storing the factory as a scoped reference pointer ensures that the memory
375 // in the PeerConnectionFactoryImpl remains available as long as the 385 // in the PeerConnectionFactoryImpl remains available as long as the
376 // PeerConnection is running. It is passed to PeerConnection as a raw pointer. 386 // PeerConnection is running. It is passed to PeerConnection as a raw pointer.
377 // However, since the reference counting is done in the 387 // However, since the reference counting is done in the
378 // PeerConnectionFactoryInterface all instances created using the raw pointer 388 // PeerConnectionFactoryInterface all instances created using the raw pointer
379 // will refer to the same reference count. 389 // will refer to the same reference count.
380 rtc::scoped_refptr<PeerConnectionFactory> factory_; 390 rtc::scoped_refptr<PeerConnectionFactory> factory_;
381 PeerConnectionObserver* observer_; 391 PeerConnectionObserver* observer_;
382 UMAObserver* uma_observer_; 392 UMAObserver* uma_observer_;
383 SignalingState signaling_state_; 393 SignalingState signaling_state_;
(...skipping 23 matching lines...) Expand all
407 TrackInfos local_video_tracks_; 417 TrackInfos local_video_tracks_;
408 418
409 SctpSidAllocator sid_allocator_; 419 SctpSidAllocator sid_allocator_;
410 // label -> DataChannel 420 // label -> DataChannel
411 std::map<std::string, rtc::scoped_refptr<DataChannel>> rtp_data_channels_; 421 std::map<std::string, rtc::scoped_refptr<DataChannel>> rtp_data_channels_;
412 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_; 422 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_;
413 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_to_free_; 423 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_to_free_;
414 424
415 bool remote_peer_supports_msid_ = false; 425 bool remote_peer_supports_msid_ = false;
416 426
427 bool ice_renomination_ = false;
428
417 std::vector<rtc::scoped_refptr<RtpSenderProxyWithInternal<RtpSenderInternal>>> 429 std::vector<rtc::scoped_refptr<RtpSenderProxyWithInternal<RtpSenderInternal>>>
418 senders_; 430 senders_;
419 std::vector< 431 std::vector<
420 rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>>> 432 rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>>>
421 receivers_; 433 receivers_;
422 434
423 std::unique_ptr<WebRtcSession> session_; 435 std::unique_ptr<WebRtcSession> session_;
424 std::unique_ptr<StatsCollector> stats_; 436 std::unique_ptr<StatsCollector> stats_;
425 }; 437 };
426 438
427 } // namespace webrtc 439 } // namespace webrtc
428 440
429 #endif // WEBRTC_API_PEERCONNECTION_H_ 441 #endif // WEBRTC_API_PEERCONNECTION_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/peerconnection.cc » ('j') | webrtc/api/peerconnection.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698