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

Side by Side Diff: webrtc/examples/objc/AppRTCDemo/ios/ARDMainViewController.m

Issue 2253013006: Adding AecDump functionality to AppRTCDemo for iOS (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Changes in response to reviewer comments Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2015 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2015 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 RTCAudioSession *session = [RTCAudioSession sharedInstance]; 47 RTCAudioSession *session = [RTCAudioSession sharedInstance];
48 [session addDelegate:self]; 48 [session addDelegate:self];
49 49
50 [self configureAudioSession]; 50 [self configureAudioSession];
51 [self setupAudioPlayer]; 51 [self setupAudioPlayer];
52 } 52 }
53 53
54 #pragma mark - ARDMainViewDelegate 54 #pragma mark - ARDMainViewDelegate
55 55
56 - (void)mainView:(ARDMainView *)mainView 56 - (void)mainView:(ARDMainView *)mainView
57 didInputRoom:(NSString *)room 57 didInputRoom:(NSString *)room
58 isLoopback:(BOOL)isLoopback 58 isLoopback:(BOOL)isLoopback
59 isAudioOnly:(BOOL)isAudioOnly 59 isAudioOnly:(BOOL)isAudioOnly
60 shouldMakeAecDump:(BOOL)shouldMakeAecDump
60 useManualAudio:(BOOL)useManualAudio { 61 useManualAudio:(BOOL)useManualAudio {
61 if (!room.length) { 62 if (!room.length) {
62 [self showAlertWithMessage:@"Missing room name."]; 63 [self showAlertWithMessage:@"Missing room name."];
63 return; 64 return;
64 } 65 }
65 // Trim whitespaces. 66 // Trim whitespaces.
66 NSCharacterSet *whitespaceSet = [NSCharacterSet whitespaceCharacterSet]; 67 NSCharacterSet *whitespaceSet = [NSCharacterSet whitespaceCharacterSet];
67 NSString *trimmedRoom = [room stringByTrimmingCharactersInSet:whitespaceSet]; 68 NSString *trimmedRoom = [room stringByTrimmingCharactersInSet:whitespaceSet];
68 69
69 // Check that room name is valid. 70 // Check that room name is valid.
(...skipping 19 matching lines...) Expand all
89 90
90 RTCAudioSession *session = [RTCAudioSession sharedInstance]; 91 RTCAudioSession *session = [RTCAudioSession sharedInstance];
91 session.useManualAudio = useManualAudio; 92 session.useManualAudio = useManualAudio;
92 session.isAudioEnabled = NO; 93 session.isAudioEnabled = NO;
93 94
94 // Kick off the video call. 95 // Kick off the video call.
95 ARDVideoCallViewController *videoCallViewController = 96 ARDVideoCallViewController *videoCallViewController =
96 [[ARDVideoCallViewController alloc] initForRoom:trimmedRoom 97 [[ARDVideoCallViewController alloc] initForRoom:trimmedRoom
97 isLoopback:isLoopback 98 isLoopback:isLoopback
98 isAudioOnly:isAudioOnly 99 isAudioOnly:isAudioOnly
100 shouldMakeAecDump:shouldMakeAecDump
99 delegate:self]; 101 delegate:self];
100 videoCallViewController.modalTransitionStyle = 102 videoCallViewController.modalTransitionStyle =
101 UIModalTransitionStyleCrossDissolve; 103 UIModalTransitionStyleCrossDissolve;
102 [self presentViewController:videoCallViewController 104 [self presentViewController:videoCallViewController
103 animated:YES 105 animated:YES
104 completion:nil]; 106 completion:nil];
105 } 107 }
106 108
107 - (void)mainViewDidToggleAudioLoop:(ARDMainView *)mainView { 109 - (void)mainViewDidToggleAudioLoop:(ARDMainView *)mainView {
108 if (mainView.isAudioLoopPlaying) { 110 if (mainView.isAudioLoopPlaying) {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 - (void)showAlertWithMessage:(NSString*)message { 200 - (void)showAlertWithMessage:(NSString*)message {
199 UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:nil 201 UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:nil
200 message:message 202 message:message
201 delegate:nil 203 delegate:nil
202 cancelButtonTitle:@"OK" 204 cancelButtonTitle:@"OK"
203 otherButtonTitles:nil]; 205 otherButtonTitles:nil];
204 [alertView show]; 206 [alertView show];
205 } 207 }
206 208
207 @end 209 @end
OLDNEW
« no previous file with comments | « webrtc/examples/objc/AppRTCDemo/ios/ARDMainView.m ('k') | webrtc/examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698