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

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

Issue 2462623002: Add setting to AppRTCMobile for iOS, that can change capture resolution. (Closed)
Patch Set: Address comments 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..9ef46b4742beb76ca9335230499d13ddfef546f3 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 *_cameraConstraints;
}
@synthesize shouldGetStats = _shouldGetStats;
@@ -321,6 +322,10 @@ static int64_t const kARDAppClientRtcEventLogMaxSizeInBytes = 5e6; // 5 MB.
#endif
}
+- (void)setCameraConstraints:(RTCMediaConstraints *)mediaConstraints {
+ _cameraConstraints = mediaConstraints;
+}
+
#pragma mark - ARDSignalingChannelDelegate
- (void)channel:(id<ARDSignalingChannel>)channel
@@ -695,10 +700,10 @@ static int64_t const kARDAppClientRtcEventLogMaxSizeInBytes = 5e6; // 5 MB.
// trying to open a local stream.
#if !TARGET_IPHONE_SIMULATOR
if (!_isAudioOnly) {
- RTCMediaConstraints *mediaConstraints =
- [self defaultMediaStreamConstraints];
+ RTCMediaConstraints *cameraConstraints =
+ [self cameraConstraints];
RTCAVFoundationVideoSource *source =
- [_factory avFoundationVideoSourceWithConstraints:mediaConstraints];
+ [_factory avFoundationVideoSourceWithConstraints:cameraConstraints];
localVideoTrack =
[_factory videoTrackWithSource:source
trackId:kARDVideoTrackId];
@@ -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;
+- (RTCMediaConstraints *)cameraConstraints {
+ return _cameraConstraints;
}
- (RTCMediaConstraints *)defaultAnswerConstraints {
« no previous file with comments | « webrtc/examples/objc/AppRTCMobile/ARDAppClient.h ('k') | webrtc/examples/objc/AppRTCMobile/ios/ARDMainViewController.m » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698