| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 int main(int argc, char* argv[]) { | 22 int main(int argc, char* argv[]) { |
| 23 if (argc < 3) { | 23 if (argc < 3) { |
| 24 printf("Concatenates multiple rtpdump files into one.\n"); | 24 printf("Concatenates multiple rtpdump files into one.\n"); |
| 25 printf("Usage: rtpcat in1.rtp int2.rtp [...] out.rtp\n"); | 25 printf("Usage: rtpcat in1.rtp int2.rtp [...] out.rtp\n"); |
| 26 exit(1); | 26 exit(1); |
| 27 } | 27 } |
| 28 | 28 |
| 29 scoped_ptr<RtpFileWriter> output( | 29 scoped_ptr<RtpFileWriter> output( |
| 30 RtpFileWriter::Create(RtpFileWriter::kRtpDump, argv[argc - 1])); | 30 RtpFileWriter::Create(RtpFileWriter::kRtpDump, argv[argc - 1])); |
| 31 CHECK(output.get() != NULL) << "Cannot open output file."; | 31 RTC_CHECK(output.get() != NULL) << "Cannot open output file."; |
| 32 printf("Output RTP file: %s\n", argv[argc - 1]); | 32 printf("Output RTP file: %s\n", argv[argc - 1]); |
| 33 | 33 |
| 34 for (int i = 1; i < argc - 1; i++) { | 34 for (int i = 1; i < argc - 1; i++) { |
| 35 scoped_ptr<RtpFileReader> input( | 35 scoped_ptr<RtpFileReader> input( |
| 36 RtpFileReader::Create(RtpFileReader::kRtpDump, argv[i])); | 36 RtpFileReader::Create(RtpFileReader::kRtpDump, argv[i])); |
| 37 CHECK(input.get() != NULL) << "Cannot open input file " << argv[i]; | 37 RTC_CHECK(input.get() != NULL) << "Cannot open input file " << argv[i]; |
| 38 printf("Input RTP file: %s\n", argv[i]); | 38 printf("Input RTP file: %s\n", argv[i]); |
| 39 | 39 |
| 40 webrtc::test::RtpPacket packet; | 40 webrtc::test::RtpPacket packet; |
| 41 while (input->NextPacket(&packet)) | 41 while (input->NextPacket(&packet)) |
| 42 CHECK(output->WritePacket(&packet)); | 42 RTC_CHECK(output->WritePacket(&packet)); |
| 43 } | 43 } |
| 44 return 0; | 44 return 0; |
| 45 } | 45 } |
| OLD | NEW |