66#include <stdio.h>
77#include <stdlib.h>
88#include <string.h>
9-
9+ #include "EbApiVersion.h"
1010#include "EbAppConfig.h"
1111
1212#ifdef _WIN32
1717/**********************************
1818 * Defines
1919 **********************************/
20- #define HELP_TOKEN "-help"
20+ #define HELP_TOKEN "--help"
21+ #define VERSION_TOKEN "--version"
2122#define CHANNEL_NUMBER_TOKEN "-nch"
2223#define COMMAND_LINE_MAX_SIZE 2048
2324#define CONFIG_FILE_TOKEN "-c"
@@ -739,25 +740,29 @@ uint32_t get_help(int argc, char *const argv[])
739740 char config_string [COMMAND_LINE_MAX_SIZE ];
740741 if (find_token (argc , argv , HELP_TOKEN , config_string ) == 0 ) {
741742 int token_index = -1 ;
742-
743743 printf ("\n%-25s\t%-25s\t%-25s\t\n\n" ,"TOKEN" , "DESCRIPTION" , "INPUT TYPE" );
744744 printf ("%-25s\t%-25s\t%-25s\t\n" ,"-nch" , "NumberOfChannels" , "Single input" );
745745 while (config_entry [++ token_index ].token != NULL ) {
746-
747746 printf ("%-25s\t%-25s\t%-25s\t\n" , config_entry [token_index ].token , config_entry [token_index ].name , config_entry [token_index ].type ? "Array input" : "Single input" );
748-
749747 }
750748 return 1 ;
751749
752750 }
753- else {
754- return 0 ;
755- }
756-
757-
758-
751+ return 0 ;
759752}
760753
754+ uint32_t get_svt_version (int argc , char * const argv [])
755+ {
756+ char config_string [COMMAND_LINE_MAX_SIZE ];
757+ if (find_token (argc , argv , VERSION_TOKEN , config_string ) == 0 ) {
758+ printf ("SVT-VP9 version %d.%d.%d\n" , SVT_VERSION_MAJOR , SVT_VERSION_MINOR , SVT_VERSION_PATCHLEVEL );
759+ printf ("Copyright(c) 2018 Intel Corporation\n" );
760+ printf ("BSD-2-Clause Plus Patent License\n" );
761+ printf ("https://github.com/OpenVisualCloud/SVT-VP9\n" );
762+ return 1 ;
763+ }
764+ return 0 ;
765+ }
761766
762767/******************************************************
763768* Get the number of channels and validate it with input
@@ -952,4 +957,4 @@ EbErrorType read_command_line(
952957 }
953958
954959 return return_error ;
955- }
960+ }
0 commit comments