OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2013 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 |
11 // This file contains the interface for MediaConstraints, corresponding to | 11 // This file contains the interface for MediaConstraints, corresponding to |
12 // the definition at | 12 // the definition at |
13 // http://www.w3.org/TR/mediacapture-streams/#mediastreamconstraints and also | 13 // http://www.w3.org/TR/mediacapture-streams/#mediastreamconstraints and also |
14 // used in WebRTC: http://dev.w3.org/2011/webrtc/editor/webrtc.html#constraints. | 14 // used in WebRTC: http://dev.w3.org/2011/webrtc/editor/webrtc.html#constraints. |
15 | 15 |
16 // This interface is being deprecated in Chrome, and may be removed | 16 // This interface is being deprecated in Chrome, and may be removed |
17 // from WebRTC too. | 17 // from WebRTC too. |
18 // https://bugs.chromium.org/p/webrtc/issues/detail?id=5617 | 18 // https://bugs.chromium.org/p/webrtc/issues/detail?id=5617 |
19 | 19 |
20 #ifndef WEBRTC_API_MEDIACONSTRAINTSINTERFACE_H_ | 20 #ifndef WEBRTC_API_MEDIACONSTRAINTSINTERFACE_H_ |
21 #define WEBRTC_API_MEDIACONSTRAINTSINTERFACE_H_ | 21 #define WEBRTC_API_MEDIACONSTRAINTSINTERFACE_H_ |
22 | 22 |
23 #include <string> | 23 #include <string> |
24 #include <vector> | 24 #include <vector> |
25 | 25 |
| 26 #include "webrtc/api/optional.h" |
26 #include "webrtc/api/peerconnectioninterface.h" | 27 #include "webrtc/api/peerconnectioninterface.h" |
27 #include "webrtc/rtc_base/optional.h" | |
28 | 28 |
29 namespace webrtc { | 29 namespace webrtc { |
30 | 30 |
31 // Interface used for passing arguments about media constraints | 31 // Interface used for passing arguments about media constraints |
32 // to the MediaStream and PeerConnection implementation. | 32 // to the MediaStream and PeerConnection implementation. |
33 // | 33 // |
34 // Constraints may be either "mandatory", which means that unless satisfied, | 34 // Constraints may be either "mandatory", which means that unless satisfied, |
35 // the method taking the constraints should fail, or "optional", which means | 35 // the method taking the constraints should fail, or "optional", which means |
36 // they may not be satisfied.. | 36 // they may not be satisfied.. |
37 class MediaConstraintsInterface { | 37 class MediaConstraintsInterface { |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 PeerConnectionInterface::RTCConfiguration* configuration); | 145 PeerConnectionInterface::RTCConfiguration* configuration); |
146 | 146 |
147 // Copy all relevant constraints into an AudioOptions object. | 147 // Copy all relevant constraints into an AudioOptions object. |
148 void CopyConstraintsIntoAudioOptions( | 148 void CopyConstraintsIntoAudioOptions( |
149 const MediaConstraintsInterface* constraints, | 149 const MediaConstraintsInterface* constraints, |
150 cricket::AudioOptions* options); | 150 cricket::AudioOptions* options); |
151 | 151 |
152 } // namespace webrtc | 152 } // namespace webrtc |
153 | 153 |
154 #endif // WEBRTC_API_MEDIACONSTRAINTSINTERFACE_H_ | 154 #endif // WEBRTC_API_MEDIACONSTRAINTSINTERFACE_H_ |
OLD | NEW |