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

Unified Diff: webrtc/examples/objc/AppRTCMobile/ios/ARDSettingsStore.m

Issue 2492693003: Propagate bitrate setting to RTCRtpSender. (Closed)
Patch Set: Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/examples/objc/AppRTCMobile/ios/ARDSettingsStore.m
diff --git a/webrtc/examples/objc/AppRTCMobile/ios/ARDSettingsStore.m b/webrtc/examples/objc/AppRTCMobile/ios/ARDSettingsStore.m
index 6b3642e00697f1581b04a487ae86da6f22f49818..a767f0f083b5fa8f3d903b921d6b2bed45c11d5e 100644
--- a/webrtc/examples/objc/AppRTCMobile/ios/ARDSettingsStore.m
+++ b/webrtc/examples/objc/AppRTCMobile/ios/ARDSettingsStore.m
@@ -12,17 +12,29 @@
static NSString *const kUserDefaultsMediaConstraintsKey =
@"rtc_video_resolution_media_constraints_key";
+static NSString *const kUserDefaultsBitrateKey = @"rtc_max_bitrate_key";
magjed_webrtc 2016/11/11 08:45:05 Why do these variable names contain 'UserDefaults'
daniela-webrtc 2016/11/11 13:45:12 No rule enforcing the UserDefaults in the name. I
magjed_webrtc 2016/11/14 13:05:27 I understand we can name the variable whatever and
daniela-webrtc 2016/11/14 13:36:15 Done.
NS_ASSUME_NONNULL_BEGIN
@implementation ARDSettingsStore
+- (NSUserDefaults *)storage {
+ return [NSUserDefaults standardUserDefaults];
+}
+
- (nullable NSString *)videoResolutionConstraintsSetting {
- return [[NSUserDefaults standardUserDefaults] objectForKey:kUserDefaultsMediaConstraintsKey];
+ return [[self storage] objectForKey:kUserDefaultsMediaConstraintsKey];
}
- (void)setVideoResolutionConstraintsSetting:(NSString *)constraintsString {
- [[NSUserDefaults standardUserDefaults] setObject:constraintsString
- forKey:kUserDefaultsMediaConstraintsKey];
+ [[self storage] setObject:constraintsString forKey:kUserDefaultsMediaConstraintsKey];
+}
+
+- (nullable NSNumber *)maxBitrateSetting {
+ return [[self storage] objectForKey:kUserDefaultsBitrateKey];
+}
+
+- (void)setMaxBitrateSetting:(nullable NSNumber *)value {
+ [[self storage] setObject:value forKey:kUserDefaultsBitrateKey];
}
@end

Powered by Google App Engine
This is Rietveld 408576698