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

Unified Diff: webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc

Issue 1267683002: Hooked up RtcEventLog. It lives in Voice Engine and pointers are propagated to ACM and Call. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed Henrik's review comments. Created 5 years, 4 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
Index: webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc
diff --git a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc
index 9c3183271b75bcbdaca46d20cd915d8ecee05323..6b5552e95dd5dead7f1c7b8a85c1482d59277cff 100644
--- a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc
+++ b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc
@@ -27,6 +27,7 @@
#include "webrtc/system_wrappers/interface/rw_lock_wrapper.h"
#include "webrtc/system_wrappers/interface/trace.h"
#include "webrtc/typedefs.h"
+#include "webrtc/video/rtc_event_log.h"
namespace webrtc {
@@ -145,7 +146,9 @@ AudioCodingModuleImpl::AudioCodingModuleImpl(
first_frame_(true),
callback_crit_sect_(CriticalSectionWrapper::CreateCriticalSection()),
packetization_callback_(NULL),
- vad_callback_(NULL) {
+ vad_callback_(NULL),
+ event_log_crit_sect_(CriticalSectionWrapper::CreateCriticalSection()),
+ event_log_(nullptr) {
if (InitializeReceiverSafe() < 0) {
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, id_,
"Cannot initialize receiver");
@@ -736,6 +739,11 @@ int AudioCodingModuleImpl::PlayoutData10Ms(int desired_freq_hz,
"PlayoutData failed, RecOut Failed");
return -1;
}
+ {
+ CriticalSectionScoped lock(event_log_crit_sect_);
+ if (event_log_)
+ event_log_->LogDebugEvent(RtcEventLog::DebugEvent::kAudioPlayout);
+ }
audio_frame->id_ = id_;
return 0;
@@ -971,6 +979,11 @@ void AudioCodingModuleImpl::DisableNack() {
receiver_.DisableNack();
}
+void AudioCodingModuleImpl::SetEventLog(RtcEventLog* event_log) {
+ CriticalSectionScoped lock(event_log_crit_sect_);
+ event_log_ = event_log;
+}
+
std::vector<uint16_t> AudioCodingModuleImpl::GetNackList(
int64_t round_trip_time_ms) const {
return receiver_.GetNackList(round_trip_time_ms);

Powered by Google App Engine
This is Rietveld 408576698