OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... | |
30 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/sdes.h" | 30 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/sdes.h" |
31 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/sender_report.h" | 31 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/sender_report.h" |
32 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/sli.h" | 32 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/sli.h" |
33 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbn.h" | 33 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbn.h" |
34 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbr.h" | 34 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbr.h" |
35 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h" | 35 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h" |
36 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" | 36 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" |
37 | 37 |
38 namespace { | 38 namespace { |
39 | 39 |
40 DEFINE_bool(noconfig, true, "Excludes stream configurations."); | |
40 DEFINE_bool(noincoming, false, "Excludes incoming packets."); | 41 DEFINE_bool(noincoming, false, "Excludes incoming packets."); |
41 DEFINE_bool(nooutgoing, false, "Excludes outgoing packets."); | 42 DEFINE_bool(nooutgoing, false, "Excludes outgoing packets."); |
42 // TODO(terelius): Note that the media type doesn't work with outgoing packets. | 43 // TODO(terelius): Note that the media type doesn't work with outgoing packets. |
43 DEFINE_bool(noaudio, false, "Excludes audio packets."); | 44 DEFINE_bool(noaudio, false, "Excludes audio packets."); |
44 // TODO(terelius): Note that the media type doesn't work with outgoing packets. | 45 // TODO(terelius): Note that the media type doesn't work with outgoing packets. |
45 DEFINE_bool(novideo, false, "Excludes video packets."); | 46 DEFINE_bool(novideo, false, "Excludes video packets."); |
46 // TODO(terelius): Note that the media type doesn't work with outgoing packets. | 47 // TODO(terelius): Note that the media type doesn't work with outgoing packets. |
47 DEFINE_bool(nodata, false, "Excludes data packets."); | 48 DEFINE_bool(nodata, false, "Excludes data packets."); |
48 DEFINE_bool(nortp, false, "Excludes RTP packets."); | 49 DEFINE_bool(nortp, false, "Excludes RTP packets."); |
49 DEFINE_bool(nortcp, false, "Excludes RTCP packets."); | 50 DEFINE_bool(nortcp, false, "Excludes RTCP packets."); |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
342 if (!FLAGS_ssrc.empty()) | 343 if (!FLAGS_ssrc.empty()) |
343 RTC_CHECK(ParseSsrc(FLAGS_ssrc)) << "Flag verification has failed."; | 344 RTC_CHECK(ParseSsrc(FLAGS_ssrc)) << "Flag verification has failed."; |
344 | 345 |
345 webrtc::ParsedRtcEventLog parsed_stream; | 346 webrtc::ParsedRtcEventLog parsed_stream; |
346 if (!parsed_stream.ParseFile(input_file)) { | 347 if (!parsed_stream.ParseFile(input_file)) { |
347 std::cerr << "Error while parsing input file: " << input_file << std::endl; | 348 std::cerr << "Error while parsing input file: " << input_file << std::endl; |
348 return -1; | 349 return -1; |
349 } | 350 } |
350 | 351 |
351 for (size_t i = 0; i < parsed_stream.GetNumberOfEvents(); i++) { | 352 for (size_t i = 0; i < parsed_stream.GetNumberOfEvents(); i++) { |
353 if (!FLAGS_noconfig && !FLAGS_novideo && !FLAGS_noincoming && | |
354 parsed_stream.GetEventType(i) == | |
355 webrtc::ParsedRtcEventLog::VIDEO_RECEIVER_CONFIG_EVENT) { | |
356 webrtc::VideoReceiveStream::Config config(nullptr); | |
357 parsed_stream.GetVideoReceiveConfig(i, &config); | |
358 std::cout << parsed_stream.GetTimestamp(i) << "\tVIDEO_RECV_CONFIG" | |
359 << "\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.
| |
360 << "\tRTCP_SSRC=" << config.rtp.local_ssrc << std::endl; | |
361 } | |
362 if (!FLAGS_noconfig && !FLAGS_novideo && !FLAGS_nooutgoing && | |
363 parsed_stream.GetEventType(i) == | |
364 webrtc::ParsedRtcEventLog::VIDEO_SENDER_CONFIG_EVENT) { | |
365 webrtc::VideoSendStream::Config config(nullptr); | |
366 parsed_stream.GetVideoSendConfig(i, &config); | |
367 std::cout << parsed_stream.GetTimestamp(i) << "\tVIDEO_SEND_CONFIG"; | |
368 std::cout << "\tSSRCs="; | |
369 for (const auto& ssrc : config.rtp.ssrcs) | |
370 std::cout << ssrc << ','; | |
371 std::cout << "\tRTX_SSRCs="; | |
372 for (const auto& ssrc : config.rtp.rtx.ssrcs) | |
373 std::cout << ssrc << ','; | |
374 std::cout << std::endl; | |
375 } | |
376 if (!FLAGS_noconfig && !FLAGS_noaudio && !FLAGS_noincoming && | |
377 parsed_stream.GetEventType(i) == | |
378 webrtc::ParsedRtcEventLog::AUDIO_RECEIVER_CONFIG_EVENT) { | |
379 webrtc::AudioReceiveStream::Config config; | |
380 parsed_stream.GetAudioReceiveConfig(i, &config); | |
381 std::cout << parsed_stream.GetTimestamp(i) << "\tAUDIO_RECV_CONFIG" | |
382 << "\tSSRC=" << config.rtp.remote_ssrc | |
danilchap
2017/02/08 14:30:50
ditto
| |
383 << "\tRTCP_SSRC=" << config.rtp.local_ssrc << std::endl; | |
384 } | |
385 if (!FLAGS_noconfig && !FLAGS_noaudio && !FLAGS_nooutgoing && | |
386 parsed_stream.GetEventType(i) == | |
387 webrtc::ParsedRtcEventLog::AUDIO_SENDER_CONFIG_EVENT) { | |
388 webrtc::AudioSendStream::Config config(nullptr); | |
389 parsed_stream.GetAudioSendConfig(i, &config); | |
390 std::cout << parsed_stream.GetTimestamp(i) << "\tAUDIO_SEND_CONFIG" | |
391 << "\tSSRC=" << config.rtp.ssrc << std::endl; | |
392 } | |
352 if (!FLAGS_nortp && | 393 if (!FLAGS_nortp && |
353 parsed_stream.GetEventType(i) == webrtc::ParsedRtcEventLog::RTP_EVENT) { | 394 parsed_stream.GetEventType(i) == webrtc::ParsedRtcEventLog::RTP_EVENT) { |
354 size_t header_length; | 395 size_t header_length; |
355 size_t total_length; | 396 size_t total_length; |
356 uint8_t header[IP_PACKET_SIZE]; | 397 uint8_t header[IP_PACKET_SIZE]; |
357 webrtc::PacketDirection direction; | 398 webrtc::PacketDirection direction; |
358 webrtc::MediaType media_type; | 399 webrtc::MediaType media_type; |
359 parsed_stream.GetRtpHeader(i, &direction, &media_type, header, | 400 parsed_stream.GetRtpHeader(i, &direction, &media_type, header, |
360 &header_length, &total_length); | 401 &header_length, &total_length); |
361 | 402 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
416 PrintPsFeedback(rtcp_block, log_timestamp, direction, media_type); | 457 PrintPsFeedback(rtcp_block, log_timestamp, direction, media_type); |
417 break; | 458 break; |
418 default: | 459 default: |
419 break; | 460 break; |
420 } | 461 } |
421 } | 462 } |
422 } | 463 } |
423 } | 464 } |
424 return 0; | 465 return 0; |
425 } | 466 } |
OLD | NEW |