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

Unified Diff: webrtc/modules/audio_coding/neteq/test/rtp_to_text.cc

Issue 2199803002: Removed target rtp_to_text (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Removed rtp_to_text.cc and its gyp target. Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/audio_coding/neteq/neteq_tests.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_coding/neteq/test/rtp_to_text.cc
diff --git a/webrtc/modules/audio_coding/neteq/test/rtp_to_text.cc b/webrtc/modules/audio_coding/neteq/test/rtp_to_text.cc
deleted file mode 100644
index 572b9d3b70adf528fd1a4ee482ef07491605d085..0000000000000000000000000000000000000000
--- a/webrtc/modules/audio_coding/neteq/test/rtp_to_text.cc
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (c) 2012 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.
- */
-
-/*
- * Parses an rtpdump file and outputs a text table parsable by parseLog.m.
- * The output file will have .txt appended to the specified base name.
- * $ rtp_to_text [-d] <input_rtp_file> <output_base_name>
- *
- * -d RTP headers only
- *
- */
-
-#include "webrtc/system_wrappers/include/data_log.h"
-#include "NETEQTEST_DummyRTPpacket.h"
-#include "NETEQTEST_RTPpacket.h"
-
-#include <stdio.h>
-#include <string.h>
-
-#include <iostream>
-#include <string>
-#include <vector>
-
-/*********************/
-/* Misc. definitions */
-/*********************/
-
-#define FIRSTLINELEN 40
-
-using ::webrtc::DataLog;
-
-int main(int argc, char* argv[])
-{
- int arg_count = 1;
- NETEQTEST_RTPpacket* packet;
-
- if (argc < 3)
- {
- printf("Usage: %s [-d] <input_rtp_file> <output_base_name>\n", argv[0]);
- return -1;
- }
-
- // Parse dummy option
- if (argc >= 3 && strcmp(argv[arg_count], "-d") == 0)
- {
- packet = new NETEQTEST_DummyRTPpacket;
- ++arg_count;
- }
- else
- {
- packet = new NETEQTEST_RTPpacket;
- }
-
- std::string input_filename = argv[arg_count++];
- std::string table_name = argv[arg_count];
-
- std::cout << "Input file: " << input_filename << std::endl;
- std::cout << "Output file: " << table_name << ".txt" << std::endl;
-
- FILE *inFile=fopen(input_filename.c_str(),"rb");
- if (!inFile)
- {
- std::cout << "Cannot open input file " << input_filename << std::endl;
- return -1;
- }
-
- // Set up the DataLog and define the table
- DataLog::CreateLog();
- if (DataLog::AddTable(table_name) < 0)
- {
- std::cout << "Error adding table " << table_name << ".txt" << std::endl;
- return -1;
- }
-
- DataLog::AddColumn(table_name, "seq", 1);
- DataLog::AddColumn(table_name, "ssrc", 1);
- DataLog::AddColumn(table_name, "payload type", 1);
- DataLog::AddColumn(table_name, "length", 1);
- DataLog::AddColumn(table_name, "timestamp", 1);
- DataLog::AddColumn(table_name, "marker bit", 1);
- DataLog::AddColumn(table_name, "arrival", 1);
-
- // read file header
- char firstline[FIRSTLINELEN];
- if (fgets(firstline, FIRSTLINELEN, inFile) == NULL)
- {
- std::cout << "Error reading file " << input_filename << std::endl;
- return -1;
- }
-
- // start_sec + start_usec + source + port + padding
- if (fread(firstline, 4+4+4+2+2, 1, inFile) != 1)
- {
- std::cout << "Error reading file " << input_filename << std::endl;
- return -1;
- }
-
- while (packet->readFromFile(inFile) >= 0)
- {
- // write packet headers to
- DataLog::InsertCell(table_name, "seq", packet->sequenceNumber());
- DataLog::InsertCell(table_name, "ssrc", packet->SSRC());
- DataLog::InsertCell(table_name, "payload type", packet->payloadType());
- DataLog::InsertCell(table_name, "length", packet->dataLen());
- DataLog::InsertCell(table_name, "timestamp", packet->timeStamp());
- DataLog::InsertCell(table_name, "marker bit", packet->markerBit());
- DataLog::InsertCell(table_name, "arrival", packet->time());
- DataLog::NextRow(table_name);
- return -1;
- }
-
- DataLog::ReturnLog();
-
- fclose(inFile);
-
- return 0;
-}
« no previous file with comments | « webrtc/modules/audio_coding/neteq/neteq_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698