Index: webrtc/voice_engine/channel.cc |
diff --git a/webrtc/voice_engine/channel.cc b/webrtc/voice_engine/channel.cc |
index 9e27ce8b7b7162905a036f6d52a639c96d17bfa0..b661517bd77d3991663c8b22f8fd1caab1b974cc 100644 |
--- a/webrtc/voice_engine/channel.cc |
+++ b/webrtc/voice_engine/channel.cc |
@@ -19,6 +19,7 @@ |
#include "webrtc/base/logging.h" |
#include "webrtc/base/thread_checker.h" |
#include "webrtc/base/timeutils.h" |
+#include "webrtc/call/rtc_event_log.h" |
#include "webrtc/common.h" |
#include "webrtc/config.h" |
#include "webrtc/modules/audio_device/include/audio_device.h" |
@@ -494,10 +495,13 @@ bool Channel::OnRecoveredPacket(const uint8_t* rtp_packet, |
} |
int32_t Channel::GetAudioFrame(int32_t id, AudioFrame* audioFrame) { |
- if (event_log_) { |
- unsigned int ssrc; |
- RTC_CHECK_EQ(GetLocalSSRC(ssrc), 0); |
- event_log_->LogAudioPlayout(ssrc); |
+ { |
+ rtc::CritScope lock(&event_log_lock_); |
+ if (event_log_) { |
+ unsigned int ssrc; |
+ RTC_CHECK_EQ(GetLocalSSRC(ssrc), 0); |
+ { event_log_->LogAudioPlayout(ssrc); } |
the sun
2016/03/03 09:25:13
Remove the { } on this line.
ivoc
2016/03/10 13:15:36
Hmm, not sure what happened there :-)
|
+ } |
} |
// Get 10ms raw PCM data from the ACM (mixer limits output frequency) |
if (audio_coding_->PlayoutData10Ms(audioFrame->sample_rate_hz_, audioFrame) == |
@@ -674,13 +678,12 @@ int32_t Channel::NeededFrequency(int32_t id) const { |
int32_t Channel::CreateChannel(Channel*& channel, |
int32_t channelId, |
uint32_t instanceId, |
- RtcEventLog* const event_log, |
const Config& config) { |
WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(instanceId, channelId), |
"Channel::CreateChannel(channelId=%d, instanceId=%d)", channelId, |
instanceId); |
- channel = new Channel(channelId, instanceId, event_log, config); |
+ channel = new Channel(channelId, instanceId, config); |
if (channel == NULL) { |
WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(instanceId, channelId), |
"Channel::CreateChannel() unable to allocate memory for" |
@@ -737,13 +740,10 @@ void Channel::RecordFileEnded(int32_t id) { |
" shutdown"); |
} |
-Channel::Channel(int32_t channelId, |
- uint32_t instanceId, |
- RtcEventLog* const event_log, |
- const Config& config) |
+Channel::Channel(int32_t channelId, uint32_t instanceId, const Config& config) |
: _instanceId(instanceId), |
_channelId(channelId), |
- event_log_(event_log), |
+ event_log_(nullptr), |
rtp_header_parser_(RtpHeaderParser::Create()), |
rtp_payload_registry_( |
new RTPPayloadRegistry(RTPPayloadStrategy::CreateStrategy(true))), |
@@ -852,7 +852,6 @@ Channel::Channel(int32_t channelId, |
seq_num_allocator_proxy_.get(); |
configuration.transport_feedback_callback = feedback_observer_proxy_.get(); |
} |
- configuration.event_log = event_log; |
_rtpRtcpModule.reset(RtpRtcp::CreateRtpRtcp(configuration)); |