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

Unified Diff: webrtc/call/rtc_event_log.cc

Issue 2353543003: Added logging for audio send/receive stream configs. (Closed)
Patch Set: Added code for parsing the audio send/receive configs. Created 4 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
Index: webrtc/call/rtc_event_log.cc
diff --git a/webrtc/call/rtc_event_log.cc b/webrtc/call/rtc_event_log.cc
index c022296730409ca236b25403da9e602698a95cdc..372d0b4ee0ad3d49b796a3cb92ee72a8de763770 100644
--- a/webrtc/call/rtc_event_log.cc
+++ b/webrtc/call/rtc_event_log.cc
@@ -53,6 +53,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,
@@ -285,6 +288,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,

Powered by Google App Engine
This is Rietveld 408576698