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 |
} |