blob: fce08212e9a40f6bcc837c6d86c71d97f7cf248f [file] [log] [blame]
hjon6f5ca082016-01-07 09:29:29 -08001/*
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
tkchin9eeb6242016-04-27 01:54:20 -070013#import <WebRTC/RTCMacros.h>
tkchin8b577ed2016-04-19 10:04:41 -070014
hjon6f5ca082016-01-07 09:29:29 -080015NS_ASSUME_NONNULL_BEGIN
16
VladimirTechMan7b3eca92017-05-31 18:25:48 -070017/** Constraint keys for media sources. */
Yves Gerey665174f2018-06-19 15:03:05 +020018RTC_EXTERN NSString *const kRTCMediaConstraintsMinAspectRatio;
19RTC_EXTERN NSString *const kRTCMediaConstraintsMaxAspectRatio;
20RTC_EXTERN NSString *const kRTCMediaConstraintsMaxWidth;
21RTC_EXTERN NSString *const kRTCMediaConstraintsMinWidth;
22RTC_EXTERN NSString *const kRTCMediaConstraintsMaxHeight;
23RTC_EXTERN NSString *const kRTCMediaConstraintsMinHeight;
24RTC_EXTERN NSString *const kRTCMediaConstraintsMaxFrameRate;
25RTC_EXTERN NSString *const kRTCMediaConstraintsMinFrameRate;
haysc98c43742017-02-03 13:03:39 -080026/** The value for this key should be a base64 encoded string containing
27 * the data from the serialized configuration proto.
28 */
Yves Gerey665174f2018-06-19 15:03:05 +020029RTC_EXTERN NSString *const kRTCMediaConstraintsAudioNetworkAdaptorConfig;
tkchinab1293a2016-08-30 12:35:05 -070030
VladimirTechMan7b3eca92017-05-31 18:25:48 -070031/** Constraint keys for generating offers and answers. */
Yves Gerey665174f2018-06-19 15:03:05 +020032RTC_EXTERN NSString *const kRTCMediaConstraintsIceRestart;
33RTC_EXTERN NSString *const kRTCMediaConstraintsOfferToReceiveAudio;
34RTC_EXTERN NSString *const kRTCMediaConstraintsOfferToReceiveVideo;
35RTC_EXTERN NSString *const kRTCMediaConstraintsVoiceActivityDetection;
VladimirTechMan7b3eca92017-05-31 18:25:48 -070036
37/** Constraint values for Boolean parameters. */
Yves Gerey665174f2018-06-19 15:03:05 +020038RTC_EXTERN NSString *const kRTCMediaConstraintsValueTrue;
39RTC_EXTERN NSString *const kRTCMediaConstraintsValueFalse;
magjed78810b62016-08-17 11:07:37 -070040
tkchin8b577ed2016-04-19 10:04:41 -070041RTC_EXPORT
hjon6f5ca082016-01-07 09:29:29 -080042@interface RTCMediaConstraints : NSObject
43
Jon Hjelle32e0c012016-03-08 16:04:46 -080044- (instancetype)init NS_UNAVAILABLE;
hjon6f5ca082016-01-07 09:29:29 -080045
46/** Initialize with mandatory and/or optional constraints. */
Yves Gerey665174f2018-06-19 15:03:05 +020047- (instancetype)
48 initWithMandatoryConstraints:(nullable NSDictionary<NSString *, NSString *> *)mandatory
49 optionalConstraints:(nullable NSDictionary<NSString *, NSString *> *)optional
hjon6f5ca082016-01-07 09:29:29 -080050 NS_DESIGNATED_INITIALIZER;
hjon6f5ca082016-01-07 09:29:29 -080051
52@end
53
54NS_ASSUME_NONNULL_END