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

Unified Diff: webrtc/call/call.cc

Issue 2111813002: Revert of Move RtcEventLog object from inside VoiceEngine to Call. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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 | « webrtc/call.h ('k') | webrtc/call/rtc_event_log.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/call/call.cc
diff --git a/webrtc/call/call.cc b/webrtc/call/call.cc
index cbf9da7494f808fe568bcfdf20218abf5909d1f5..a6a79789418626dd275556f14bd7616d212fd2f6 100644
--- a/webrtc/call/call.cc
+++ b/webrtc/call/call.cc
@@ -35,7 +35,6 @@
#include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
#include "webrtc/modules/rtp_rtcp/source/byte_io.h"
#include "webrtc/modules/utility/include/process_thread.h"
-#include "webrtc/system_wrappers/include/clock.h"
#include "webrtc/system_wrappers/include/cpu_info.h"
#include "webrtc/system_wrappers/include/critical_section_wrapper.h"
#include "webrtc/system_wrappers/include/metrics.h"
@@ -108,13 +107,6 @@
void OnAllocationLimitsChanged(uint32_t min_send_bitrate_bps,
uint32_t max_padding_bitrate_bps) override;
- bool StartEventLog(rtc::PlatformFile log_file,
- int64_t max_size_bytes) override {
- return event_log_->StartLogging(log_file, max_size_bytes);
- }
-
- void StopEventLog() override { event_log_->StopLogging(); }
-
private:
DeliveryStatus DeliverRtcp(MediaType media_type, const uint8_t* packet,
size_t length);
@@ -170,7 +162,7 @@
VideoSendStream::RtpStateMap suspended_video_send_ssrcs_;
- std::unique_ptr<webrtc::RtcEventLog> event_log_;
+ RtcEventLog* event_log_ = nullptr;
// The following members are only accessed (exclusively) from one thread and
// from the destructor, and therefore doesn't need any explicit
@@ -218,7 +210,6 @@
video_network_state_(kNetworkUp),
receive_crit_(RWLockWrapper::CreateRWLock()),
send_crit_(RWLockWrapper::CreateRWLock()),
- event_log_(RtcEventLog::Create(webrtc::Clock::GetRealTimeClock())),
received_video_bytes_(0),
received_audio_bytes_(0),
received_rtcp_bytes_(0),
@@ -230,8 +221,7 @@
min_allocated_send_bitrate_bps_(0),
num_bitrate_updates_(0),
remb_(clock_),
- congestion_controller_(
- new CongestionController(clock_, this, &remb_, event_log_.get())),
+ congestion_controller_(new CongestionController(clock_, this, &remb_)),
video_send_delay_stats_(new SendDelayStats(clock_)) {
RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
RTC_DCHECK_GE(config.bitrate_config.min_bitrate_bps, 0);
@@ -241,6 +231,10 @@
RTC_DCHECK_GE(config.bitrate_config.max_bitrate_bps,
config.bitrate_config.start_bitrate_bps);
}
+ if (config.audio_state.get()) {
+ ScopedVoEInterface<VoECodec> voe_codec(voice_engine());
+ event_log_ = voe_codec->GetEventLog();
+ }
Trace::CreateTrace();
call_stats_->RegisterStatsObserver(congestion_controller_.get());
@@ -249,6 +243,7 @@
config_.bitrate_config.min_bitrate_bps,
config_.bitrate_config.start_bitrate_bps,
config_.bitrate_config.max_bitrate_bps);
+ congestion_controller_->GetBitrateController()->SetEventLog(event_log_);
module_process_thread_->Start();
module_process_thread_->RegisterModule(call_stats_.get());
@@ -376,9 +371,8 @@
const webrtc::AudioReceiveStream::Config& config) {
TRACE_EVENT0("webrtc", "Call::CreateAudioReceiveStream");
RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
- AudioReceiveStream* receive_stream =
- new AudioReceiveStream(congestion_controller_.get(), config,
- config_.audio_state, event_log_.get());
+ AudioReceiveStream* receive_stream = new AudioReceiveStream(
+ congestion_controller_.get(), config, config_.audio_state);
{
WriteLockScoped write_lock(*receive_crit_);
RTC_DCHECK(audio_receive_ssrcs_.find(config.rtp.remote_ssrc) ==
@@ -427,8 +421,8 @@
VideoSendStream* send_stream = new VideoSendStream(
num_cpu_cores_, module_process_thread_.get(), call_stats_.get(),
congestion_controller_.get(), bitrate_allocator_.get(),
- video_send_delay_stats_.get(), &remb_, event_log_.get(), config,
- encoder_config, suspended_video_send_ssrcs_);
+ video_send_delay_stats_.get(), &remb_, event_log_, config, encoder_config,
+ suspended_video_send_ssrcs_);
{
WriteLockScoped write_lock(*send_crit_);
for (uint32_t ssrc : config.rtp.ssrcs) {
@@ -439,7 +433,8 @@
}
send_stream->SignalNetworkState(video_network_state_);
UpdateAggregateNetworkState();
- event_log_->LogVideoSendStreamConfig(config);
+ if (event_log_)
+ event_log_->LogVideoSendStreamConfig(config);
return send_stream;
}
@@ -498,11 +493,13 @@
if (it != config.rtp.rtx.end())
video_receive_ssrcs_[it->second.ssrc] = receive_stream;
video_receive_streams_.insert(receive_stream);
+
ConfigureSync(config.sync_group);
}
receive_stream->SignalNetworkState(video_network_state_);
UpdateAggregateNetworkState();
- event_log_->LogVideoReceiveStreamConfig(config);
+ if (event_log_)
+ event_log_->LogVideoReceiveStreamConfig(config);
return receive_stream;
}
@@ -830,7 +827,7 @@
auto status = it->second->DeliverRtp(packet, length, packet_time)
? DELIVERY_OK
: DELIVERY_PACKET_ERROR;
- if (status == DELIVERY_OK)
+ if (status == DELIVERY_OK && event_log_)
event_log_->LogRtpHeader(kIncomingPacket, media_type, packet, length);
return status;
}
@@ -842,7 +839,7 @@
auto status = it->second->DeliverRtp(packet, length, packet_time)
? DELIVERY_OK
: DELIVERY_PACKET_ERROR;
- if (status == DELIVERY_OK)
+ if (status == DELIVERY_OK && event_log_)
event_log_->LogRtpHeader(kIncomingPacket, media_type, packet, length);
return status;
}
« no previous file with comments | « webrtc/call.h ('k') | webrtc/call/rtc_event_log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698