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

Side by Side Diff: webrtc/modules/remote_bitrate_estimator/tools/rtp_to_text.cc

Issue 1235433005: Add pcap support to bwe tools. Allow filtering on SSRCs. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: . Created 5 years, 5 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) 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 #include <sstream> 12 #include <sstream>
13 13
14 #include "webrtc/base/format_macros.h" 14 #include "webrtc/base/format_macros.h"
15 #include "webrtc/base/scoped_ptr.h" 15 #include "webrtc/base/scoped_ptr.h"
16 #include "webrtc/modules/remote_bitrate_estimator/tools/bwe_rtp.h" 16 #include "webrtc/modules/remote_bitrate_estimator/tools/bwe_rtp.h"
17 #include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h" 17 #include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
18 #include "webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h" 18 #include "webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h"
19 #include "webrtc/test/rtp_file_reader.h" 19 #include "webrtc/test/rtp_file_reader.h"
20 20
21 int main(int argc, char** argv) { 21 int main(int argc, char** argv) {
22 if (argc < 4) {
23 fprintf(stderr, "Usage: rtp_to_text <extension type> <extension id>"
24 " <input_file.rtp> [-t]\n");
25 fprintf(stderr, "<extension type> can either be:\n"
26 " abs for absolute send time or\n"
27 " tsoffset for timestamp offset.\n"
28 "<extension id> is the id associated with the extension.\n"
29 " -t is an optional flag, if set only packet arrival time will be"
30 " output.\n");
31 return -1;
32 }
33 webrtc::test::RtpFileReader* reader; 22 webrtc::test::RtpFileReader* reader;
34 webrtc::RtpHeaderParser* parser; 23 webrtc::RtpHeaderParser* parser;
35 if (!ParseArgsAndSetupEstimator(argc, argv, NULL, NULL, &reader, &parser, 24 if (!ParseArgsAndSetupEstimator(argc, argv, NULL, NULL, &reader, &parser,
36 NULL, NULL)) { 25 NULL, NULL)) {
37 return -1; 26 return -1;
38 } 27 }
39 bool arrival_time_only = (argc >= 5 && strncmp(argv[4], "-t", 2) == 0); 28 bool arrival_time_only = (argc >= 5 && strncmp(argv[4], "-t", 2) == 0);
40 rtc::scoped_ptr<webrtc::test::RtpFileReader> rtp_reader(reader); 29 rtc::scoped_ptr<webrtc::test::RtpFileReader> rtp_reader(reader);
41 rtc::scoped_ptr<webrtc::RtpHeaderParser> rtp_parser(parser); 30 rtc::scoped_ptr<webrtc::RtpHeaderParser> rtp_parser(parser);
42 fprintf(stdout, "seqnum timestamp ts_offset abs_sendtime recvtime " 31 fprintf(stdout, "seqnum timestamp ts_offset abs_sendtime recvtime "
(...skipping 28 matching lines...) Expand all
71 } 60 }
72 ++packet_counter; 61 ++packet_counter;
73 } 62 }
74 fprintf(stderr, "Parsed %d packets\n", packet_counter); 63 fprintf(stderr, "Parsed %d packets\n", packet_counter);
75 fprintf(stderr, "Packets with non-zero absolute send time: %d\n", 64 fprintf(stderr, "Packets with non-zero absolute send time: %d\n",
76 non_zero_abs_send_time); 65 non_zero_abs_send_time);
77 fprintf(stderr, "Packets with non-zero timestamp offset: %d\n", 66 fprintf(stderr, "Packets with non-zero timestamp offset: %d\n",
78 non_zero_ts_offsets); 67 non_zero_ts_offsets);
79 return 0; 68 return 0;
80 } 69 }
OLDNEW
« no previous file with comments | « webrtc/modules/remote_bitrate_estimator/tools/bwe_rtp_play.cc ('k') | webrtc/test/rtp_file_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698