Make the output_period_ms argument to StartRtcEventLog optional
Intended to ease transition to new log format. Bug: webrtc:6463, webrtc:8111 Change-Id: Icadaedb6a6a7d31038a45ff5eb0b054528f00f2f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135944 Reviewed-by: Björn Terelius <terelius@webrtc.org> Reviewed-by: Steve Anton <steveanton@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27920}
This commit is contained in:
parent
a36591c847
commit
f00ca1a2b8
@ -182,6 +182,11 @@ bool PeerConnectionInterface::StartRtcEventLog(
|
||||
return false;
|
||||
}
|
||||
|
||||
bool PeerConnectionInterface::StartRtcEventLog(
|
||||
std::unique_ptr<RtcEventLogOutput> output) {
|
||||
return false;
|
||||
}
|
||||
|
||||
rtc::scoped_refptr<DtlsTransportInterface>
|
||||
PeerConnectionInterface::LookupDtlsTransportByMid(const std::string& mid) {
|
||||
RTC_NOTREACHED();
|
||||
|
||||
@ -1074,8 +1074,14 @@ class RTC_EXPORT PeerConnectionInterface : public rtc::RefCountInterface {
|
||||
// |output| and passes it on to Call, which will take the ownership. If the
|
||||
// operation fails the output will be closed and deallocated. The event log
|
||||
// will send serialized events to the output object every |output_period_ms|.
|
||||
// Applications using the event log should generally make their own trade-off
|
||||
// regarding the output period. A long period is generally more efficient,
|
||||
// with potential drawbacks being more bursty thread usage, and more events
|
||||
// lost in case the application crashes. If the |output_period_ms| argument is
|
||||
// omitted, webrtc selects a default deemed to be workable in most cases.
|
||||
virtual bool StartRtcEventLog(std::unique_ptr<RtcEventLogOutput> output,
|
||||
int64_t output_period_ms);
|
||||
virtual bool StartRtcEventLog(std::unique_ptr<RtcEventLogOutput> output);
|
||||
|
||||
// Stops logging the RtcEventLog.
|
||||
// TODO(ivoc): Make this pure virtual when Chrome is updated.
|
||||
|
||||
@ -3791,6 +3791,12 @@ bool PeerConnection::StartRtcEventLog(std::unique_ptr<RtcEventLogOutput> output,
|
||||
RTC_FROM_HERE, Functor{this, std::move(output), output_period_ms});
|
||||
}
|
||||
|
||||
bool PeerConnection::StartRtcEventLog(
|
||||
std::unique_ptr<RtcEventLogOutput> output) {
|
||||
return StartRtcEventLog(std::move(output),
|
||||
webrtc::RtcEventLog::kImmediateOutput);
|
||||
}
|
||||
|
||||
void PeerConnection::StopRtcEventLog() {
|
||||
worker_thread()->Invoke<void>(
|
||||
RTC_FROM_HERE, rtc::Bind(&PeerConnection::StopRtcEventLog_w, this));
|
||||
|
||||
@ -211,6 +211,7 @@ class PeerConnection : public PeerConnectionInternal,
|
||||
int64_t max_size_bytes) override;
|
||||
bool StartRtcEventLog(std::unique_ptr<RtcEventLogOutput> output,
|
||||
int64_t output_period_ms) override;
|
||||
bool StartRtcEventLog(std::unique_ptr<RtcEventLogOutput> output) override;
|
||||
void StopRtcEventLog() override;
|
||||
|
||||
void Close() override;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user