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

Side by Side Diff: webrtc/logging/rtc_event_log/rtc_event_log2text.cc

Issue 3005483002: Replace remaining gflags usages with rtc_base/flags (Closed)
Patch Set: Rebase Created 3 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 unified diff | Download patch
OLDNEW
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 <string.h>
12
11 #include <iostream> 13 #include <iostream>
12 #include <map> 14 #include <map>
13 #include <sstream> 15 #include <sstream>
14 #include <string> 16 #include <string>
15 #include <utility> // pair 17 #include <utility> // pair
16 18
17 #include "gflags/gflags.h"
18 #include "webrtc/common_types.h" 19 #include "webrtc/common_types.h"
19 #include "webrtc/config.h" 20 #include "webrtc/config.h"
20 #include "webrtc/logging/rtc_event_log/rtc_event_log_parser.h" 21 #include "webrtc/logging/rtc_event_log/rtc_event_log_parser.h"
21 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/bye.h" 22 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/bye.h"
22 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/common_header.h" 23 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/common_header.h"
23 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/extended_reports.h" 24 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/extended_reports.h"
24 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/fir.h" 25 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/fir.h"
25 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/nack.h" 26 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/nack.h"
26 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/pli.h" 27 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/pli.h"
27 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/rapid_resync_request.h" 28 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/rapid_resync_request.h"
28 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/receiver_report.h" 29 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/receiver_report.h"
29 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/remb.h" 30 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/remb.h"
30 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/sdes.h" 31 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/sdes.h"
31 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/sender_report.h" 32 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/sender_report.h"
32 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbn.h" 33 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbn.h"
33 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbr.h" 34 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbr.h"
34 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h" 35 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h"
35 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h" 36 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h"
36 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" 37 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
37 #include "webrtc/rtc_base/checks.h" 38 #include "webrtc/rtc_base/checks.h"
39 #include "webrtc/rtc_base/flags.h"
38 40
39 namespace { 41 namespace {
40 42
41 DEFINE_bool(noconfig, false, "Excludes stream configurations."); 43 DEFINE_bool(noconfig, false, "Excludes stream configurations.");
42 DEFINE_bool(noincoming, false, "Excludes incoming packets."); 44 DEFINE_bool(noincoming, false, "Excludes incoming packets.");
43 DEFINE_bool(nooutgoing, false, "Excludes outgoing packets."); 45 DEFINE_bool(nooutgoing, false, "Excludes outgoing packets.");
44 // TODO(terelius): Note that the media type doesn't work with outgoing packets. 46 // TODO(terelius): Note that the media type doesn't work with outgoing packets.
45 DEFINE_bool(noaudio, false, "Excludes audio packets."); 47 DEFINE_bool(noaudio, false, "Excludes audio packets.");
46 // TODO(terelius): Note that the media type doesn't work with outgoing packets. 48 // TODO(terelius): Note that the media type doesn't work with outgoing packets.
47 DEFINE_bool(novideo, false, "Excludes video packets."); 49 DEFINE_bool(novideo, false, "Excludes video packets.");
48 // TODO(terelius): Note that the media type doesn't work with outgoing packets. 50 // TODO(terelius): Note that the media type doesn't work with outgoing packets.
49 DEFINE_bool(nodata, false, "Excludes data packets."); 51 DEFINE_bool(nodata, false, "Excludes data packets.");
50 DEFINE_bool(nortp, false, "Excludes RTP packets."); 52 DEFINE_bool(nortp, false, "Excludes RTP packets.");
51 DEFINE_bool(nortcp, false, "Excludes RTCP packets."); 53 DEFINE_bool(nortcp, false, "Excludes RTCP packets.");
52 // TODO(terelius): Allow a list of SSRCs. 54 // TODO(terelius): Allow a list of SSRCs.
53 DEFINE_string(ssrc, 55 DEFINE_string(ssrc,
54 "", 56 "",
55 "Print only packets with this SSRC (decimal or hex, the latter " 57 "Print only packets with this SSRC (decimal or hex, the latter "
56 "starting with 0x)."); 58 "starting with 0x).");
59 DEFINE_bool(help, false, "Prints this message.");
57 60
58 using MediaType = webrtc::ParsedRtcEventLog::MediaType; 61 using MediaType = webrtc::ParsedRtcEventLog::MediaType;
59 62
60 static uint32_t filtered_ssrc = 0; 63 static uint32_t filtered_ssrc = 0;
61 64
62 // Parses the input string for a valid SSRC. If a valid SSRC is found, it is 65 // Parses the input string for a valid SSRC. If a valid SSRC is found, it is
63 // written to the static global variable |filtered_ssrc|, and true is returned. 66 // written to the static global variable |filtered_ssrc|, and true is returned.
64 // Otherwise, false is returned. 67 // Otherwise, false is returned.
65 // The empty string must be validated as true, because it is the default value 68 // The empty string must be validated as true, because it is the default value
66 // of the command-line flag. In this case, no value is written to the output 69 // of the command-line flag. In this case, no value is written to the output
67 // variable. 70 // variable.
68 bool ParseSsrc(std::string str) { 71 bool ParseSsrc(std::string str) {
69 // If the input string starts with 0x or 0X it indicates a hexadecimal number. 72 // If the input string starts with 0x or 0X it indicates a hexadecimal number.
70 auto read_mode = std::dec; 73 auto read_mode = std::dec;
71 if (str.size() > 2 && 74 if (str.size() > 2 &&
72 (str.substr(0, 2) == "0x" || str.substr(0, 2) == "0X")) { 75 (str.substr(0, 2) == "0x" || str.substr(0, 2) == "0X")) {
73 read_mode = std::hex; 76 read_mode = std::hex;
74 str = str.substr(2); 77 str = str.substr(2);
75 } 78 }
76 std::stringstream ss(str); 79 std::stringstream ss(str);
77 ss >> read_mode >> filtered_ssrc; 80 ss >> read_mode >> filtered_ssrc;
78 return str.empty() || (!ss.fail() && ss.eof()); 81 return str.empty() || (!ss.fail() && ss.eof());
79 } 82 }
80 83
81 bool ExcludePacket(webrtc::PacketDirection direction, 84 bool ExcludePacket(webrtc::PacketDirection direction,
82 MediaType media_type, 85 MediaType media_type,
83 uint32_t packet_ssrc) { 86 uint32_t packet_ssrc) {
84 if (FLAGS_nooutgoing && direction == webrtc::kOutgoingPacket) 87 if (FLAG_nooutgoing && direction == webrtc::kOutgoingPacket)
85 return true; 88 return true;
86 if (FLAGS_noincoming && direction == webrtc::kIncomingPacket) 89 if (FLAG_noincoming && direction == webrtc::kIncomingPacket)
87 return true; 90 return true;
88 if (FLAGS_noaudio && media_type == MediaType::AUDIO) 91 if (FLAG_noaudio && media_type == MediaType::AUDIO)
89 return true; 92 return true;
90 if (FLAGS_novideo && media_type == MediaType::VIDEO) 93 if (FLAG_novideo && media_type == MediaType::VIDEO)
91 return true; 94 return true;
92 if (FLAGS_nodata && media_type == MediaType::DATA) 95 if (FLAG_nodata && media_type == MediaType::DATA)
93 return true; 96 return true;
94 if (!FLAGS_ssrc.empty() && packet_ssrc != filtered_ssrc) 97 if (strlen(FLAG_ssrc) > 0 && packet_ssrc != filtered_ssrc)
95 return true; 98 return true;
96 return false; 99 return false;
97 } 100 }
98 101
99 const char* StreamInfo(webrtc::PacketDirection direction, 102 const char* StreamInfo(webrtc::PacketDirection direction,
100 MediaType media_type) { 103 MediaType media_type) {
101 if (direction == webrtc::kOutgoingPacket) { 104 if (direction == webrtc::kOutgoingPacket) {
102 if (media_type == MediaType::AUDIO) 105 if (media_type == MediaType::AUDIO)
103 return "(out,audio)"; 106 return "(out,audio)";
104 else if (media_type == MediaType::VIDEO) 107 else if (media_type == MediaType::VIDEO)
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 353
351 // This utility will print basic information about each packet to stdout. 354 // This utility will print basic information about each packet to stdout.
352 // Note that parser will assert if the protobuf event is missing some required 355 // Note that parser will assert if the protobuf event is missing some required
353 // fields and we attempt to access them. We don't handle this at the moment. 356 // fields and we attempt to access them. We don't handle this at the moment.
354 int main(int argc, char* argv[]) { 357 int main(int argc, char* argv[]) {
355 std::string program_name = argv[0]; 358 std::string program_name = argv[0];
356 std::string usage = 359 std::string usage =
357 "Tool for printing packet information from an RtcEventLog as text.\n" 360 "Tool for printing packet information from an RtcEventLog as text.\n"
358 "Run " + 361 "Run " +
359 program_name + 362 program_name +
360 " --helpshort for usage.\n" 363 " --help for usage.\n"
361 "Example usage:\n" + 364 "Example usage:\n" +
362 program_name + " input.rel\n"; 365 program_name + " input.rel\n";
363 google::SetUsageMessage(usage); 366 if (rtc::FlagList::SetFlagsFromCommandLine(&argc, argv, true) ||
364 google::ParseCommandLineFlags(&argc, &argv, true); 367 FLAG_help || argc != 2) {
365 368 std::cout << usage;
366 if (argc != 2) { 369 if (FLAG_help) {
367 std::cout << google::ProgramUsage(); 370 rtc::FlagList::Print(nullptr, false);
368 return 0; 371 return 0;
372 }
373 return 1;
369 } 374 }
370 std::string input_file = argv[1]; 375 std::string input_file = argv[1];
371 376
372 if (!FLAGS_ssrc.empty()) 377 if (strlen(FLAG_ssrc) > 0)
373 RTC_CHECK(ParseSsrc(FLAGS_ssrc)) << "Flag verification has failed."; 378 RTC_CHECK(ParseSsrc(FLAG_ssrc)) << "Flag verification has failed.";
374 379
375 webrtc::RtpHeaderExtensionMap default_map = GetDefaultHeaderExtensionMap(); 380 webrtc::RtpHeaderExtensionMap default_map = GetDefaultHeaderExtensionMap();
376 381
377 webrtc::ParsedRtcEventLog parsed_stream; 382 webrtc::ParsedRtcEventLog parsed_stream;
378 if (!parsed_stream.ParseFile(input_file)) { 383 if (!parsed_stream.ParseFile(input_file)) {
379 std::cerr << "Error while parsing input file: " << input_file << std::endl; 384 std::cerr << "Error while parsing input file: " << input_file << std::endl;
380 return -1; 385 return -1;
381 } 386 }
382 387
383 for (size_t i = 0; i < parsed_stream.GetNumberOfEvents(); i++) { 388 for (size_t i = 0; i < parsed_stream.GetNumberOfEvents(); i++) {
384 if (!FLAGS_noconfig && !FLAGS_novideo && !FLAGS_noincoming && 389 if (!FLAG_noconfig && !FLAG_novideo && !FLAG_noincoming &&
385 parsed_stream.GetEventType(i) == 390 parsed_stream.GetEventType(i) ==
386 webrtc::ParsedRtcEventLog::VIDEO_RECEIVER_CONFIG_EVENT) { 391 webrtc::ParsedRtcEventLog::VIDEO_RECEIVER_CONFIG_EVENT) {
387 webrtc::rtclog::StreamConfig config = 392 webrtc::rtclog::StreamConfig config =
388 parsed_stream.GetVideoReceiveConfig(i); 393 parsed_stream.GetVideoReceiveConfig(i);
389 std::cout << parsed_stream.GetTimestamp(i) << "\tVIDEO_RECV_CONFIG" 394 std::cout << parsed_stream.GetTimestamp(i) << "\tVIDEO_RECV_CONFIG"
390 << "\tssrc=" << config.remote_ssrc 395 << "\tssrc=" << config.remote_ssrc
391 << "\tfeedback_ssrc=" << config.local_ssrc; 396 << "\tfeedback_ssrc=" << config.local_ssrc;
392 std::cout << "\textensions={"; 397 std::cout << "\textensions={";
393 for (const auto& extension : config.rtp_extensions) { 398 for (const auto& extension : config.rtp_extensions) {
394 std::cout << extension.ToString() << ","; 399 std::cout << extension.ToString() << ",";
395 } 400 }
396 std::cout << "}"; 401 std::cout << "}";
397 std::cout << "\tcodecs={"; 402 std::cout << "\tcodecs={";
398 for (const auto& codec : config.codecs) { 403 for (const auto& codec : config.codecs) {
399 std::cout << "{name: " << codec.payload_name 404 std::cout << "{name: " << codec.payload_name
400 << ", payload_type: " << codec.payload_type 405 << ", payload_type: " << codec.payload_type
401 << ", rtx_payload_type: " << codec.rtx_payload_type << "}"; 406 << ", rtx_payload_type: " << codec.rtx_payload_type << "}";
402 } 407 }
403 std::cout << "}" << std::endl; 408 std::cout << "}" << std::endl;
404 } 409 }
405 if (!FLAGS_noconfig && !FLAGS_novideo && !FLAGS_nooutgoing && 410 if (!FLAG_noconfig && !FLAG_novideo && !FLAG_nooutgoing &&
406 parsed_stream.GetEventType(i) == 411 parsed_stream.GetEventType(i) ==
407 webrtc::ParsedRtcEventLog::VIDEO_SENDER_CONFIG_EVENT) { 412 webrtc::ParsedRtcEventLog::VIDEO_SENDER_CONFIG_EVENT) {
408 std::vector<webrtc::rtclog::StreamConfig> configs = 413 std::vector<webrtc::rtclog::StreamConfig> configs =
409 parsed_stream.GetVideoSendConfig(i); 414 parsed_stream.GetVideoSendConfig(i);
410 for (const auto& config : configs) { 415 for (const auto& config : configs) {
411 std::cout << parsed_stream.GetTimestamp(i) << "\tVIDEO_SEND_CONFIG"; 416 std::cout << parsed_stream.GetTimestamp(i) << "\tVIDEO_SEND_CONFIG";
412 std::cout << "\tssrcs=" << config.local_ssrc; 417 std::cout << "\tssrcs=" << config.local_ssrc;
413 std::cout << "\trtx_ssrcs=" << config.rtx_ssrc; 418 std::cout << "\trtx_ssrcs=" << config.rtx_ssrc;
414 std::cout << "\textensions={"; 419 std::cout << "\textensions={";
415 for (const auto& extension : config.rtp_extensions) { 420 for (const auto& extension : config.rtp_extensions) {
416 std::cout << extension.ToString() << ","; 421 std::cout << extension.ToString() << ",";
417 } 422 }
418 std::cout << "}"; 423 std::cout << "}";
419 std::cout << "\tcodecs={"; 424 std::cout << "\tcodecs={";
420 for (const auto& codec : config.codecs) { 425 for (const auto& codec : config.codecs) {
421 std::cout << "{name: " << codec.payload_name 426 std::cout << "{name: " << codec.payload_name
422 << ", payload_type: " << codec.payload_type 427 << ", payload_type: " << codec.payload_type
423 << ", rtx_payload_type: " << codec.rtx_payload_type << "}"; 428 << ", rtx_payload_type: " << codec.rtx_payload_type << "}";
424 } 429 }
425 std::cout << "}" << std::endl; 430 std::cout << "}" << std::endl;
426 } 431 }
427 } 432 }
428 if (!FLAGS_noconfig && !FLAGS_noaudio && !FLAGS_noincoming && 433 if (!FLAG_noconfig && !FLAG_noaudio && !FLAG_noincoming &&
429 parsed_stream.GetEventType(i) == 434 parsed_stream.GetEventType(i) ==
430 webrtc::ParsedRtcEventLog::AUDIO_RECEIVER_CONFIG_EVENT) { 435 webrtc::ParsedRtcEventLog::AUDIO_RECEIVER_CONFIG_EVENT) {
431 webrtc::rtclog::StreamConfig config = 436 webrtc::rtclog::StreamConfig config =
432 parsed_stream.GetAudioReceiveConfig(i); 437 parsed_stream.GetAudioReceiveConfig(i);
433 std::cout << parsed_stream.GetTimestamp(i) << "\tAUDIO_RECV_CONFIG" 438 std::cout << parsed_stream.GetTimestamp(i) << "\tAUDIO_RECV_CONFIG"
434 << "\tssrc=" << config.remote_ssrc 439 << "\tssrc=" << config.remote_ssrc
435 << "\tfeedback_ssrc=" << config.local_ssrc; 440 << "\tfeedback_ssrc=" << config.local_ssrc;
436 std::cout << "\textensions={"; 441 std::cout << "\textensions={";
437 for (const auto& extension : config.rtp_extensions) { 442 for (const auto& extension : config.rtp_extensions) {
438 std::cout << extension.ToString() << ","; 443 std::cout << extension.ToString() << ",";
439 } 444 }
440 std::cout << "}"; 445 std::cout << "}";
441 std::cout << "\tcodecs={"; 446 std::cout << "\tcodecs={";
442 for (const auto& codec : config.codecs) { 447 for (const auto& codec : config.codecs) {
443 std::cout << "{name: " << codec.payload_name 448 std::cout << "{name: " << codec.payload_name
444 << ", payload_type: " << codec.payload_type 449 << ", payload_type: " << codec.payload_type
445 << ", rtx_payload_type: " << codec.rtx_payload_type << "}"; 450 << ", rtx_payload_type: " << codec.rtx_payload_type << "}";
446 } 451 }
447 std::cout << "}" << std::endl; 452 std::cout << "}" << std::endl;
448 } 453 }
449 if (!FLAGS_noconfig && !FLAGS_noaudio && !FLAGS_nooutgoing && 454 if (!FLAG_noconfig && !FLAG_noaudio && !FLAG_nooutgoing &&
450 parsed_stream.GetEventType(i) == 455 parsed_stream.GetEventType(i) ==
451 webrtc::ParsedRtcEventLog::AUDIO_SENDER_CONFIG_EVENT) { 456 webrtc::ParsedRtcEventLog::AUDIO_SENDER_CONFIG_EVENT) {
452 webrtc::rtclog::StreamConfig config = parsed_stream.GetAudioSendConfig(i); 457 webrtc::rtclog::StreamConfig config = parsed_stream.GetAudioSendConfig(i);
453 std::cout << parsed_stream.GetTimestamp(i) << "\tAUDIO_SEND_CONFIG" 458 std::cout << parsed_stream.GetTimestamp(i) << "\tAUDIO_SEND_CONFIG"
454 << "\tssrc=" << config.local_ssrc; 459 << "\tssrc=" << config.local_ssrc;
455 std::cout << "\textensions={"; 460 std::cout << "\textensions={";
456 for (const auto& extension : config.rtp_extensions) { 461 for (const auto& extension : config.rtp_extensions) {
457 std::cout << extension.ToString() << ","; 462 std::cout << extension.ToString() << ",";
458 } 463 }
459 std::cout << "}"; 464 std::cout << "}";
460 std::cout << "\tcodecs={"; 465 std::cout << "\tcodecs={";
461 for (const auto& codec : config.codecs) { 466 for (const auto& codec : config.codecs) {
462 std::cout << "{name: " << codec.payload_name 467 std::cout << "{name: " << codec.payload_name
463 << ", payload_type: " << codec.payload_type 468 << ", payload_type: " << codec.payload_type
464 << ", rtx_payload_type: " << codec.rtx_payload_type << "}"; 469 << ", rtx_payload_type: " << codec.rtx_payload_type << "}";
465 } 470 }
466 std::cout << "}" << std::endl; 471 std::cout << "}" << std::endl;
467 } 472 }
468 if (!FLAGS_nortp && 473 if (!FLAG_nortp &&
469 parsed_stream.GetEventType(i) == webrtc::ParsedRtcEventLog::RTP_EVENT) { 474 parsed_stream.GetEventType(i) == webrtc::ParsedRtcEventLog::RTP_EVENT) {
470 size_t header_length; 475 size_t header_length;
471 size_t total_length; 476 size_t total_length;
472 uint8_t header[IP_PACKET_SIZE]; 477 uint8_t header[IP_PACKET_SIZE];
473 webrtc::PacketDirection direction; 478 webrtc::PacketDirection direction;
474 webrtc::RtpHeaderExtensionMap* extension_map = parsed_stream.GetRtpHeader( 479 webrtc::RtpHeaderExtensionMap* extension_map = parsed_stream.GetRtpHeader(
475 i, &direction, header, &header_length, &total_length); 480 i, &direction, header, &header_length, &total_length);
476 481
477 if (extension_map == nullptr) 482 if (extension_map == nullptr)
478 extension_map = &default_map; 483 extension_map = &default_map;
(...skipping 30 matching lines...) Expand all
509 } 514 }
510 if (parsed_header.extension.hasTransmissionTimeOffset) { 515 if (parsed_header.extension.hasTransmissionTimeOffset) {
511 std::cout << "\tTransmTimeOffset=" 516 std::cout << "\tTransmTimeOffset="
512 << parsed_header.extension.transmissionTimeOffset; 517 << parsed_header.extension.transmissionTimeOffset;
513 } 518 }
514 if (parsed_header.extension.hasAudioLevel) { 519 if (parsed_header.extension.hasAudioLevel) {
515 std::cout << "\tAudioLevel=" << parsed_header.extension.audioLevel; 520 std::cout << "\tAudioLevel=" << parsed_header.extension.audioLevel;
516 } 521 }
517 std::cout << std::endl; 522 std::cout << std::endl;
518 } 523 }
519 if (!FLAGS_nortcp && 524 if (!FLAG_nortcp &&
520 parsed_stream.GetEventType(i) == 525 parsed_stream.GetEventType(i) ==
521 webrtc::ParsedRtcEventLog::RTCP_EVENT) { 526 webrtc::ParsedRtcEventLog::RTCP_EVENT) {
522 size_t length; 527 size_t length;
523 uint8_t packet[IP_PACKET_SIZE]; 528 uint8_t packet[IP_PACKET_SIZE];
524 webrtc::PacketDirection direction; 529 webrtc::PacketDirection direction;
525 parsed_stream.GetRtcpPacket(i, &direction, packet, &length); 530 parsed_stream.GetRtcpPacket(i, &direction, packet, &length);
526 531
527 webrtc::rtcp::CommonHeader rtcp_block; 532 webrtc::rtcp::CommonHeader rtcp_block;
528 const uint8_t* packet_end = packet + length; 533 const uint8_t* packet_end = packet + length;
529 for (const uint8_t* next_block = packet; next_block != packet_end; 534 for (const uint8_t* next_block = packet; next_block != packet_end;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 direction); 567 direction);
563 break; 568 break;
564 default: 569 default:
565 break; 570 break;
566 } 571 }
567 } 572 }
568 } 573 }
569 } 574 }
570 return 0; 575 return 0;
571 } 576 }
OLDNEW
« no previous file with comments | « webrtc/logging/rtc_event_log/rtc_event_log2stats.cc ('k') | webrtc/modules/audio_coding/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698