Index: webrtc/logging/rtc_event_log/rtc_event_log2rtp_dump.cc |
diff --git a/webrtc/logging/rtc_event_log/rtc_event_log2rtp_dump.cc b/webrtc/logging/rtc_event_log/rtc_event_log2rtp_dump.cc |
index 4275e5933ffe5e17af6b7705e0e84da6c13791d3..08a68b76114183ff98289a4d4ce9aa87213bb5f8 100644 |
--- a/webrtc/logging/rtc_event_log/rtc_event_log2rtp_dump.cc |
+++ b/webrtc/logging/rtc_event_log/rtc_event_log2rtp_dump.cc |
@@ -27,20 +27,18 @@ namespace { |
using MediaType = webrtc::ParsedRtcEventLog::MediaType; |
-DEFINE_bool(noaudio, |
- false, |
+DEFINE_bool(audio, |
+ true, |
"Excludes audio packets from the converted RTPdump file."); |
ivoc
2017/09/05 10:59:20
Please update the descriptions.
terelius
2017/09/05 11:26:28
Done.
|
-DEFINE_bool(novideo, |
- false, |
+DEFINE_bool(video, |
+ true, |
"Excludes video packets from the converted RTPdump file."); |
-DEFINE_bool(nodata, |
- false, |
+DEFINE_bool(data, |
+ true, |
"Excludes data packets from the converted RTPdump file."); |
-DEFINE_bool(nortp, |
- false, |
- "Excludes RTP packets from the converted RTPdump file."); |
-DEFINE_bool(nortcp, |
- false, |
+DEFINE_bool(rtp, true, "Excludes RTP packets from the converted RTPdump file."); |
+DEFINE_bool(rtcp, |
+ true, |
"Excludes RTCP packets from the converted RTPdump file."); |
DEFINE_string(ssrc, |
"", |
@@ -122,7 +120,7 @@ int main(int argc, char* argv[]) { |
// some required fields and we attempt to access them. We could consider |
// a softer failure option, but it does not seem useful to generate |
// RTP dumps based on broken event logs. |
- if (!FLAG_nortp && |
+ if (FLAG_rtp && |
parsed_stream.GetEventType(i) == webrtc::ParsedRtcEventLog::RTP_EVENT) { |
webrtc::test::RtpPacket packet; |
webrtc::PacketDirection direction; |
@@ -143,11 +141,11 @@ int main(int argc, char* argv[]) { |
rtp_parser.Parse(&parsed_header); |
MediaType media_type = |
parsed_stream.GetMediaType(parsed_header.ssrc, direction); |
- if (FLAG_noaudio && media_type == MediaType::AUDIO) |
+ if (!FLAG_audio && media_type == MediaType::AUDIO) |
continue; |
- if (FLAG_novideo && media_type == MediaType::VIDEO) |
+ if (!FLAG_video && media_type == MediaType::VIDEO) |
continue; |
- if (FLAG_nodata && media_type == MediaType::DATA) |
+ if (!FLAG_data && media_type == MediaType::DATA) |
continue; |
if (strlen(FLAG_ssrc) > 0) { |
const uint32_t packet_ssrc = |
@@ -160,9 +158,8 @@ int main(int argc, char* argv[]) { |
rtp_writer->WritePacket(&packet); |
rtp_counter++; |
} |
- if (!FLAG_nortcp && |
- parsed_stream.GetEventType(i) == |
- webrtc::ParsedRtcEventLog::RTCP_EVENT) { |
+ if (FLAG_rtcp && parsed_stream.GetEventType(i) == |
+ webrtc::ParsedRtcEventLog::RTCP_EVENT) { |
webrtc::test::RtpPacket packet; |
webrtc::PacketDirection direction; |
parsed_stream.GetRtcpPacket(i, &direction, packet.data, &packet.length); |
@@ -181,11 +178,11 @@ int main(int argc, char* argv[]) { |
const uint32_t packet_ssrc = webrtc::ByteReader<uint32_t>::ReadBigEndian( |
reinterpret_cast<const uint8_t*>(packet.data + 4)); |
MediaType media_type = parsed_stream.GetMediaType(packet_ssrc, direction); |
- if (FLAG_noaudio && media_type == MediaType::AUDIO) |
+ if (!FLAG_audio && media_type == MediaType::AUDIO) |
continue; |
- if (FLAG_novideo && media_type == MediaType::VIDEO) |
+ if (!FLAG_video && media_type == MediaType::VIDEO) |
continue; |
- if (FLAG_nodata && media_type == MediaType::DATA) |
+ if (!FLAG_data && media_type == MediaType::DATA) |
continue; |
if (strlen(FLAG_ssrc) > 0) { |
if (packet_ssrc != ssrc_filter) |