Versión 4.3.1. Ingrese desde la función principal.
Consulte el análisis simple de la estructura de la función ffplay.c
parse_loglevel
/**
* Find the '-loglevel' option in the command line args and apply it.
*/
void parse_loglevel(int argc, char **argv, const OptionDef *options);
Se utiliza para establecer el modo de información de salida. -loglevel se puede abreviar como -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);
Inicialice el sistema de opciones en cmdutils, especialmente asignando espacio para el contenido * _opts.
señal
signal(SIGINT , sigterm_handler); /* Interrupt (ANSI). */
signal(SIGTERM, sigterm_handler); /* Termination (ANSI). */
Esta es una función de la biblioteca C, consulte el uso
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);
Imprima la información de la versión de FFmpeg (tiempo de compilación, opciones de compilación, información de la biblioteca de clases, 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*));
Analizar la opción en la línea de comando