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

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

Issue 2106103003: Fix for RtcEventLog ObjC interface (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixed formatting. Created 4 years, 6 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/sdk/objc/Framework/Classes/RTCPeerConnection.mm » ('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 88431c6562d18682891377aef9d34f628965cb78..43eb6f4ad2fff30c4534ec9bea438b015c6d890e 100644
--- a/webrtc/examples/objc/AppRTCDemo/ARDAppClient.m
+++ b/webrtc/examples/objc/AppRTCDemo/ARDAppClient.m
@@ -308,11 +308,13 @@ static int64_t const kARDAppClientRtcEventLogMaxSizeInBytes = 5e6; // 5 MB.
_isInitiator = NO;
_hasReceivedSdp = NO;
_messageQueue = [NSMutableArray array];
+#if defined(WEBRTC_IOS)
+ [_peerConnection stopRtcEventLog];
+#endif
_peerConnection = nil;
self.state = kARDAppClientStateDisconnected;
#if defined(WEBRTC_IOS)
RTCStopInternalCapture();
- [_factory stopRtcEventLog];
#endif
}
@@ -526,17 +528,6 @@ static int64_t const kARDAppClientRtcEventLogMaxSizeInBytes = 5e6; // 5 MB.
}
self.state = kARDAppClientStateConnected;
-#if defined(WEBRTC_IOS)
- // Start event log.
- if (kARDAppClientEnableRtcEventLog) {
- NSString *filePath = [self documentsFilePathForFileName:@"webrtc-rtceventlog"];
- if (![_factory startRtcEventLogWithFilePath:filePath
- maxSizeInBytes:kARDAppClientRtcEventLogMaxSizeInBytes]) {
- RTCLogError(@"Failed to start event logging.");
- }
- }
-#endif
-
// Create peer connection.
RTCMediaConstraints *constraints = [self defaultPeerConnectionConstraints];
RTCConfiguration *config = [[RTCConfiguration alloc] init];
@@ -562,6 +553,16 @@ static int64_t const kARDAppClientRtcEventLogMaxSizeInBytes = 5e6; // 5 MB.
// Check if we've received an offer.
[self drainMessageQueueIfReady];
}
+#if defined(WEBRTC_IOS)
+ // Start event log.
+ if (kARDAppClientEnableRtcEventLog) {
+ NSString *filePath = [self documentsFilePathForFileName:@"webrtc-rtceventlog"];
+ if (![_peerConnection startRtcEventLogWithFilePath:filePath
+ maxSizeInBytes:kARDAppClientRtcEventLogMaxSizeInBytes]) {
+ RTCLogError(@"Failed to start event logging.");
+ }
+ }
+#endif
}
// Processes the messages that we've received from the room server and the
« no previous file with comments | « no previous file | webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698