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

Unified Diff: webrtc/video/rtc_event_log.cc

Issue 1340283002: Added support for logging the SSRC corresponding to AudioPlayout events. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added missing include and changed CHECK_EQ to RTC_CHECK_EQ. Created 5 years, 3 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/video/rtc_event_log.h ('k') | webrtc/video/rtc_event_log.proto » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/rtc_event_log.cc
diff --git a/webrtc/video/rtc_event_log.cc b/webrtc/video/rtc_event_log.cc
index 7086b3ed8f258c9bf7581f311427fe84267c6d12..8e6d1b9f224247f3af9dbdcac38eaa9c861d243d 100644
--- a/webrtc/video/rtc_event_log.cc
+++ b/webrtc/video/rtc_event_log.cc
@@ -50,7 +50,7 @@ class RtcEventLogImpl final : public RtcEventLog {
MediaType media_type,
const uint8_t* packet,
size_t length) override {}
- void LogDebugEvent(DebugEvent event_type) override {}
+ void LogAudioPlayout(uint32_t ssrc) override {}
};
#else // ENABLE_RTC_EVENT_LOG is defined
@@ -72,7 +72,7 @@ class RtcEventLogImpl final : public RtcEventLog {
MediaType media_type,
const uint8_t* packet,
size_t length) override;
- void LogDebugEvent(DebugEvent event_type) override;
+ void LogAudioPlayout(uint32_t ssrc) override;
private:
// Stops logging and clears the stored data and buffers.
@@ -111,20 +111,6 @@ namespace {
// unnamed namespace. The intention is to make the compiler warn if anyone
// adds unhandled new events/modes/etc.
-rtclog::DebugEvent_EventType ConvertDebugEvent(
- RtcEventLog::DebugEvent event_type) {
- switch (event_type) {
- case RtcEventLog::DebugEvent::kLogStart:
- return rtclog::DebugEvent::LOG_START;
- case RtcEventLog::DebugEvent::kLogEnd:
- return rtclog::DebugEvent::LOG_END;
- case RtcEventLog::DebugEvent::kAudioPlayout:
- return rtclog::DebugEvent::AUDIO_PLAYOUT;
- }
- RTC_NOTREACHED();
- return rtclog::DebugEvent::UNKNOWN_EVENT;
-}
-
rtclog::VideoReceiveConfig_RtcpMode ConvertRtcpMode(
newapi::RtcpMode rtcp_mode) {
switch (rtcp_mode) {
@@ -188,7 +174,7 @@ void RtcEventLogImpl::StartLogging(const std::string& file_name,
start_event.set_timestamp_us(start_time_us_);
start_event.set_type(rtclog::Event::DEBUG_EVENT);
auto debug_event = start_event.mutable_debug_event();
- debug_event->set_type(ConvertDebugEvent(DebugEvent::kLogStart));
+ debug_event->set_type(rtclog::DebugEvent_EventType_LOG_START);
StoreToFile(&start_event);
}
@@ -330,14 +316,15 @@ void RtcEventLogImpl::LogRtcpPacket(bool incoming,
HandleEvent(&rtcp_event);
}
-void RtcEventLogImpl::LogDebugEvent(DebugEvent event_type) {
+void RtcEventLogImpl::LogAudioPlayout(uint32_t ssrc) {
rtc::CritScope lock(&crit_);
rtclog::Event event;
const int64_t timestamp = clock_->TimeInMicroseconds();
event.set_timestamp_us(timestamp);
event.set_type(rtclog::Event::DEBUG_EVENT);
auto debug_event = event.mutable_debug_event();
- debug_event->set_type(ConvertDebugEvent(event_type));
+ debug_event->set_type(rtclog::DebugEvent_EventType_AUDIO_PLAYOUT);
+ debug_event->set_local_ssrc(ssrc);
HandleEvent(&event);
}
@@ -350,7 +337,7 @@ void RtcEventLogImpl::StopLoggingLocked() {
event.set_timestamp_us(timestamp);
event.set_type(rtclog::Event::DEBUG_EVENT);
auto debug_event = event.mutable_debug_event();
- debug_event->set_type(ConvertDebugEvent(DebugEvent::kLogEnd));
+ debug_event->set_type(rtclog::DebugEvent_EventType_LOG_END);
// Store the event and close the file
RTC_DCHECK(file_->Open());
StoreToFile(&event);
« no previous file with comments | « webrtc/video/rtc_event_log.h ('k') | webrtc/video/rtc_event_log.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698