OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 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 #import "RTCMediaConstraints+Private.h" | 11 #import "RTCMediaConstraints+Private.h" |
12 | 12 |
13 #import "NSString+StdString.h" | 13 #import "NSString+StdString.h" |
14 | 14 |
15 #include <memory> | 15 #include <memory> |
16 | 16 |
| 17 NSString * const kRTCMediaConstraintsMinAspectRatio = |
| 18 @(webrtc::MediaConstraintsInterface::kMinAspectRatio); |
| 19 NSString * const kRTCMediaConstraintsMaxAspectRatio = |
| 20 @(webrtc::MediaConstraintsInterface::kMaxAspectRatio); |
| 21 NSString * const kRTCMediaConstraintsMinWidth = |
| 22 @(webrtc::MediaConstraintsInterface::kMinWidth); |
| 23 NSString * const kRTCMediaConstraintsMaxWidth = |
| 24 @(webrtc::MediaConstraintsInterface::kMaxWidth); |
| 25 NSString * const kRTCMediaConstraintsMinHeight = |
| 26 @(webrtc::MediaConstraintsInterface::kMinHeight); |
| 27 NSString * const kRTCMediaConstraintsMaxHeight = |
| 28 @(webrtc::MediaConstraintsInterface::kMaxHeight); |
| 29 NSString * const kRTCMediaConstraintsMinFrameRate = |
| 30 @(webrtc::MediaConstraintsInterface::kMinFrameRate); |
| 31 NSString * const kRTCMediaConstraintsMaxFrameRate = |
| 32 @(webrtc::MediaConstraintsInterface::kMaxFrameRate); |
| 33 |
17 namespace webrtc { | 34 namespace webrtc { |
18 | 35 |
19 MediaConstraints::~MediaConstraints() {} | 36 MediaConstraints::~MediaConstraints() {} |
20 | 37 |
21 MediaConstraints::MediaConstraints() {} | 38 MediaConstraints::MediaConstraints() {} |
22 | 39 |
23 MediaConstraints::MediaConstraints( | 40 MediaConstraints::MediaConstraints( |
24 const MediaConstraintsInterface::Constraints& mandatory, | 41 const MediaConstraintsInterface::Constraints& mandatory, |
25 const MediaConstraintsInterface::Constraints& optional) | 42 const MediaConstraintsInterface::Constraints& optional) |
26 : mandatory_(mandatory), optional_(optional) {} | 43 : mandatory_(mandatory), optional_(optional) {} |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 NSString *value = [constraints objectForKey:key]; | 102 NSString *value = [constraints objectForKey:key]; |
86 NSAssert([value isKindOfClass:[NSString class]], | 103 NSAssert([value isKindOfClass:[NSString class]], |
87 @"%@ is not an NSString.", value); | 104 @"%@ is not an NSString.", value); |
88 nativeConstraints.push_back(webrtc::MediaConstraintsInterface::Constraint( | 105 nativeConstraints.push_back(webrtc::MediaConstraintsInterface::Constraint( |
89 key.stdString, value.stdString)); | 106 key.stdString, value.stdString)); |
90 } | 107 } |
91 return nativeConstraints; | 108 return nativeConstraints; |
92 } | 109 } |
93 | 110 |
94 @end | 111 @end |
OLD | NEW |