| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 std::cerr << "Payload type " << | 361 std::cerr << "Payload type " << |
| 362 static_cast<int>(rtp_header->header.payloadType) << | 362 static_cast<int>(rtp_header->header.payloadType) << |
| 363 " not supported or unknown." << std::endl; | 363 " not supported or unknown." << std::endl; |
| 364 Trace::ReturnTrace(); | 364 Trace::ReturnTrace(); |
| 365 exit(1); | 365 exit(1); |
| 366 } | 366 } |
| 367 } | 367 } |
| 368 return payload_len; | 368 return payload_len; |
| 369 } | 369 } |
| 370 | 370 |
| 371 } // namespace | 371 int RunTest(int argc, char* argv[]) { |
| 372 | |
| 373 int main(int argc, char* argv[]) { | |
| 374 static const int kOutputBlockSizeMs = 10; | 372 static const int kOutputBlockSizeMs = 10; |
| 375 | 373 |
| 376 std::string program_name = argv[0]; | 374 std::string program_name = argv[0]; |
| 377 std::string usage = "Tool for decoding an RTP dump file using NetEq.\n" | 375 std::string usage = "Tool for decoding an RTP dump file using NetEq.\n" |
| 378 "Run " + program_name + " --helpshort for usage.\n" | 376 "Run " + program_name + " --helpshort for usage.\n" |
| 379 "Example usage:\n" + program_name + | 377 "Example usage:\n" + program_name + |
| 380 " input.rtp output.{pcm, wav}\n"; | 378 " input.rtp output.{pcm, wav}\n"; |
| 381 google::SetUsageMessage(usage); | 379 google::SetUsageMessage(usage); |
| 382 google::ParseCommandLineFlags(&argc, &argv, true); | 380 google::ParseCommandLineFlags(&argc, &argv, true); |
| 383 | 381 |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 } | 623 } |
| 626 printf("Simulation done\n"); | 624 printf("Simulation done\n"); |
| 627 printf("Produced %i ms of audio\n", | 625 printf("Produced %i ms of audio\n", |
| 628 static_cast<int>(time_now_ms - start_time_ms)); | 626 static_cast<int>(time_now_ms - start_time_ms)); |
| 629 | 627 |
| 630 delete neteq; | 628 delete neteq; |
| 631 Trace::ReturnTrace(); | 629 Trace::ReturnTrace(); |
| 632 return 0; | 630 return 0; |
| 633 } | 631 } |
| 634 | 632 |
| 633 } // namespace |
| 635 } // namespace test | 634 } // namespace test |
| 636 } // namespace webrtc | 635 } // namespace webrtc |
| 636 |
| 637 int main(int argc, char* argv[]) { |
| 638 webrtc::test::RunTest(argc, argv); |
| 639 } |
| OLD | NEW |