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

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

Issue 2279293003: Update AecDump API to match RtcEventLog API signature. (Closed)
Patch Set: Fix rebase. 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
« no previous file with comments | « no previous file | webrtc/examples/objc/AppRTCDemo/ARDAppClient+Internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/examples/objc/AppRTCDemo/ARDAppClient.m
diff --git a/webrtc/examples/objc/AppRTCDemo/ARDAppClient.m b/webrtc/examples/objc/AppRTCDemo/ARDAppClient.m
index ea86c5ed48279e2b6da87edb1cf28cf263b0bf5c..9f6195167084ccd265778472cb5369b4bc315d57 100644
--- a/webrtc/examples/objc/AppRTCDemo/ARDAppClient.m
+++ b/webrtc/examples/objc/AppRTCDemo/ARDAppClient.m
@@ -58,6 +58,7 @@ static NSString * const kARDVideoTrackId = @"ARDAMSv0";
// TODO(tkchin): Add these as UI options.
static BOOL const kARDAppClientEnableTracing = NO;
static BOOL const kARDAppClientEnableRtcEventLog = YES;
+static int64_t const kARDAppClientAecDumpMaxSizeInBytes = 5e6; // 5 MB.
static int64_t const kARDAppClientRtcEventLogMaxSizeInBytes = 5e6; // 5 MB.
#endif
@@ -130,7 +131,6 @@ static int64_t const kARDAppClientRtcEventLogMaxSizeInBytes = 5e6; // 5 MB.
@synthesize isLoopback = _isLoopback;
@synthesize isAudioOnly = _isAudioOnly;
@synthesize shouldMakeAecDump = _shouldMakeAecDump;
-@synthesize isAecDumpActive = _isAecDumpActive;
@synthesize shouldUseLevelControl = _shouldUseLevelControl;
- (instancetype)init {
@@ -316,10 +316,7 @@ static int64_t const kARDAppClientRtcEventLogMaxSizeInBytes = 5e6; // 5 MB.
_hasReceivedSdp = NO;
_messageQueue = [NSMutableArray array];
#if defined(WEBRTC_IOS)
- if (_isAecDumpActive) {
- [_factory stopAecDump];
- _isAecDumpActive = NO;
- }
+ [_factory stopAecDump];
[_peerConnection stopRtcEventLog];
#endif
_peerConnection = nil;
@@ -576,17 +573,10 @@ static int64_t const kARDAppClientRtcEventLogMaxSizeInBytes = 5e6; // 5 MB.
// Start aecdump diagnostic recording.
if (_shouldMakeAecDump) {
- _isAecDumpActive = YES;
- NSString *filePath = [self documentsFilePathForFileName:@"audio.aecdump"];
- int fd = open(filePath.UTF8String, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
- if (fd < 0) {
- RTCLogError(@"Failed to create the aecdump file!");
- _isAecDumpActive = NO;
- } else {
- if (![_factory startAecDumpWithFileDescriptor:fd maxFileSizeInBytes:-1]) {
- RTCLogError(@"Failed to create aecdump.");
- _isAecDumpActive = NO;
- }
+ NSString *filePath = [self documentsFilePathForFileName:@"webrtc-audio.aecdump"];
+ if (![_factory startAecDumpWithFilePath:filePath
+ maxSizeInBytes:kARDAppClientAecDumpMaxSizeInBytes]) {
+ RTCLogError(@"Failed to start aec dump.");
}
}
#endif
« no previous file with comments | « no previous file | webrtc/examples/objc/AppRTCDemo/ARDAppClient+Internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698