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

Unified Diff: webrtc/examples/objc/AppRTCMobile/ARDAppClient.m

Issue 2462623002: Add setting to AppRTCMobile for iOS, that can change capture resolution. (Closed)
Patch Set: Add check to make sure only available constraint is being stored. 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/ARDAppClient.m
diff --git a/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m b/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m
index 1020621cc1bd2b91340963ac20609688aaacd8f6..ecf65286d8ad09a94f75ce1555bba2bedb348648 100644
--- a/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m
+++ b/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m
@@ -101,6 +101,7 @@ static int64_t const kARDAppClientRtcEventLogMaxSizeInBytes = 5e6; // 5 MB.
@implementation ARDAppClient {
RTCFileLogger *_fileLogger;
ARDTimerProxy *_statsTimer;
+ RTCMediaConstraints *_defaultMediaStreamConstraints;
}
@synthesize shouldGetStats = _shouldGetStats;
@@ -321,6 +322,10 @@ static int64_t const kARDAppClientRtcEventLogMaxSizeInBytes = 5e6; // 5 MB.
#endif
}
+- (void)setDefaultMediaStreamConstraints:(RTCMediaConstraints *)mediaConstraints {
+ _defaultMediaStreamConstraints = mediaConstraints;
+}
+
#pragma mark - ARDSignalingChannelDelegate
- (void)channel:(id<ARDSignalingChannel>)channel
@@ -737,18 +742,14 @@ static int64_t const kARDAppClientRtcEventLogMaxSizeInBytes = 5e6; // 5 MB.
NSString *valueLevelControl = _shouldUseLevelControl ?
kRTCMediaConstraintsValueTrue : kRTCMediaConstraintsValueFalse;
NSDictionary *mandatoryConstraints = @{ kRTCMediaConstraintsLevelControl : valueLevelControl };
- RTCMediaConstraints* constraints =
- [[RTCMediaConstraints alloc] initWithMandatoryConstraints:mandatoryConstraints
- optionalConstraints:nil];
+ RTCMediaConstraints *constraints =
+ [[RTCMediaConstraints alloc] initWithMandatoryConstraints:mandatoryConstraints
+ optionalConstraints:nil];
return constraints;
}
- (RTCMediaConstraints *)defaultMediaStreamConstraints {
- RTCMediaConstraints* constraints =
- [[RTCMediaConstraints alloc]
- initWithMandatoryConstraints:nil
- optionalConstraints:nil];
- return constraints;
+ return _defaultMediaStreamConstraints;
}
- (RTCMediaConstraints *)defaultAnswerConstraints {

Powered by Google App Engine
This is Rietveld 408576698