1 // Copyright (c) 2016 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. 8 #include "m2ts/vpxpes2ts.h" 9 10 #include <cstdio> 11 #include <cstdlib> 12 #include <string> 13 14 namespace { 15 Usage(const char * argv[])16void Usage(const char* argv[]) { 17 printf("Usage: %s <WebM file> <output file>", argv[0]); 18 } 19 20 } // namespace 21 main(int argc,const char * argv[])22int main(int argc, const char* argv[]) { 23 if (argc < 3) { 24 Usage(argv); 25 return EXIT_FAILURE; 26 } 27 28 const std::string input_path = argv[1]; 29 const std::string output_path = argv[2]; 30 31 libwebm::VpxPes2Ts converter(input_path, output_path); 32 return converter.ConvertToFile() == true ? EXIT_SUCCESS : EXIT_FAILURE; 33 } 34