Index: webrtc/api/peerconnection.h |
diff --git a/webrtc/api/peerconnection.h b/webrtc/api/peerconnection.h |
index a63dd4342358fc96b21a38fe3f67237ed7d98545..e4fcdf075a0dc025f337e14f473d7c9eeb6203d5 100644 |
--- a/webrtc/api/peerconnection.h |
+++ b/webrtc/api/peerconnection.h |
@@ -32,13 +32,20 @@ class RemoteMediaStreamFactory; |
// are valid. |
// |session_options|->transport_options map entries must exist in order for |
// them to be populated from |rtc_options|. |
-bool ConvertRtcOptionsForOffer( |
+bool ExtractMediaSessionOptions( |
const PeerConnectionInterface::RTCOfferAnswerOptions& rtc_options, |
cricket::MediaSessionOptions* session_options); |
// Populates |session_options| from |constraints|, and returns true if all |
// mandatory constraints are satisfied. |
// Assumes that |session_options|->transport_options map entries exist. |
+// Will also set defaults if corresponding constraints are not present: |
+// recv_audio=true, recv_video=true, bundle_enabled=true. |
+// Other fields will be left with existing values. |
+// |
+// Deprecated. Will be removed once callers that use constraints are gone. |
+// TODO(hta): Remove when callers are gone. |
+// https://bugs.chromium.org/p/webrtc/issues/detail?id=5617 |
bool ParseConstraintsForAnswer(const MediaConstraintsInterface* constraints, |
cricket::MediaSessionOptions* session_options); |
@@ -58,8 +65,8 @@ class PeerConnection : public PeerConnectionInterface, |
explicit PeerConnection(PeerConnectionFactory* factory); |
bool Initialize( |
+ const cricket::MediaConfig& media_config, |
const PeerConnectionInterface::RTCConfiguration& configuration, |
- const MediaConstraintsInterface* constraints, |
rtc::scoped_ptr<cricket::PortAllocator> allocator, |
rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, |
PeerConnectionObserver* observer); |
@@ -106,12 +113,16 @@ class PeerConnection : public PeerConnectionInterface, |
const SessionDescriptionInterface* remote_description() const override; |
// JSEP01 |
+ // Deprecated, use version without constraints. |
void CreateOffer(CreateSessionDescriptionObserver* observer, |
const MediaConstraintsInterface* constraints) override; |
void CreateOffer(CreateSessionDescriptionObserver* observer, |
const RTCOfferAnswerOptions& options) override; |
+ // Deprecated, use version without constraints. |
void CreateAnswer(CreateSessionDescriptionObserver* observer, |
const MediaConstraintsInterface* constraints) override; |
+ void CreateAnswer(CreateSessionDescriptionObserver* observer, |
+ const RTCOfferAnswerOptions& options) override; |
void SetLocalDescription(SetSessionDescriptionObserver* observer, |
SessionDescriptionInterface* desc) override; |
void SetRemoteDescription(SetSessionDescriptionObserver* observer, |
@@ -211,9 +222,18 @@ class PeerConnection : public PeerConnectionInterface, |
// Returns a MediaSessionOptions struct with options decided by |
// |constraints|, the local MediaStreams and DataChannels. |
+ // Deprecated, use version without constraints. |
virtual bool GetOptionsForAnswer( |
const MediaConstraintsInterface* constraints, |
cricket::MediaSessionOptions* session_options); |
+ virtual bool GetOptionsForAnswer( |
+ const RTCOfferAnswerOptions& options, |
+ cricket::MediaSessionOptions* session_options); |
+ |
+ // Helper function for options processing. |
+ // Deprecated. |
+ virtual void FinishOptionsForAnswer( |
+ cricket::MediaSessionOptions* session_options); |
// Remove all local and remote tracks of type |media_type|. |
// Called when a media type is rejected (m-line set to port 0). |