hjon | 6f5ca08 | 2016-01-07 09:29:29 -0800 | [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 | |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 13 | #import <WebRTC/RTCMacros.h> |
tkchin | 8b577ed | 2016-04-19 10:04:41 -0700 | [diff] [blame] | 14 | |
hjon | 6f5ca08 | 2016-01-07 09:29:29 -0800 | [diff] [blame] | 15 | NS_ASSUME_NONNULL_BEGIN |
| 16 | |
VladimirTechMan | 7b3eca9 | 2017-05-31 18:25:48 -0700 | [diff] [blame] | 17 | /** Constraint keys for media sources. */ |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame^] | 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; |
haysc | 98c4374 | 2017-02-03 13:03:39 -0800 | [diff] [blame] | 26 | /** The value for this key should be a base64 encoded string containing |
| 27 | * the data from the serialized configuration proto. |
| 28 | */ |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame^] | 29 | RTC_EXTERN NSString *const kRTCMediaConstraintsAudioNetworkAdaptorConfig; |
tkchin | ab1293a | 2016-08-30 12:35:05 -0700 | [diff] [blame] | 30 | |
VladimirTechMan | 7b3eca9 | 2017-05-31 18:25:48 -0700 | [diff] [blame] | 31 | /** Constraint keys for generating offers and answers. */ |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame^] | 32 | RTC_EXTERN NSString *const kRTCMediaConstraintsIceRestart; |
| 33 | RTC_EXTERN NSString *const kRTCMediaConstraintsOfferToReceiveAudio; |
| 34 | RTC_EXTERN NSString *const kRTCMediaConstraintsOfferToReceiveVideo; |
| 35 | RTC_EXTERN NSString *const kRTCMediaConstraintsVoiceActivityDetection; |
VladimirTechMan | 7b3eca9 | 2017-05-31 18:25:48 -0700 | [diff] [blame] | 36 | |
| 37 | /** Constraint values for Boolean parameters. */ |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame^] | 38 | RTC_EXTERN NSString *const kRTCMediaConstraintsValueTrue; |
| 39 | RTC_EXTERN NSString *const kRTCMediaConstraintsValueFalse; |
magjed | 78810b6 | 2016-08-17 11:07:37 -0700 | [diff] [blame] | 40 | |
tkchin | 8b577ed | 2016-04-19 10:04:41 -0700 | [diff] [blame] | 41 | RTC_EXPORT |
hjon | 6f5ca08 | 2016-01-07 09:29:29 -0800 | [diff] [blame] | 42 | @interface RTCMediaConstraints : NSObject |
| 43 | |
Jon Hjelle | 32e0c01 | 2016-03-08 16:04:46 -0800 | [diff] [blame] | 44 | - (instancetype)init NS_UNAVAILABLE; |
hjon | 6f5ca08 | 2016-01-07 09:29:29 -0800 | [diff] [blame] | 45 | |
| 46 | /** Initialize with mandatory and/or optional constraints. */ |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame^] | 47 | - (instancetype) |
| 48 | initWithMandatoryConstraints:(nullable NSDictionary<NSString *, NSString *> *)mandatory |
| 49 | optionalConstraints:(nullable NSDictionary<NSString *, NSString *> *)optional |
hjon | 6f5ca08 | 2016-01-07 09:29:29 -0800 | [diff] [blame] | 50 | NS_DESIGNATED_INITIALIZER; |
hjon | 6f5ca08 | 2016-01-07 09:29:29 -0800 | [diff] [blame] | 51 | |
| 52 | @end |
| 53 | |
| 54 | NS_ASSUME_NONNULL_END |