blob: 8b2679fa82a8e264299e17fc6da8c3aeeaf80516 [file] [log] [blame]
denicijad17d5362016-11-02 02:56:09 -07001/*
2 * Copyright 2016 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
13NS_ASSUME_NONNULL_BEGIN
Anders Carlssone1500582017-06-15 16:05:13 +020014
denicijad17d5362016-11-02 02:56:09 -070015/**
denicija2256e042016-11-09 06:26:18 -080016 * Model class for user defined settings.
denicijad17d5362016-11-02 02:56:09 -070017 *
sakalc522e752017-04-05 12:17:48 -070018 * Handles storing the settings and provides default values if setting is not
19 * set. Also provides list of available options for different settings. Stores
20 * for example video codec, video resolution and maximum bitrate.
denicijad17d5362016-11-02 02:56:09 -070021 */
denicija2256e042016-11-09 06:26:18 -080022@interface ARDSettingsModel : NSObject
denicijad17d5362016-11-02 02:56:09 -070023
24/**
25 * Returns array of available capture resoultions.
26 *
27 * The capture resolutions are represented as strings in the following format
28 * [width]x[height]
29 */
sakalc522e752017-04-05 12:17:48 -070030- (NSArray<NSString *> *)availableVideoResolutions;
denicijad17d5362016-11-02 02:56:09 -070031
32/**
sakalc522e752017-04-05 12:17:48 -070033 * Returns current video resolution string.
34 * If no resolution is in store, default value of 640x480 is returned.
denicijad17d5362016-11-02 02:56:09 -070035 * When defaulting to value, the default is saved in store for consistency reasons.
36 */
sakalc522e752017-04-05 12:17:48 -070037- (NSString *)currentVideoResolutionSettingFromStore;
38- (int)currentVideoResolutionWidthFromStore;
39- (int)currentVideoResolutionHeightFromStore;
denicijad17d5362016-11-02 02:56:09 -070040
41/**
sakalc522e752017-04-05 12:17:48 -070042 * Stores the provided video resolution string into the store.
denicijad17d5362016-11-02 02:56:09 -070043 *
sakalc522e752017-04-05 12:17:48 -070044 * If the provided resolution is no part of the available video resolutions
denicijad17d5362016-11-02 02:56:09 -070045 * the store operation will not be executed and NO will be returned.
sakalc522e752017-04-05 12:17:48 -070046 * @param resolution the string to be stored.
denicijad17d5362016-11-02 02:56:09 -070047 * @return YES/NO depending on success.
48 */
sakalc522e752017-04-05 12:17:48 -070049- (BOOL)storeVideoResolutionSetting:(NSString *)resolution;
denicijad17d5362016-11-02 02:56:09 -070050
51/**
sakal68b5df92017-03-17 09:01:59 -070052 * Returns array of available video codecs.
53 */
54- (NSArray<NSString *> *)availableVideoCodecs;
55
56/**
sakal268862c2017-04-11 05:36:43 -070057 * Returns current video codec setting from store if present or default (H264) otherwise.
sakal68b5df92017-03-17 09:01:59 -070058 */
59- (NSString *)currentVideoCodecSettingFromStore;
60
61/**
62 * Stores the provided video codec setting into the store.
63 *
sakalc522e752017-04-05 12:17:48 -070064 * If the provided video codec is not part of the available video codecs
sakal68b5df92017-03-17 09:01:59 -070065 * the store operation will not be executed and NO will be returned.
66 * @param video codec settings the string to be stored.
67 * @return YES/NO depending on success.
68 */
69- (BOOL)storeVideoCodecSetting:(NSString *)videoCodec;
70
71/**
denicija9af2b602016-11-17 00:43:43 -080072 * Returns current max bitrate setting from store if present.
73 */
74- (nullable NSNumber *)currentMaxBitrateSettingFromStore;
75
76/**
77 * Stores the provided bitrate value into the store.
78 *
79 * @param bitrate NSNumber representation of the max bitrate value.
80 */
81- (void)storeMaxBitrateSetting:(nullable NSNumber *)bitrate;
82
Anders Carlssone1500582017-06-15 16:05:13 +020083/**
84 * Returns current audio only setting from store if present or default (NO) otherwise.
85 */
86- (BOOL)currentAudioOnlySettingFromStore;
87
88/**
89 * Stores the provided audio only setting into the store.
90 *
91 * @param setting the boolean value to be stored.
92 */
93- (void)storeAudioOnlySetting:(BOOL)audioOnly;
94
95/**
96 * Returns current create AecDump setting from store if present or default (NO) otherwise.
97 */
98- (BOOL)currentCreateAecDumpSettingFromStore;
99
100/**
101 * Stores the provided create AecDump setting into the store.
102 *
103 * @param setting the boolean value to be stored.
104 */
105- (void)storeCreateAecDumpSetting:(BOOL)createAecDump;
106
107/**
108 * Returns current setting whether to use level controller from store if present or default (NO)
109 * otherwise.
110 */
111- (BOOL)currentUseLevelControllerSettingFromStore;
112
113/**
114 * Stores the provided use level controller setting into the store.
115 *
116 * @param setting the boolean value to be stored.
117 */
118- (void)storeUseLevelControllerSetting:(BOOL)useLevelController;
119
120/**
121 * Returns current setting whether to use manual audio config from store if present or default (YES)
122 * otherwise.
123 */
124- (BOOL)currentUseManualAudioConfigSettingFromStore;
125
126/**
127 * Stores the provided use manual audio config setting into the store.
128 *
129 * @param setting the boolean value to be stored.
130 */
131- (void)storeUseManualAudioConfigSetting:(BOOL)useManualAudioConfig;
132
denicijad17d5362016-11-02 02:56:09 -0700133@end
134NS_ASSUME_NONNULL_END