Revision 58fe804a

View differences:

cmdutils.c
325 325
}
326 326

  
327 327
#define PRINT_LIB_VERSION(outstream,libname,LIBNAME,indent) \
328
    if (CONFIG_##LIBNAME) { \
328 329
    version= libname##_version(); \
329 330
    fprintf(outstream, "%slib%-10s %2d.%2d.%2d / %2d.%2d.%2d\n", indent? "  " : "", #libname, \
330 331
            LIB##LIBNAME##_VERSION_MAJOR, LIB##LIBNAME##_VERSION_MINOR, LIB##LIBNAME##_VERSION_MICRO, \
331
            version >> 16, version >> 8 & 0xff, version & 0xff);
332
            version >> 16, version >> 8 & 0xff, version & 0xff); \
333
    }
332 334

  
333 335
static void print_all_lib_versions(FILE* outstream, int indent)
334 336
{
......
337 339
    PRINT_LIB_VERSION(outstream, avcodec,  AVCODEC,  indent);
338 340
    PRINT_LIB_VERSION(outstream, avformat, AVFORMAT, indent);
339 341
    PRINT_LIB_VERSION(outstream, avdevice, AVDEVICE, indent);
340
#if CONFIG_AVFILTER
341 342
    PRINT_LIB_VERSION(outstream, avfilter, AVFILTER, indent);
342
#endif
343 343
    PRINT_LIB_VERSION(outstream, swscale,  SWSCALE,  indent);
344
#if CONFIG_POSTPROC
345 344
    PRINT_LIB_VERSION(outstream, postproc, POSTPROC, indent);
346
#endif
347 345
}
348 346

  
349 347
static void maybe_print_config(const char *lib, const char *cfg)
......
359 357
    }
360 358
}
361 359

  
360
#define PRINT_LIB_CONFIG(lib, tag, cfg) do {    \
361
        if (CONFIG_##lib)                       \
362
            maybe_print_config(tag, cfg);       \
363
    } while (0)
364

  
362 365
void show_banner(void)
363 366
{
364 367
    fprintf(stderr, "%s version " FFMPEG_VERSION ", Copyright (c) %d-%d Fabrice Bellard, et al.\n",
......
366 369
    fprintf(stderr, "  built on %s %s with %s %s\n",
367 370
            __DATE__, __TIME__, CC_TYPE, CC_VERSION);
368 371
    fprintf(stderr, "  configuration: " FFMPEG_CONFIGURATION "\n");
369
    maybe_print_config("libavutil",   avutil_configuration());
370
    maybe_print_config("libavcodec",  avcodec_configuration());
371
    maybe_print_config("libavformat", avformat_configuration());
372
    maybe_print_config("libavdevice", avdevice_configuration());
373
#if CONFIG_AVFILTER
374
    maybe_print_config("libavfilter", avfilter_configuration());
375
#endif
376
    maybe_print_config("libswscale",  swscale_configuration());
377
#if CONFIG_POSTPROC
378
    maybe_print_config("libpostproc", postproc_configuration());
379
#endif
372
    PRINT_LIB_CONFIG(AVUTIL,   "libavutil",   avutil_configuration());
373
    PRINT_LIB_CONFIG(AVCODEC,  "libavcodec",  avcodec_configuration());
374
    PRINT_LIB_CONFIG(AVFORMAT, "libavformat", avformat_configuration());
375
    PRINT_LIB_CONFIG(AVDEVICE, "libavdevice", avdevice_configuration());
376
    PRINT_LIB_CONFIG(AVFILTER, "libavfilter", avfilter_configuration());
377
    PRINT_LIB_CONFIG(SWSCALE,  "libswscale",  swscale_configuration());
378
    PRINT_LIB_CONFIG(POSTPROC, "libpostproc", postproc_configuration());
380 379
    print_all_lib_versions(stderr, 1);
381 380
}
382 381

  

Also available in: Unified diff