Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(255)

Side by Side Diff: webrtc/examples/objc/AppRTCMobile/ARDSettingsModel.m

Issue 2770113004: Pass settings model to ARDAppClient instead of individual settings. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #import "ARDSettingsModel+Private.h" 11 #import "ARDSettingsModel+Private.h"
12 #import "ARDSettingsStore.h" 12 #import "ARDSettingsStore.h"
13 #import "WebRTC/RTCMediaConstraints.h" 13 #import "WebRTC/RTCMediaConstraints.h"
14 14
15 NS_ASSUME_NONNULL_BEGIN 15 NS_ASSUME_NONNULL_BEGIN
16 static NSArray<NSString *> *videoResolutionsStaticValues() { 16 static NSArray<NSString *> *videoResolutionsStaticValues() {
17 return @[ @"640x480", @"960x540", @"1280x720" ]; 17 return @[ @"640x480", @"960x540", @"1280x720" ];
18 } 18 }
19 19
20 static NSArray<NSString *> *videoCodecsStaticValues() { 20 static NSArray<NSString *> *videoCodecsStaticValues() { return @[ @"H264", @"VP8 ", @"VP9" ]; }
21 return @[ @"H264", @"VP8", @"VP9" ];
22 }
23 21
24 @interface ARDSettingsModel () { 22 @interface ARDSettingsModel () {
25 ARDSettingsStore *_settingsStore; 23 ARDSettingsStore *_settingsStore;
26 } 24 }
27 @end 25 @end
28 26
29 @implementation ARDSettingsModel 27 @implementation ARDSettingsModel
30 28
31 - (NSArray<NSString *> *)availableVideoResoultionsMediaConstraints { 29 - (NSArray<NSString *> *)availableVideoResoultionsMediaConstraints {
32 return videoResolutionsStaticValues(); 30 return videoResolutionsStaticValues();
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 mediaConstraintsDictionary = @{ 130 mediaConstraintsDictionary = @{
133 kRTCMediaConstraintsMinWidth : widthConstraint, 131 kRTCMediaConstraintsMinWidth : widthConstraint,
134 kRTCMediaConstraintsMinHeight : heightConstraint 132 kRTCMediaConstraintsMinHeight : heightConstraint
135 }; 133 };
136 } 134 }
137 return mediaConstraintsDictionary; 135 return mediaConstraintsDictionary;
138 } 136 }
139 137
140 @end 138 @end
141 NS_ASSUME_NONNULL_END 139 NS_ASSUME_NONNULL_END
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698