Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 NS_ASSUME_NONNULL_BEGIN | |
| 14 /** | |
| 15 * Model class for user defined media constraints. | |
| 16 * | |
| 17 * Currently used for streaming media constraints only. | |
| 18 * In future audio media constraints support can be added as well. | |
| 19 * Offers list of avaliable video resolutions that can construct streaming media constraint. | |
| 20 * Exposes methods for reading and storing media constraints from persistent sto re. | |
| 21 * Also translates current user defined media constraint into RTCMediaConstraint s | |
| 22 * dictionary. | |
| 23 */ | |
| 24 @interface ARDMediaConstraintsModel : 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 *> *)availableVideoResoultionsMediaConstraints; | |
| 33 | |
| 34 /** | |
| 35 * Returns current video resolution media constraint string. | |
| 36 * If no constraint is in store, default value of 640x480 is returned. | |
| 37 * When defaulting to value, the default is saved in store for consistency reaso ns. | |
| 38 */ | |
| 39 - (NSString *)currentVideoResoultionConstraintFromStore; | |
|
magjed_webrtc
2016/10/31 19:26:39
Wouldn't it be more convenient to represent the re
daniela-webrtc
2016/11/01 09:51:12
It would make things cleaner for sure. Sadly, str
magjed_webrtc
2016/11/01 12:06:09
I thought we could just do this in ObjC:
someStrin
daniela-webrtc
2016/11/01 14:43:32
Sorry I think I didn't elaborate my thinking well
magjed_webrtc
2016/11/01 17:52:20
Alright, let's keep it as strings for now if you t
| |
| 40 | |
| 41 /** | |
| 42 * Stores the provided video resolution media constraint string into the store. | |
| 43 * | |
| 44 * @param constraint the string to be stored. | |
| 45 */ | |
| 46 - (void)storeVideoResoultionConstraint:(NSString *)constraint; | |
| 47 | |
| 48 /** | |
| 49 * Converts the current media constraints from store into dictionary with RTCMed iaConstraints | |
| 50 * values. | |
| 51 * | |
| 52 * @return NSDictionary with RTC width and height parameters | |
| 53 */ | |
| 54 - (nullable NSDictionary *)currentMediaConstraintFromStoreAsRTCDictionary; | |
| 55 | |
| 56 @end | |
| 57 NS_ASSUME_NONNULL_END | |
| OLD | NEW |