Tom Finegan | 3cb96b6 | 2015-12-16 20:54:42 -0800 | [diff] [blame] | 1 | // Copyright (c) 2015 The WebM project authors. All Rights Reserved. |
| 2 | // |
| 3 | // Use of this source code is governed by a BSD-style license |
| 4 | // that can be found in the LICENSE file in the root of the source |
| 5 | // tree. An additional intellectual property rights grant can be found |
| 6 | // in the file PATENTS. All contributing project authors may |
| 7 | // be found in the AUTHORS file in the root of the source tree. |
Tom Finegan | 1f74651 | 2016-03-07 12:32:30 -0800 | [diff] [blame^] | 8 | #include "m2ts/webm2pes.h" |
Tom Finegan | 3cb96b6 | 2015-12-16 20:54:42 -0800 | [diff] [blame] | 9 | |
| 10 | #include <cstdio> |
| 11 | #include <string> |
| 12 | |
| 13 | namespace { |
| 14 | |
| 15 | void Usage(const char* argv[]) { |
| 16 | printf("Usage: %s <WebM file> <output file>", argv[0]); |
| 17 | } |
| 18 | |
| 19 | } // namespace |
| 20 | |
| 21 | int main(int argc, const char* argv[]) { |
| 22 | if (argc < 3) { |
| 23 | Usage(argv); |
| 24 | return EXIT_FAILURE; |
| 25 | } |
| 26 | |
| 27 | const std::string input_path = argv[1]; |
| 28 | const std::string output_path = argv[2]; |
| 29 | |
| 30 | libwebm::Webm2Pes converter(input_path, output_path); |
Tom Finegan | aa3593e | 2015-12-16 15:52:42 -0800 | [diff] [blame] | 31 | return converter.ConvertToFile() == true ? EXIT_SUCCESS : EXIT_FAILURE; |
Tom Finegan | 3cb96b6 | 2015-12-16 20:54:42 -0800 | [diff] [blame] | 32 | } |