Version 4.3.1. Enter from the main function.
Refer to the simple analysis of ffplay.c function structure
parse_loglevel
/**
* Find the '-loglevel' option in the command line args and apply it.
*/
void parse_loglevel(int argc, char **argv, const OptionDef *options);
This is used to set the mode of output information. -loglevel can be abbreviated as -v.
ffplay -v
ffplay -v quiet fpx.gif
ffplay -v info fpx.gif
init_opts
/**
* Initialize the cmdutils option system, in particular
* allocate the *_opts contexts.
*/
void init_opts(void);
Initialize the option system in cmdutils, especially allocating space for *_opts content.
signal
signal(SIGINT , sigterm_handler); /* Interrupt (ANSI). */
signal(SIGTERM, sigterm_handler); /* Termination (ANSI). */
This is a C library function, see the usage
show_banner
/**
* Print the program banner to stderr. The banner contents depend on the
* current version of the repository and of the libav* libraries used by
* the program.
*/
void show_banner(int argc, char **argv, const OptionDef *options);
Print out FFmpeg version information (compile time, compilation options, class library information, etc.).
parse_options
/**
* Parse the command line arguments.
*
* @param optctx an opaque options context
* @param argc number of command line arguments
* @param argv values of command line arguments
* @param options Array with the definitions required to interpret every
* option of the form: -option_name [argument]
* @param parse_arg_function Name of the function called to process every
* argument without a leading option name flag. NULL if such arguments do
* not have to be processed.
*/
void parse_options(void *optctx, int argc, char **argv, const OptionDef *options,
void (* parse_arg_function)(void *optctx, const char*));
Parse the option in the command line