Move RtcEventLog object from inside VoiceEngine to Call.

In addition to moving the logging object itself, this also moves the interface from PeerConnectionFactory to PeerConnection, which makes more sense for this functionality. An API parameter to set an upper limit to the size of the logfile is introduced.
The old interface on PeerConnectionFactory is not removed in this CL, because it is called from Chrome, it will be removed after Chrome is updated to use the PeerConnection interface.

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

Review URL: https://codereview.webrtc.org/1748403002 .

Cr-Commit-Position: refs/heads/master@{#13321}
This commit is contained in:
Ivo Creusen
2016-06-29 13:56:45 +02:00
parent 8cf2a3a3ad
commit 1895526c61
56 changed files with 380 additions and 313 deletions

View File

@ -79,20 +79,25 @@ class BitrateControllerImpl::RtcpBandwidthObserverImpl
BitrateController* BitrateController::CreateBitrateController(
Clock* clock,
BitrateObserver* observer) {
return new BitrateControllerImpl(clock, observer);
BitrateObserver* observer,
RtcEventLog* event_log) {
return new BitrateControllerImpl(clock, observer, event_log);
}
BitrateController* BitrateController::CreateBitrateController(Clock* clock) {
return new BitrateControllerImpl(clock, nullptr);
BitrateController* BitrateController::CreateBitrateController(
Clock* clock,
RtcEventLog* event_log) {
return CreateBitrateController(clock, nullptr, event_log);
}
BitrateControllerImpl::BitrateControllerImpl(Clock* clock,
BitrateObserver* observer)
BitrateObserver* observer,
RtcEventLog* event_log)
: clock_(clock),
observer_(observer),
last_bitrate_update_ms_(clock_->TimeInMilliseconds()),
bandwidth_estimation_(),
event_log_(event_log),
bandwidth_estimation_(event_log),
reserved_bitrate_bps_(0),
last_bitrate_bps_(0),
last_fraction_loss_(0),
@ -143,7 +148,7 @@ void BitrateControllerImpl::ResetBitrates(int bitrate_bps,
int max_bitrate_bps) {
{
rtc::CritScope cs(&critsect_);
bandwidth_estimation_ = SendSideBandwidthEstimation();
bandwidth_estimation_ = SendSideBandwidthEstimation(event_log_);
bandwidth_estimation_.SetBitrates(bitrate_bps, min_bitrate_bps,
max_bitrate_bps);
}
@ -158,11 +163,6 @@ void BitrateControllerImpl::SetReservedBitrate(uint32_t reserved_bitrate_bps) {
MaybeTriggerOnNetworkChanged();
}
void BitrateControllerImpl::SetEventLog(RtcEventLog* event_log) {
rtc::CritScope cs(&critsect_);
bandwidth_estimation_.SetEventLog(event_log);
}
void BitrateControllerImpl::OnReceivedEstimatedBitrate(uint32_t bitrate) {
{
rtc::CritScope cs(&critsect_);