| OLD | NEW | 
|   1 /* |   1 /* | 
|   2  *  Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |   2  *  Copyright (c) 2014 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 <stdio.h> |  11 #include <stdio.h> | 
|  12  |  12  | 
|  13 #include <memory> |  13 #include <memory> | 
|  14 #include <sstream> |  14 #include <sstream> | 
|  15  |  15  | 
|  16 #include "webrtc/base/format_macros.h" |  16 #include "webrtc/base/format_macros.h" | 
|  17 #include "webrtc/modules/remote_bitrate_estimator/tools/bwe_rtp.h" |  17 #include "webrtc/modules/remote_bitrate_estimator/tools/bwe_rtp.h" | 
|  18 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" |  18 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" | 
|  19 #include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h" |  19 #include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h" | 
|  20 #include "webrtc/test/rtp_file_reader.h" |  20 #include "webrtc/test/rtp_file_reader.h" | 
|  21  |  21  | 
|  22 int main(int argc, char** argv) { |  22 int main(int argc, char** argv) { | 
|  23   webrtc::test::RtpFileReader* reader; |  23   webrtc::test::RtpFileReader* reader; | 
|  24   webrtc::RtpHeaderParser* parser; |  24   webrtc::RtpHeaderParser* parser; | 
|  25   if (!ParseArgsAndSetupEstimator(argc, argv, NULL, NULL, &reader, &parser, |  25   if (!ParseArgsAndSetupEstimator(argc, argv, nullptr, nullptr, &reader, | 
|  26                                   NULL, NULL)) { |  26                                   &parser, nullptr, nullptr)) { | 
|  27     return -1; |  27     return -1; | 
|  28   } |  28   } | 
|  29   bool arrival_time_only = (argc >= 5 && strncmp(argv[4], "-t", 2) == 0); |  29   bool arrival_time_only = (argc >= 5 && strncmp(argv[4], "-t", 2) == 0); | 
|  30   std::unique_ptr<webrtc::test::RtpFileReader> rtp_reader(reader); |  30   std::unique_ptr<webrtc::test::RtpFileReader> rtp_reader(reader); | 
|  31   std::unique_ptr<webrtc::RtpHeaderParser> rtp_parser(parser); |  31   std::unique_ptr<webrtc::RtpHeaderParser> rtp_parser(parser); | 
|  32   fprintf(stdout, "seqnum timestamp ts_offset abs_sendtime recvtime " |  32   fprintf(stdout, "seqnum timestamp ts_offset abs_sendtime recvtime " | 
|  33           "markerbit ssrc size original_size\n"); |  33           "markerbit ssrc size original_size\n"); | 
|  34   int packet_counter = 0; |  34   int packet_counter = 0; | 
|  35   int non_zero_abs_send_time = 0; |  35   int non_zero_abs_send_time = 0; | 
|  36   int non_zero_ts_offsets = 0; |  36   int non_zero_ts_offsets = 0; | 
| (...skipping 24 matching lines...) Expand all  Loading... | 
|  61     } |  61     } | 
|  62     ++packet_counter; |  62     ++packet_counter; | 
|  63   } |  63   } | 
|  64   fprintf(stderr, "Parsed %d packets\n", packet_counter); |  64   fprintf(stderr, "Parsed %d packets\n", packet_counter); | 
|  65   fprintf(stderr, "Packets with non-zero absolute send time: %d\n", |  65   fprintf(stderr, "Packets with non-zero absolute send time: %d\n", | 
|  66          non_zero_abs_send_time); |  66          non_zero_abs_send_time); | 
|  67   fprintf(stderr, "Packets with non-zero timestamp offset: %d\n", |  67   fprintf(stderr, "Packets with non-zero timestamp offset: %d\n", | 
|  68          non_zero_ts_offsets); |  68          non_zero_ts_offsets); | 
|  69   return 0; |  69   return 0; | 
|  70 } |  70 } | 
| OLD | NEW |