From f5d7c5891c8d54085edf6108868597af6293e6b0 Mon Sep 17 00:00:00 2001 From: "stefan@webrtc.org" Date: Mon, 7 Oct 2013 08:42:46 +0000 Subject: [PATCH] Revert r4934 "Add a tool for parsing an RTP file and outputting the BWE relevant fields." Revert r4935 "Fix build error in r4934." TBR=henrik.lundin@webrtc.org Review URL: https://webrtc-codereview.appspot.com/2364004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4936 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../remote_bitrate_estimator.gypi | 21 ------ .../tools/rtp_to_text.cc | 65 ------------------- 2 files changed, 86 deletions(-) delete mode 100644 webrtc/modules/remote_bitrate_estimator/tools/rtp_to_text.cc diff --git a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator.gypi b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator.gypi index 9f0261949..f8f7e43dd 100644 --- a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator.gypi +++ b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator.gypi @@ -27,26 +27,5 @@ 'rtp_to_ntp.cc', ], # source }, - { - 'target_name': 'bwe_rtp_to_text', - 'type': 'executable', - 'includes': [ - '../rtp_rtcp/source/rtp_rtcp.gypi', - ], - 'dependencies': [ - '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers', - 'rtp_rtcp', - ], - 'direct_dependent_settings': { - 'include_dirs': [ - 'include', - ], - }, - 'sources': [ - 'tools/rtp_to_text.cc', - '<(webrtc_root)/modules/video_coding/main/test/rtp_file_reader.cc', - '<(webrtc_root)/modules/video_coding/main/test/rtp_file_reader.h', - ], # source - }, ], # targets } diff --git a/webrtc/modules/remote_bitrate_estimator/tools/rtp_to_text.cc b/webrtc/modules/remote_bitrate_estimator/tools/rtp_to_text.cc deleted file mode 100644 index 41f6549a7..000000000 --- a/webrtc/modules/remote_bitrate_estimator/tools/rtp_to_text.cc +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#include - -#include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h" -#include "webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h" -#include "webrtc/modules/video_coding/main/test/rtp_file_reader.h" -#include "webrtc/modules/video_coding/main/test/rtp_player.h" -#include "webrtc/system_wrappers/interface/scoped_ptr.h" - -using namespace webrtc::rtpplayer; - -const uint32_t kMaxPacketSize = 1500; -const int kDefaultTransmissionTimeOffsetExtensionId = 2; - -int main(int argc, char** argv) { - if (argc < 2) { - printf("Usage: rtp_to_text \n"); - return -1; - } - webrtc::scoped_ptr rtp_reader( - CreateRtpFileReader(argv[1])); - if (!rtp_reader.get()) { - printf("Cannot open input file %s\n", argv[1]); - return -1; - } - uint8_t packet_buffer[kMaxPacketSize]; - uint8_t* packet = packet_buffer; - uint32_t packet_length = kMaxPacketSize; - uint32_t time_ms = 0; - FILE* out_file = fopen(argv[2], "wt"); - if (!out_file) { - printf("Cannot open output file %s\n", argv[2]); - return -1; - } - printf("Input file: %s, Output file: %s\n\n", argv[1], argv[2]); - fprintf(out_file, "seqnum timestamp ts_offset abs_sendtime recvtime " - "markerbit ssrc size\n"); - webrtc::scoped_ptr parser( - webrtc::RtpHeaderParser::Create()); - parser->RegisterRtpHeaderExtension( - webrtc::kRtpExtensionTransmissionTimeOffset, - kDefaultTransmissionTimeOffsetExtensionId); - int packet_counter = 0; - while (rtp_reader->NextPacket(packet, &packet_length, &time_ms) == 0) { - webrtc::RTPHeader header; - parser->Parse(packet, packet_length, &header); - fprintf(out_file, "%u %u %d %u %u %d %u %u\n", header.sequenceNumber, - header.timestamp, header.extension.transmissionTimeOffset, - header.extension.absoluteSendTime, time_ms, header.markerBit, - header.ssrc, packet_length); - packet_length = kMaxPacketSize; - ++packet_counter; - } - printf("Parsed %d packets\n", packet_counter); - return 0; -}