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

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

Issue 2686823002: Add option to print information about configured SSRCs from RTC event logs. (Closed)
Patch Set: Created 3 years, 10 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/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/logging/rtc_event_log/rtc_event_log2text.cc
diff --git a/webrtc/logging/rtc_event_log/rtc_event_log2text.cc b/webrtc/logging/rtc_event_log/rtc_event_log2text.cc
index 32d5ae5f7a4dfa1827ae70f96b6d9dbbf9943710..944746a14fd3c035c5a2c17180dc559c9b0173f1 100644
--- a/webrtc/logging/rtc_event_log/rtc_event_log2text.cc
+++ b/webrtc/logging/rtc_event_log/rtc_event_log2text.cc
@@ -37,6 +37,7 @@
namespace {
+DEFINE_bool(noconfig, true, "Excludes stream configurations.");
DEFINE_bool(noincoming, false, "Excludes incoming packets.");
DEFINE_bool(nooutgoing, false, "Excludes outgoing packets.");
// TODO(terelius): Note that the media type doesn't work with outgoing packets.
@@ -349,6 +350,46 @@ int main(int argc, char* argv[]) {
}
for (size_t i = 0; i < parsed_stream.GetNumberOfEvents(); i++) {
+ if (!FLAGS_noconfig && !FLAGS_novideo && !FLAGS_noincoming &&
+ parsed_stream.GetEventType(i) ==
+ webrtc::ParsedRtcEventLog::VIDEO_RECEIVER_CONFIG_EVENT) {
+ webrtc::VideoReceiveStream::Config config(nullptr);
+ parsed_stream.GetVideoReceiveConfig(i, &config);
+ std::cout << parsed_stream.GetTimestamp(i) << "\tVIDEO_RECV_CONFIG"
+ << "\tSSRC=" << config.rtp.remote_ssrc
danilchap 2017/02/08 14:30:50 may be label them remote/local rather than ssrc/rt
terelius 2017/02/08 14:41:05 Do you find local/remote to be more clear? The loc
danilchap 2017/02/08 14:44:44 Is it? as I understand rtp sender care about local
terelius 2017/02/08 14:49:11 I agree, but since this is a receive stream there
danilchap 2017/02/08 15:41:45 Right, I'm still not sure about 'rtcp' label - it
terelius 2017/02/08 15:55:42 I'm fine with any label. Do you prefer "ssrc"/"fee
danilchap 2017/02/08 16:00:41 Yes, I think ssrc/feedback_ssrc is better.
+ << "\tRTCP_SSRC=" << config.rtp.local_ssrc << std::endl;
+ }
+ if (!FLAGS_noconfig && !FLAGS_novideo && !FLAGS_nooutgoing &&
+ parsed_stream.GetEventType(i) ==
+ webrtc::ParsedRtcEventLog::VIDEO_SENDER_CONFIG_EVENT) {
+ webrtc::VideoSendStream::Config config(nullptr);
+ parsed_stream.GetVideoSendConfig(i, &config);
+ std::cout << parsed_stream.GetTimestamp(i) << "\tVIDEO_SEND_CONFIG";
+ std::cout << "\tSSRCs=";
+ for (const auto& ssrc : config.rtp.ssrcs)
+ std::cout << ssrc << ',';
+ std::cout << "\tRTX_SSRCs=";
+ for (const auto& ssrc : config.rtp.rtx.ssrcs)
+ std::cout << ssrc << ',';
+ std::cout << std::endl;
+ }
+ if (!FLAGS_noconfig && !FLAGS_noaudio && !FLAGS_noincoming &&
+ parsed_stream.GetEventType(i) ==
+ webrtc::ParsedRtcEventLog::AUDIO_RECEIVER_CONFIG_EVENT) {
+ webrtc::AudioReceiveStream::Config config;
+ parsed_stream.GetAudioReceiveConfig(i, &config);
+ std::cout << parsed_stream.GetTimestamp(i) << "\tAUDIO_RECV_CONFIG"
+ << "\tSSRC=" << config.rtp.remote_ssrc
danilchap 2017/02/08 14:30:50 ditto
+ << "\tRTCP_SSRC=" << config.rtp.local_ssrc << std::endl;
+ }
+ if (!FLAGS_noconfig && !FLAGS_noaudio && !FLAGS_nooutgoing &&
+ parsed_stream.GetEventType(i) ==
+ webrtc::ParsedRtcEventLog::AUDIO_SENDER_CONFIG_EVENT) {
+ webrtc::AudioSendStream::Config config(nullptr);
+ parsed_stream.GetAudioSendConfig(i, &config);
+ std::cout << parsed_stream.GetTimestamp(i) << "\tAUDIO_SEND_CONFIG"
+ << "\tSSRC=" << config.rtp.ssrc << std::endl;
+ }
if (!FLAGS_nortp &&
parsed_stream.GetEventType(i) == webrtc::ParsedRtcEventLog::RTP_EVENT) {
size_t header_length;
« no previous file with comments | « webrtc/logging/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698