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

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

Issue 2253013006: Adding AecDump functionality to AppRTCDemo for iOS (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 4 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/AppRTCDemo/ARDAppClient.m
diff --git a/webrtc/examples/objc/AppRTCDemo/ARDAppClient.m b/webrtc/examples/objc/AppRTCDemo/ARDAppClient.m
index 43eb6f4ad2fff30c4534ec9bea438b015c6d890e..f66a92d3deb2f526c3676bee273f8c3b5ce3c28b 100644
--- a/webrtc/examples/objc/AppRTCDemo/ARDAppClient.m
+++ b/webrtc/examples/objc/AppRTCDemo/ARDAppClient.m
@@ -129,6 +129,8 @@ static int64_t const kARDAppClientRtcEventLogMaxSizeInBytes = 5e6; // 5 MB.
_defaultPeerConnectionConstraints;
@synthesize isLoopback = _isLoopback;
@synthesize isAudioOnly = _isAudioOnly;
+@synthesize makeAecDump = _makeAecDump;
+
- (instancetype)init {
if (self = [super init]) {
@@ -220,11 +222,13 @@ static int64_t const kARDAppClientRtcEventLogMaxSizeInBytes = 5e6; // 5 MB.
- (void)connectToRoomWithId:(NSString *)roomId
isLoopback:(BOOL)isLoopback
- isAudioOnly:(BOOL)isAudioOnly {
+ isAudioOnly:(BOOL)isAudioOnly
+ makeAecDump:(BOOL)makeAecDump {
NSParameterAssert(roomId.length);
NSParameterAssert(_state == kARDAppClientStateDisconnected);
_isLoopback = isLoopback;
_isAudioOnly = isAudioOnly;
+ _makeAecDump = makeAecDump;
self.state = kARDAppClientStateConnecting;
#if defined(WEBRTC_IOS)
@@ -309,6 +313,9 @@ static int64_t const kARDAppClientRtcEventLogMaxSizeInBytes = 5e6; // 5 MB.
_hasReceivedSdp = NO;
_messageQueue = [NSMutableArray array];
#if defined(WEBRTC_IOS)
+ if (_makeAecDump) {
+ [_factory stopAecDump];
+ }
[_peerConnection stopRtcEventLog];
#endif
_peerConnection = nil;
@@ -562,6 +569,14 @@ static int64_t const kARDAppClientRtcEventLogMaxSizeInBytes = 5e6; // 5 MB.
RTCLogError(@"Failed to start event logging.");
}
}
+
+ // Start aecdump diagnostic recording.
+ if (_makeAecDump) {
+ NSString *filePath = [self documentsFilePathForFileName:@"audio.aecdump"];
+ if (![_factory startAecDump: filePath]) {
tkchin_webrtc 2016/08/19 17:31:42 nit: no space after :
peah-webrtc 2016/08/23 11:45:15 Done.
+ RTCLogError(@"Failed to create aecdump.");
+ }
+ }
#endif
}

Powered by Google App Engine
This is Rietveld 408576698