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

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

Issue 2353543003: Added logging for audio send/receive stream configs. (Closed)
Patch Set: Another rebase. Created 4 years, 2 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/logging/rtc_event_log/rtc_event_log.h ('k') | webrtc/logging/rtc_event_log/rtc_event_log_parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 00314e619d086d13fa4a20510d47ba0e1f73dcbc..976ff2321c08106dcea319a19c63f50619ebb0af 100644
--- a/webrtc/logging/rtc_event_log/rtc_event_log.cc
+++ b/webrtc/logging/rtc_event_log/rtc_event_log.cc
@@ -62,6 +62,9 @@ class RtcEventLogImpl final : public RtcEventLog {
void LogVideoReceiveStreamConfig(
const VideoReceiveStream::Config& config) override;
void LogVideoSendStreamConfig(const VideoSendStream::Config& config) override;
+ void LogAudioReceiveStreamConfig(
+ const AudioReceiveStream::Config& config) override;
+ void LogAudioSendStreamConfig(const AudioSendStream::Config& config) override;
void LogRtpHeader(PacketDirection direction,
MediaType media_type,
const uint8_t* header,
@@ -292,6 +295,46 @@ void RtcEventLogImpl::LogVideoSendStreamConfig(
StoreEvent(&event);
}
+void RtcEventLogImpl::LogAudioReceiveStreamConfig(
+ const AudioReceiveStream::Config& config) {
+ std::unique_ptr<rtclog::Event> event(new rtclog::Event());
+ event->set_timestamp_us(clock_->TimeInMicroseconds());
+ event->set_type(rtclog::Event::AUDIO_RECEIVER_CONFIG_EVENT);
+
+ rtclog::AudioReceiveConfig* receiver_config =
+ event->mutable_audio_receiver_config();
+ receiver_config->set_remote_ssrc(config.rtp.remote_ssrc);
+ receiver_config->set_local_ssrc(config.rtp.local_ssrc);
+
+ for (const auto& e : config.rtp.extensions) {
+ rtclog::RtpHeaderExtension* extension =
+ receiver_config->add_header_extensions();
+ extension->set_name(e.uri);
+ extension->set_id(e.id);
+ }
+ StoreEvent(&event);
+}
+
+void RtcEventLogImpl::LogAudioSendStreamConfig(
+ const AudioSendStream::Config& config) {
+ std::unique_ptr<rtclog::Event> event(new rtclog::Event());
+ event->set_timestamp_us(clock_->TimeInMicroseconds());
+ event->set_type(rtclog::Event::AUDIO_SENDER_CONFIG_EVENT);
+
+ rtclog::AudioSendConfig* sender_config = event->mutable_audio_sender_config();
+
+ sender_config->set_ssrc(config.rtp.ssrc);
+
+ for (const auto& e : config.rtp.extensions) {
+ rtclog::RtpHeaderExtension* extension =
+ sender_config->add_header_extensions();
+ extension->set_name(e.uri);
+ extension->set_id(e.id);
+ }
+
+ StoreEvent(&event);
+}
+
void RtcEventLogImpl::LogRtpHeader(PacketDirection direction,
MediaType media_type,
const uint8_t* header,
« no previous file with comments | « webrtc/logging/rtc_event_log/rtc_event_log.h ('k') | webrtc/logging/rtc_event_log/rtc_event_log_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698