| 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 |
| 11 #include <iostream> | 11 #include <iostream> |
| 12 #include <sstream> | 12 #include <sstream> |
| 13 #include <string> | 13 #include <string> |
| 14 | 14 |
| 15 #include "gflags/gflags.h" | 15 #include "gflags/gflags.h" |
| 16 #include "webrtc/base/checks.h" | 16 #include "webrtc/base/checks.h" |
| 17 #include "webrtc/call/call.h" | 17 #include "webrtc/call/call.h" |
| 18 #include "webrtc/common_types.h" | 18 #include "webrtc/common_types.h" |
| 19 #include "webrtc/logging/rtc_event_log/rtc_event_log_parser.h" | 19 #include "webrtc/logging/rtc_event_log/rtc_event_log_parser.h" |
| 20 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/bye.h" | 20 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/bye.h" |
| 21 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/common_header.h" | 21 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/common_header.h" |
| 22 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/extended_reports.h" | 22 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/extended_reports.h" |
| 23 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/fir.h" | 23 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/fir.h" |
| 24 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/nack.h" | 24 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/nack.h" |
| 25 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/pli.h" | 25 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/pli.h" |
| 26 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/rapid_resync_request.h" | 26 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/rapid_resync_request.h" |
| 27 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/receiver_report.h" | 27 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/receiver_report.h" |
| 28 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/remb.h" | 28 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/remb.h" |
| 29 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/rpsi.h" | |
| 30 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/sdes.h" | 29 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/sdes.h" |
| 31 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/sender_report.h" | 30 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/sender_report.h" |
| 32 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/sli.h" | |
| 33 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbn.h" | 31 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbn.h" |
| 34 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbr.h" | 32 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbr.h" |
| 35 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h" | 33 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h" |
| 36 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" | 34 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" |
| 37 | 35 |
| 38 namespace { | 36 namespace { |
| 39 | 37 |
| 40 DEFINE_bool(noconfig, true, "Excludes stream configurations."); | 38 DEFINE_bool(noconfig, true, "Excludes stream configurations."); |
| 41 DEFINE_bool(noincoming, false, "Excludes incoming packets."); | 39 DEFINE_bool(noincoming, false, "Excludes incoming packets."); |
| 42 DEFINE_bool(nooutgoing, false, "Excludes outgoing packets."); | 40 DEFINE_bool(nooutgoing, false, "Excludes outgoing packets."); |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 webrtc::rtcp::Pli pli; | 257 webrtc::rtcp::Pli pli; |
| 260 if (!pli.Parse(rtcp_block)) | 258 if (!pli.Parse(rtcp_block)) |
| 261 return; | 259 return; |
| 262 if (ExcludePacket(direction, media_type, pli.sender_ssrc())) | 260 if (ExcludePacket(direction, media_type, pli.sender_ssrc())) |
| 263 return; | 261 return; |
| 264 std::cout << log_timestamp << "\t" | 262 std::cout << log_timestamp << "\t" |
| 265 << "RTCP_PLI" << StreamInfo(direction, media_type) | 263 << "RTCP_PLI" << StreamInfo(direction, media_type) |
| 266 << "\tssrc=" << pli.sender_ssrc() << std::endl; | 264 << "\tssrc=" << pli.sender_ssrc() << std::endl; |
| 267 break; | 265 break; |
| 268 } | 266 } |
| 269 case webrtc::rtcp::Sli::kFeedbackMessageType: { | |
| 270 webrtc::rtcp::Sli sli; | |
| 271 if (!sli.Parse(rtcp_block)) | |
| 272 return; | |
| 273 if (ExcludePacket(direction, media_type, sli.sender_ssrc())) | |
| 274 return; | |
| 275 std::cout << log_timestamp << "\t" | |
| 276 << "RTCP_SLI" << StreamInfo(direction, media_type) | |
| 277 << "\tssrc=" << sli.sender_ssrc() << std::endl; | |
| 278 break; | |
| 279 } | |
| 280 case webrtc::rtcp::Rpsi::kFeedbackMessageType: { | |
| 281 webrtc::rtcp::Rpsi rpsi; | |
| 282 if (!rpsi.Parse(rtcp_block)) | |
| 283 return; | |
| 284 if (ExcludePacket(direction, media_type, rpsi.sender_ssrc())) | |
| 285 return; | |
| 286 std::cout << log_timestamp << "\t" | |
| 287 << "RTCP_RPSI" << StreamInfo(direction, media_type) | |
| 288 << "\tssrc=" << rpsi.sender_ssrc() << std::endl; | |
| 289 break; | |
| 290 } | |
| 291 case webrtc::rtcp::Fir::kFeedbackMessageType: { | 267 case webrtc::rtcp::Fir::kFeedbackMessageType: { |
| 292 webrtc::rtcp::Fir fir; | 268 webrtc::rtcp::Fir fir; |
| 293 if (!fir.Parse(rtcp_block)) | 269 if (!fir.Parse(rtcp_block)) |
| 294 return; | 270 return; |
| 295 if (ExcludePacket(direction, media_type, fir.sender_ssrc())) | 271 if (ExcludePacket(direction, media_type, fir.sender_ssrc())) |
| 296 return; | 272 return; |
| 297 std::cout << log_timestamp << "\t" | 273 std::cout << log_timestamp << "\t" |
| 298 << "RTCP_FIR" << StreamInfo(direction, media_type) | 274 << "RTCP_FIR" << StreamInfo(direction, media_type) |
| 299 << "\tssrc=" << fir.sender_ssrc() << std::endl; | 275 << "\tssrc=" << fir.sender_ssrc() << std::endl; |
| 300 break; | 276 break; |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 PrintPsFeedback(rtcp_block, log_timestamp, direction, media_type); | 431 PrintPsFeedback(rtcp_block, log_timestamp, direction, media_type); |
| 456 break; | 432 break; |
| 457 default: | 433 default: |
| 458 break; | 434 break; |
| 459 } | 435 } |
| 460 } | 436 } |
| 461 } | 437 } |
| 462 } | 438 } |
| 463 return 0; | 439 return 0; |
| 464 } | 440 } |
| OLD | NEW |