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

Unified Diff: webrtc/pc/peerconnection.h

Issue 3001083002: Revert of Adding support for Unified Plan offer/answer negotiation. (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/pc/mediasession_unittest.cc ('k') | webrtc/pc/peerconnection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/peerconnection.h
diff --git a/webrtc/pc/peerconnection.h b/webrtc/pc/peerconnection.h
index 48e9628d8bc13006be0a7061f2d3cd4848a81829..f8b6a54cad253860586f31ca1d70c16537703d18 100644
--- a/webrtc/pc/peerconnection.h
+++ b/webrtc/pc/peerconnection.h
@@ -32,11 +32,27 @@
class VideoRtpReceiver;
class RtcEventLog;
-// TODO(zhihuang): Remove this declaration when the WebRtcSession tests don't
-// need it.
-void ExtractSharedMediaSessionOptions(
+// 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(
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);
// PeerConnection implements the PeerConnectionInterface interface.
// It uses WebRtcSession to implement the PeerConnection functionality.
@@ -228,24 +244,26 @@
// Returns a MediaSessionOptions struct with options decided by |options|,
// the local MediaStreams and DataChannels.
- void GetOptionsForOffer(
+ virtual bool GetOptionsForOffer(
const PeerConnectionInterface::RTCOfferAnswerOptions& rtc_options,
cricket::MediaSessionOptions* session_options);
// Returns a MediaSessionOptions struct with options decided by
// |constraints|, the local MediaStreams and DataChannels.
- void GetOptionsForAnswer(const RTCOfferAnswerOptions& options,
- cricket::MediaSessionOptions* session_options);
-
- // Generates MediaDescriptionOptions for the |session_opts| based on existing
- // local description or remote description.
- void GenerateMediaDescriptionOptions(
- const SessionDescriptionInterface* session_desc,
- cricket::RtpTransceiverDirection audio_direction,
- cricket::RtpTransceiverDirection video_direction,
- int* audio_index,
- int* video_index,
- int* data_index,
+ // 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);
// Remove all local and remote tracks of type |media_type|.
@@ -343,7 +361,6 @@
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<
« no previous file with comments | « webrtc/pc/mediasession_unittest.cc ('k') | webrtc/pc/peerconnection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698