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

Unified Diff: webrtc/examples/objc/AppRTCMobile/mac/APPRTCViewController.m

Issue 2778163005: Use new RTCCameraVideoCapturer in AppRTCMobile. (Closed)
Patch Set: Remove localCapturer property from ARDVideoCallViewController. Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/examples/objc/AppRTCMobile/mac/APPRTCViewController.m
diff --git a/webrtc/examples/objc/AppRTCMobile/mac/APPRTCViewController.m b/webrtc/examples/objc/AppRTCMobile/mac/APPRTCViewController.m
index 089901efda60b6726f77aff9a174425f50c3b339..9d36d9b2bed146186be1e5e81863149020cc4044 100644
--- a/webrtc/examples/objc/AppRTCMobile/mac/APPRTCViewController.m
+++ b/webrtc/examples/objc/AppRTCMobile/mac/APPRTCViewController.m
@@ -17,6 +17,7 @@
#import "WebRTC/RTCVideoTrack.h"
#import "ARDAppClient.h"
+#import "ARDCaptureController.h"
#import "ARDSettingsModel.h"
static NSUInteger const kContentWidth = 900;
@@ -299,6 +300,7 @@ static NSUInteger const kBottomViewHeight = 200;
ARDAppClient* _client;
RTCVideoTrack* _localVideoTrack;
RTCVideoTrack* _remoteVideoTrack;
+ ARDCaptureController* _captureController;
}
- (void)dealloc {
@@ -353,6 +355,14 @@ static NSUInteger const kBottomViewHeight = 200;
didChangeConnectionState:(RTCIceConnectionState)state {
}
+- (void)appClient:(ARDAppClient*)client
+ didCreateLocalCapturer:(RTCCameraVideoCapturer*)localCapturer {
+ _captureController =
+ [[ARDCaptureController alloc] initWithCapturer:localCapturer
+ settings:[[ARDSettingsModel alloc] init]];
+ [_captureController startCapture];
+}
+
- (void)appClient:(ARDAppClient *)client
didReceiveLocalVideoTrack:(RTCVideoTrack *)localVideoTrack {
_localVideoTrack = localVideoTrack;
@@ -386,7 +396,7 @@ static NSUInteger const kBottomViewHeight = 200;
return;
}
- [_client disconnect];
+ [self disconnect];
ARDAppClient* client = [[ARDAppClient alloc] initWithDelegate:self];
[client connectToRoomWithId:roomId
settings:[[ARDSettingsModel alloc] init] // Use default settings.
@@ -420,6 +430,8 @@ static NSUInteger const kBottomViewHeight = 200;
- (void)disconnect {
[self resetUI];
+ [_captureController stopCapture];
+ _captureController = nil;
[_client disconnect];
}

Powered by Google App Engine
This is Rietveld 408576698