 Chromium Code Reviews
 Chromium Code Reviews Issue 2991693002:
  Adding support for Unified Plan offer/answer negotiation.  (Closed)
    
  
    Issue 2991693002:
  Adding support for Unified Plan offer/answer negotiation.  (Closed) 
  | Index: webrtc/pc/peerconnection.h | 
| diff --git a/webrtc/pc/peerconnection.h b/webrtc/pc/peerconnection.h | 
| index e563d513973d47038ae0b97d5d40c88de131eaed..fa331806be708ed531987066a88ee14e4f8b0557 100644 | 
| --- a/webrtc/pc/peerconnection.h | 
| +++ b/webrtc/pc/peerconnection.h | 
| @@ -32,27 +32,16 @@ class MediaStreamObserver; | 
| class VideoRtpReceiver; | 
| class RtcEventLog; | 
| -// Populates |session_options| from |rtc_options|, and returns true if options | 
| -// are valid. | 
| -// |session_options|->transport_options map entries must exist in order for | 
| -// them to be populated from |rtc_options|. | 
| -bool ExtractMediaSessionOptions( | 
| +bool ValidateOfferAnswerOptions( | 
| + const PeerConnectionInterface::RTCOfferAnswerOptions& rtc_options); | 
| + | 
| +void ExtractSharedMediaSessionOptions( | 
| const PeerConnectionInterface::RTCOfferAnswerOptions& rtc_options, | 
| - bool is_offer, | 
| 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); | 
| +bool ConvertConstraintsToOfferAnswerOptions( | 
| + const MediaConstraintsInterface* constraints, | 
| + PeerConnectionInterface::RTCOfferAnswerOptions* offer_answer_options); | 
| 
Taylor Brandstetter
2017/07/28 19:00:25
Unless the tests still rely on these, the declarat
 
Zhi Huang
2017/08/02 04:38:36
Might still need one of them for WebRtcSession tes
 | 
| // PeerConnection implements the PeerConnectionInterface interface. | 
| // It uses WebRtcSession to implement the PeerConnection functionality. | 
| @@ -240,27 +229,14 @@ class PeerConnection : public PeerConnectionInterface, | 
| // Returns a MediaSessionOptions struct with options decided by |options|, | 
| // the local MediaStreams and DataChannels. | 
| - virtual bool GetOptionsForOffer( | 
| + void GetOptionsForOffer( | 
| const PeerConnectionInterface::RTCOfferAnswerOptions& rtc_options, | 
| cricket::MediaSessionOptions* session_options); | 
| // 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); | 
| - | 
| - void InitializeOptionsForAnswer( | 
| - cricket::MediaSessionOptions* session_options); | 
| - | 
| - // Helper function for options processing. | 
| - // Deprecated. | 
| - virtual void FinishOptionsForAnswer( | 
| - cricket::MediaSessionOptions* session_options); | 
| + void GetOptionsForAnswer(const RTCOfferAnswerOptions& options, | 
| + 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). | 
| @@ -357,6 +333,7 @@ class PeerConnection : public PeerConnectionInterface, | 
| void OnDataChannelOpenMessage(const std::string& label, | 
| const InternalDataChannelInit& config); | 
| + bool HasRtpSender(cricket::MediaType type) const; | 
| RtpSenderInternal* FindSenderById(const std::string& id); | 
| std::vector<rtc::scoped_refptr< |