This CL provides interfaces that do not use constraints for
all interfaces that formerly took constraints parameters
in name=value form.
This is in preparation for making Chrome only use these
explicit interfaces.
BUG=webrtc:4906
Review URL: https://codereview.webrtc.org/1717583002
Cr-Commit-Position: refs/heads/master@{#11870}
diff --git a/webrtc/api/mediaconstraintsinterface.h b/webrtc/api/mediaconstraintsinterface.h
index 0c251f8..3db6e26 100644
--- a/webrtc/api/mediaconstraintsinterface.h
+++ b/webrtc/api/mediaconstraintsinterface.h
@@ -13,12 +13,19 @@
// http://www.w3.org/TR/mediacapture-streams/#mediastreamconstraints and also
// used in WebRTC: http://dev.w3.org/2011/webrtc/editor/webrtc.html#constraints.
+// This interface is being deprecated in Chrome, and may be removed
+// from WebRTC too.
+// https://bugs.chromium.org/p/webrtc/issues/detail?id=5617
+
#ifndef WEBRTC_API_MEDIACONSTRAINTSINTERFACE_H_
#define WEBRTC_API_MEDIACONSTRAINTSINTERFACE_H_
#include <string>
#include <vector>
+#include "webrtc/base/optional.h"
+#include "webrtc/api/peerconnectioninterface.h"
+
namespace webrtc {
// MediaConstraintsInterface
@@ -118,6 +125,16 @@
const std::string& key, bool* value,
size_t* mandatory_constraints);
+bool FindConstraint(const MediaConstraintsInterface* constraints,
+ const std::string& key,
+ int* value,
+ size_t* mandatory_constraints);
+
+// Copy all relevant constraints into an RTCConfiguration object.
+void CopyConstraintsIntoRtcConfiguration(
+ const MediaConstraintsInterface* constraints,
+ PeerConnectionInterface::RTCConfiguration* configuration);
+
} // namespace webrtc
#endif // WEBRTC_API_MEDIACONSTRAINTSINTERFACE_H_