blob: f8145a1024ca02dd90c707878546a7c60d770687 [file] [log] [blame]
Tom Finegan3cb96b62015-12-16 20:54:42 -08001// 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 Finegan1f746512016-03-07 12:32:30 -08008#include "m2ts/webm2pes.h"
Tom Finegan3cb96b62015-12-16 20:54:42 -08009
10#include <cstdio>
11#include <string>
12
13namespace {
14
15void Usage(const char* argv[]) {
16 printf("Usage: %s <WebM file> <output file>", argv[0]);
17}
18
19} // namespace
20
21int 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 Fineganaa3593e2015-12-16 15:52:42 -080031 return converter.ConvertToFile() == true ? EXIT_SUCCESS : EXIT_FAILURE;
Tom Finegan3cb96b62015-12-16 20:54:42 -080032}