Delete deprecated StartRtcEventLog override with PlatformFile

Bug: webrtc:6463
Change-Id: I57c2372a232d72b054d8e3e4f423e11b3fb22430
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134460
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28131}
This commit is contained in:
Niels Möller
2019-05-13 12:27:23 +02:00
committed by Commit Bot
parent f330183727
commit 695cf6ac42
12 changed files with 23 additions and 68 deletions

View File

@ -30,7 +30,9 @@
#include "api/jsep_ice_candidate.h"
#include "api/media_transport_interface.h"
#include "api/rtc_event_log_output_file.h"
#include "rtc_base/checks.h"
#include "rtc_base/numerics/safe_conversions.h"
NSString * const kRTCPeerConnectionErrorDomain =
@"org.webrtc.RTCPeerConnection";
@ -540,8 +542,12 @@ void PeerConnectionDelegateAdapter::OnRemoveTrack(
RTCLogError(@"Error opening file: %@. Error: %d", filePath, errno);
return NO;
}
_hasStartedRtcEventLog =
_peerConnection->StartRtcEventLog(fd, maxSizeInBytes);
// TODO(eladalon): It would be better to not allow negative values into PC.
const size_t max_size = (maxSizeInBytes < 0) ? webrtc::RtcEventLog::kUnlimitedOutput :
rtc::saturated_cast<size_t>(maxSizeInBytes);
_hasStartedRtcEventLog = _peerConnection->StartRtcEventLog(
absl::make_unique<webrtc::RtcEventLogOutputFile>(fd, max_size));
return _hasStartedRtcEventLog;
}