Reland of "Move RtcEventLog object from inside VoiceEngine to Call.", "Fix to make the start/stop functions for the Rtc Eventlog non-virtual." and "Fix for RtcEventLog ObjC interface"

The breaking tests in Chromium have been temporarily disabled, they will be fixed and reenabled soon.

Original CLs: https://codereview.webrtc.org/1748403002/, https://codereview.webrtc.org/2107253002/ and https://codereview.webrtc.org/2106103003/.

TBR=solenberg@webrtc.org,tommi@webrtc.org,stefan@webrtc.org,terelius@webrtc.org,tkchin@webrtc.org
BUG=webrtc:4741, webrtc:5603, chromium:609749

Review-Url: https://codereview.webrtc.org/2110113003
Cr-Commit-Position: refs/heads/master@{#13379}
This commit is contained in:
ivoc
2016-07-04 07:06:55 -07:00
committed by Commit bot
parent 77ad394fa6
commit 14d5dbe5b3
61 changed files with 428 additions and 359 deletions

View File

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