Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 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 |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #import <Foundation/Foundation.h> |
| 12 | |
| 13 | #import "RTCMacros.h" |
| 14 | |
| 15 | NS_ASSUME_NONNULL_BEGIN |
| 16 | |
| 17 | /** Constraint keys for media sources. */ |
| 18 | RTC_EXTERN NSString *const kRTCMediaConstraintsMinAspectRatio; |
| 19 | RTC_EXTERN NSString *const kRTCMediaConstraintsMaxAspectRatio; |
| 20 | RTC_EXTERN NSString *const kRTCMediaConstraintsMaxWidth; |
| 21 | RTC_EXTERN NSString *const kRTCMediaConstraintsMinWidth; |
| 22 | RTC_EXTERN NSString *const kRTCMediaConstraintsMaxHeight; |
| 23 | RTC_EXTERN NSString *const kRTCMediaConstraintsMinHeight; |
| 24 | RTC_EXTERN NSString *const kRTCMediaConstraintsMaxFrameRate; |
| 25 | RTC_EXTERN NSString *const kRTCMediaConstraintsMinFrameRate; |
| 26 | /** The value for this key should be a base64 encoded string containing |
| 27 | * the data from the serialized configuration proto. |
| 28 | */ |
| 29 | RTC_EXTERN NSString *const kRTCMediaConstraintsAudioNetworkAdaptorConfig; |
| 30 | |
| 31 | /** Constraint keys for generating offers and answers. */ |
| 32 | RTC_EXTERN NSString *const kRTCMediaConstraintsIceRestart; |
| 33 | RTC_EXTERN NSString *const kRTCMediaConstraintsOfferToReceiveAudio; |
| 34 | RTC_EXTERN NSString *const kRTCMediaConstraintsOfferToReceiveVideo; |
| 35 | RTC_EXTERN NSString *const kRTCMediaConstraintsVoiceActivityDetection; |
| 36 | |
| 37 | /** Constraint values for Boolean parameters. */ |
| 38 | RTC_EXTERN NSString *const kRTCMediaConstraintsValueTrue; |
| 39 | RTC_EXTERN NSString *const kRTCMediaConstraintsValueFalse; |
| 40 | |
Mirko Bonadei | e8d5724 | 2018-09-17 10:22:56 +0200 | [diff] [blame^] | 41 | RTC_OBJC_EXPORT |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 42 | @interface RTCMediaConstraints : NSObject |
| 43 | |
| 44 | - (instancetype)init NS_UNAVAILABLE; |
| 45 | |
| 46 | /** Initialize with mandatory and/or optional constraints. */ |
| 47 | - (instancetype) |
| 48 | initWithMandatoryConstraints:(nullable NSDictionary<NSString *, NSString *> *)mandatory |
| 49 | optionalConstraints:(nullable NSDictionary<NSString *, NSString *> *)optional |
| 50 | NS_DESIGNATED_INITIALIZER; |
| 51 | |
| 52 | @end |
| 53 | |
| 54 | NS_ASSUME_NONNULL_END |