Add setting to AppRTCMobile for iOS, that can change capture resolution.
To achieve this, several changes needed to be made on both UI and
app logic level.
* Settings view controller is added (modally shown when the settings
button is pressed).
- From there the user can see the current capture resolution
and select another capture resolution.
* Model class for the capture resolution added.
- Improves readability and makes separation of concerns cleaner
- Handles persisting
- Provides defaults
- Maps video resolution setting to RTCMediaConstraints dictionary
* Test for the model class
In future it would be possible to extend this CL and add further settings (i.e
bit rate).
Also it would be easy to remove the hardcoded resolutions and use dynamic values
depending on device capability.
BUG=webrtc:6473
Review-Url: https://codereview.webrtc.org/2462623002
Cr-Commit-Position: refs/heads/master@{#14881}
diff --git a/webrtc/examples/objc/AppRTCMobile/ios/ARDSettingsViewController.h b/webrtc/examples/objc/AppRTCMobile/ios/ARDSettingsViewController.h
new file mode 100644
index 0000000..91b9fc9
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCMobile/ios/ARDSettingsViewController.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2016 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import <UIKit/UIKit.h>
+
+@class ARDMediaConstraintsModel;
+
+NS_ASSUME_NONNULL_BEGIN
+/**
+ * Displays settings options.
+ */
+@interface ARDSettingsViewController : UITableViewController
+
+/**
+ * Creates new instance.
+ *
+ * @param style the table view style that should be used
+ * @param mediaConstraintsModel model class for the media constraints settings.
+ */
+- (instancetype)initWithStyle:(UITableViewStyle)style
+ mediaConstraintsModel:(ARDMediaConstraintsModel *)mediaConstraintsModel;
+
+#pragma mark - Unavailable
+
+- (instancetype)initWithStyle:(UITableViewStyle)style NS_UNAVAILABLE;
+- (instancetype)init NS_UNAVAILABLE;
++ (instancetype) new NS_UNAVAILABLE;
+
+@end
+NS_ASSUME_NONNULL_END