Files
webm/webm2pes_main.cc
Tom Finegan 3cb96b6e33 webm2pes: Move main() and helper functions into their own files.
- main() and Usage() to webm2pes_main.cc
- Other helpers to common/libwebm_utils.{cc,h}

Change-Id: I59e45f0e63449066b493c4e536e0be001372504c
2015-12-17 08:38:13 -08:00

33 lines
900 B
C++

// Copyright (c) 2015 The WebM project authors. All Rights Reserved.
//
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file in the root of the source
// tree. An additional intellectual property rights grant can be found
// in the file PATENTS. All contributing project authors may
// be found in the AUTHORS file in the root of the source tree.
#include "webm2pes.h"
#include <cstdio>
#include <string>
namespace {
void Usage(const char* argv[]) {
printf("Usage: %s <WebM file> <output file>", argv[0]);
}
} // namespace
int main(int argc, const char* argv[]) {
if (argc < 3) {
Usage(argv);
return EXIT_FAILURE;
}
const std::string input_path = argv[1];
const std::string output_path = argv[2];
libwebm::Webm2Pes converter(input_path, output_path);
return converter.Convert() == true ? EXIT_SUCCESS : EXIT_FAILURE;
}