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

Unified Diff: webrtc/logging/rtc_event_log/rtc_event_log.cc

Issue 2559953002: Log audio network adapter decisions in event log. (Closed)
Patch Set: Response to comments Created 4 years 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/logging/rtc_event_log/rtc_event_log.cc
diff --git a/webrtc/logging/rtc_event_log/rtc_event_log.cc b/webrtc/logging/rtc_event_log/rtc_event_log.cc
index 976ff2321c08106dcea319a19c63f50619ebb0af..e024d61ac93c6f7e2341c5c66f91eef0289a10cc 100644
--- a/webrtc/logging/rtc_event_log/rtc_event_log.cc
+++ b/webrtc/logging/rtc_event_log/rtc_event_log.cc
@@ -20,6 +20,7 @@
#include "webrtc/base/thread_checker.h"
#include "webrtc/call.h"
#include "webrtc/logging/rtc_event_log/rtc_event_log_helper_thread.h"
+#include "webrtc/modules/audio_coding/audio_network_adaptor/debug_dump_writer.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
#include "webrtc/modules/rtp_rtcp/source/byte_io.h"
#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/app.h"
@@ -77,6 +78,8 @@ class RtcEventLogImpl final : public RtcEventLog {
void LogBwePacketLossEvent(int32_t bitrate,
uint8_t fraction_loss,
int32_t total_packets) override;
+ void LogAudioEncoderConfig(
+ const AudioNetworkAdaptor::EncoderRuntimeConfig& config) override;
private:
void StoreEvent(std::unique_ptr<rtclog::Event>* event);
@@ -437,6 +440,16 @@ void RtcEventLogImpl::LogBwePacketLossEvent(int32_t bitrate,
StoreEvent(&event);
}
+void RtcEventLogImpl::LogAudioEncoderConfig(
+ const AudioNetworkAdaptor::EncoderRuntimeConfig& config) {
+ std::unique_ptr<rtclog::Event> event(new rtclog::Event());
+ event->set_timestamp_us(clock_->TimeInMicroseconds());
+ event->set_type(rtclog::Event::AUDIO_ENCODER_CONFIG_EVENT);
+ DebugDumpWriter::ConvertEncoderConfigToDumpEntry(
+ config, event->mutable_encoder_config());
+ StoreEvent(&event);
+}
+
void RtcEventLogImpl::StoreEvent(std::unique_ptr<rtclog::Event>* event) {
if (!event_queue_.Insert(event)) {
LOG(LS_ERROR) << "WebRTC event log queue full. Dropping event.";

Powered by Google App Engine
This is Rietveld 408576698