tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

ARDSettingsModel.h (3818B)


      1 /*
      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 
     13 #import "sdk/objc/base/RTCVideoCodecInfo.h"
     14 
     15 NS_ASSUME_NONNULL_BEGIN
     16 
     17 /**
     18 * Model class for user defined settings.
     19 *
     20 * Handles storing the settings and provides default values if setting is not
     21 * set. Also provides list of available options for different settings. Stores
     22 * for example video codec, video resolution and maximum bitrate.
     23 */
     24 @interface ARDSettingsModel : NSObject
     25 
     26 /**
     27 * Returns array of available capture resoultions.
     28 *
     29 * The capture resolutions are represented as strings in the following format
     30 * [width]x[height]
     31 */
     32 - (NSArray<NSString *> *)availableVideoResolutions;
     33 
     34 /**
     35 * Returns current video resolution string.
     36 * If no resolution is in store, default value of 640x480 is returned.
     37 * When defaulting to value, the default is saved in store for consistency
     38 * reasons.
     39 */
     40 - (NSString *)currentVideoResolutionSettingFromStore;
     41 - (int)currentVideoResolutionWidthFromStore;
     42 - (int)currentVideoResolutionHeightFromStore;
     43 
     44 /**
     45 * Stores the provided video resolution string into the store.
     46 *
     47 * If the provided resolution is no part of the available video resolutions
     48 * the store operation will not be executed and NO will be returned.
     49 * @param resolution the string to be stored.
     50 * @return YES/NO depending on success.
     51 */
     52 - (BOOL)storeVideoResolutionSetting:(NSString *)resolution;
     53 
     54 /**
     55 * Returns array of available video codecs.
     56 */
     57 - (NSArray<RTC_OBJC_TYPE(RTCVideoCodecInfo) *> *)availableVideoCodecs;
     58 
     59 /**
     60 * Returns current video codec setting from store if present or default (H264)
     61 * otherwise.
     62 */
     63 - (RTC_OBJC_TYPE(RTCVideoCodecInfo) *)currentVideoCodecSettingFromStore;
     64 
     65 /**
     66 * Stores the provided video codec setting into the store.
     67 *
     68 * If the provided video codec is not part of the available video codecs
     69 * the store operation will not be executed and NO will be returned.
     70 * @param video codec settings the string to be stored.
     71 * @return YES/NO depending on success.
     72 */
     73 - (BOOL)storeVideoCodecSetting:(RTC_OBJC_TYPE(RTCVideoCodecInfo) *)videoCodec;
     74 
     75 /**
     76 * Returns current max bitrate setting from store if present.
     77 */
     78 - (nullable NSNumber *)currentMaxBitrateSettingFromStore;
     79 
     80 /**
     81 * Stores the provided bitrate value into the store.
     82 *
     83 * @param bitrate NSNumber representation of the max bitrate value.
     84 */
     85 - (void)storeMaxBitrateSetting:(nullable NSNumber *)bitrate;
     86 
     87 /**
     88 * Returns current audio only setting from store if present or default (NO)
     89 * otherwise.
     90 */
     91 - (BOOL)currentAudioOnlySettingFromStore;
     92 
     93 /**
     94 * Stores the provided audio only setting into the store.
     95 *
     96 * @param setting the boolean value to be stored.
     97 */
     98 - (void)storeAudioOnlySetting:(BOOL)audioOnly;
     99 
    100 /**
    101 * Returns current create AecDump setting from store if present or default (NO)
    102 * otherwise.
    103 */
    104 - (BOOL)currentCreateAecDumpSettingFromStore;
    105 
    106 /**
    107 * Stores the provided create AecDump setting into the store.
    108 *
    109 * @param setting the boolean value to be stored.
    110 */
    111 - (void)storeCreateAecDumpSetting:(BOOL)createAecDump;
    112 
    113 /**
    114 * Returns current setting whether to use manual audio config from store if
    115 * present or default (YES) otherwise.
    116 */
    117 - (BOOL)currentUseManualAudioConfigSettingFromStore;
    118 
    119 /**
    120 * Stores the provided use manual audio config setting into the store.
    121 *
    122 * @param setting the boolean value to be stored.
    123 */
    124 - (void)storeUseManualAudioConfigSetting:(BOOL)useManualAudioConfig;
    125 
    126 @end
    127 NS_ASSUME_NONNULL_END