diff options
author | wm4 <wm4@nowhere> | 2015-01-02 03:06:06 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-01-02 03:06:06 +0100 |
commit | a2d790b3a464837e3387cd60c056cfde59855015 (patch) | |
tree | b106b8592da3afe98d170d9a0c595677cbf61893 /player/main.c | |
parent | 594114e660a1b7626d8358a2b24fe000166e0ad8 (diff) | |
download | mpv-a2d790b3a464837e3387cd60c056cfde59855015.tar.bz2 mpv-a2d790b3a464837e3387cd60c056cfde59855015.tar.xz |
player: print config.h contents in verbose mode
It was requested that mpv should print what features etc. have been
enabled at compile time. It can print the configure command line, but it
obviously doesn't include autodetected features.
I tried to think of a nicer way than dumping the config.h as text, but
this was still the simplest way.
Diffstat (limited to 'player/main.c')
-rw-r--r-- | player/main.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/player/main.c b/player/main.c index 2454248f7f..37b1bbdf28 100644 --- a/player/main.c +++ b/player/main.c @@ -78,6 +78,10 @@ #include "osdep/macosx_events.h" #endif +#ifndef FULLCONFIG +#define FULLCONFIG "(missing)\n" +#endif + enum exit_reason { EXIT_NONE, EXIT_NORMAL, @@ -119,6 +123,11 @@ void mp_print_version(struct mp_log *log, int always) mpv_version, mpv_builddate); print_libav_versions(log, v); mp_msg(log, v, "\n"); + // Only in verbose mode. + if (!always) { + mp_msg(log, MSGL_V, "Configuration: " CONFIGURATION "\n"); + mp_msg(log, MSGL_V, "config.h:\n%s\n", FULLCONFIG); + } } static void shutdown_clients(struct MPContext *mpctx) @@ -500,6 +509,11 @@ int mpv_main(int argc, char *argv[]) mp_msg_update_msglevels(mpctx->global); + MP_VERBOSE(mpctx, "Command line:"); + for (int i = 0; i < argc; i++) + MP_VERBOSE(mpctx, " '%s'", argv[i]); + MP_VERBOSE(mpctx, "\n"); + mp_print_version(mpctx->log, false); mp_parse_cfgfiles(mpctx); @@ -519,12 +533,6 @@ int mpv_main(int argc, char *argv[]) if (handle_help_options(mpctx)) exit_player(mpctx, EXIT_NONE); - MP_VERBOSE(mpctx, "Configuration: " CONFIGURATION "\n"); - MP_VERBOSE(mpctx, "Command line:"); - for (int i = 0; i < argc; i++) - MP_VERBOSE(mpctx, " '%s'", argv[i]); - MP_VERBOSE(mpctx, "\n"); - if (!mpctx->playlist->first && !opts->player_idle_mode) { mp_print_version(mpctx->log, true); MP_INFO(mpctx, "%s", mp_help_text); |