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

Unified Diff: webrtc/sdk/objc/Framework/Classes/RTCPeerConnectionFactory.mm

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/sdk/objc/Framework/Classes/RTCPeerConnectionFactory.mm
diff --git a/webrtc/sdk/objc/Framework/Classes/RTCPeerConnectionFactory.mm b/webrtc/sdk/objc/Framework/Classes/RTCPeerConnectionFactory.mm
index 9c9fd75ac0908c815d3f40e0327a0c2229849e76..e6635cd5857149b8a2f39aa7a0ffd54963dfcd05 100644
--- a/webrtc/sdk/objc/Framework/Classes/RTCPeerConnectionFactory.mm
+++ b/webrtc/sdk/objc/Framework/Classes/RTCPeerConnectionFactory.mm
@@ -48,6 +48,25 @@
return self;
}
+
+- (BOOL) startAecDump:(NSString *)filename {
+ int fd = open(filename.UTF8String, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
+ if (fd < 0) {
+ NSAssert(_nativeFactory, @"Failed to create the aecdump file!");
tkchin_webrtc 2016/08/19 17:31:42 Why is there an assert on the factory here? Should
peah-webrtc 2016/08/23 11:45:15 That would definitely make sense. I moved this cod
+ return false;
tkchin_webrtc 2016/08/19 17:31:42 BOOL is YES or NO. return NO;
peah-webrtc 2016/08/23 11:45:15 Done.
+ }
+
+ // Pass the file to the recorder. The file ownership
+ // is passed to the recorder, and the recorder
+ // closes the file when needed.
+ return _nativeFactory->StartAecDump(fd, -1);
+}
+
+- (void)stopAecDump {
+ // The file is closed by the call below.
+ _nativeFactory->StopAecDump();
+}
+
- (RTCAVFoundationVideoSource *)avFoundationVideoSourceWithConstraints:
(nullable RTCMediaConstraints *)constraints {
return [[RTCAVFoundationVideoSource alloc] initWithFactory:self

Powered by Google App Engine
This is Rietveld 408576698