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 |
(...skipping 10 matching lines...) Expand all Loading... |
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/base/optional.h" | 26 #include "webrtc/base/optional.h" |
27 #include "webrtc/api/peerconnectioninterface.h" | 27 #include "webrtc/api/peerconnectioninterface.h" |
28 | 28 |
29 namespace webrtc { | 29 namespace webrtc { |
30 | 30 |
31 // MediaConstraintsInterface | |
32 // Interface used for passing arguments about media constraints | 31 // Interface used for passing arguments about media constraints |
33 // to the MediaStream and PeerConnection implementation. | 32 // to the MediaStream and PeerConnection implementation. |
| 33 // |
| 34 // Constraints may be either "mandatory", which means that unless satisfied, |
| 35 // the method taking the constraints should fail, or "optional", which means |
| 36 // they may not be satisfied.. |
34 class MediaConstraintsInterface { | 37 class MediaConstraintsInterface { |
35 public: | 38 public: |
36 struct Constraint { | 39 struct Constraint { |
37 Constraint() {} | 40 Constraint() {} |
38 Constraint(const std::string& key, const std::string value) | 41 Constraint(const std::string& key, const std::string value) |
39 : key(key), value(value) { | 42 : key(key), value(value) { |
40 } | 43 } |
41 std::string key; | 44 std::string key; |
42 std::string value; | 45 std::string value; |
43 }; | 46 }; |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 PeerConnectionInterface::RTCConfiguration* configuration); | 145 PeerConnectionInterface::RTCConfiguration* configuration); |
143 | 146 |
144 // Copy all relevant constraints into an AudioOptions object. | 147 // Copy all relevant constraints into an AudioOptions object. |
145 void CopyConstraintsIntoAudioOptions( | 148 void CopyConstraintsIntoAudioOptions( |
146 const MediaConstraintsInterface* constraints, | 149 const MediaConstraintsInterface* constraints, |
147 cricket::AudioOptions* options); | 150 cricket::AudioOptions* options); |
148 | 151 |
149 } // namespace webrtc | 152 } // namespace webrtc |
150 | 153 |
151 #endif // WEBRTC_API_MEDIACONSTRAINTSINTERFACE_H_ | 154 #endif // WEBRTC_API_MEDIACONSTRAINTSINTERFACE_H_ |
OLD | NEW |