From: <fr...@us...> - 2011-03-19 09:40:36
|
Revision: 4320 http://fuse-emulator.svn.sourceforge.net/fuse-emulator/?rev=4320&view=rev Author: fredm Date: 2011-03-19 09:40:29 +0000 (Sat, 19 Mar 2011) Log Message: ----------- Fix executing fmfconv --help when compiled without FFMPEG and print out ffmpeg details on verbose output (Gergely Szasz).. Modified Paths: -------------- branches/fmfx-2010-09-14/fuse-utils/fmfconv.c branches/fmfx-2010-09-14/fuse-utils/fmfconv_ff.c Modified: branches/fmfx-2010-09-14/fuse-utils/fmfconv.c =================================================================== --- branches/fmfx-2010-09-14/fuse-utils/fmfconv.c 2011-03-15 12:15:22 UTC (rev 4319) +++ branches/fmfx-2010-09-14/fuse-utils/fmfconv.c 2011-03-19 09:40:29 UTC (rev 4320) @@ -85,6 +85,7 @@ DO_EOP, /* end of input(s) */ } do_t; +int help_exit = 0; /* exit after print help */ int verbose = 0; int do_info = 0; /* no output and verbose 2 */ do_t do_now = DO_FILE; @@ -725,6 +726,9 @@ printe( "Cannot open input file '%s'...\n", inp_name ); return ERR_OPEN_INP; } + } else if( out_t == TYPE_FFMPEG ) { /* FFMPEG video and audio if nothing else specified */ + snd_t = TYPE_FFMPEG; + return 0; } else { inp = stdin; inp_name = "(-=stdin=-)"; @@ -1667,9 +1671,7 @@ #endif case 'h': print_help(); -#ifdef USE_FFMPEG - ffmpeg_list = 99; -#endif + help_exit = 1; break; case 'V': break; @@ -1722,8 +1724,8 @@ int err, eop = 0; if( ( err = parse_args( argc, argv ) ) ) return err; + if( help_exit ) return 0; #ifdef USE_FFMPEG - if( ffmpeg_list >= 99 ) return 0; if( ffmpeg_list >= 0 ) { ffmpeg_list_ffmpeg( ffmpeg_list ); return 0; Modified: branches/fmfx-2010-09-14/fuse-utils/fmfconv_ff.c =================================================================== --- branches/fmfx-2010-09-14/fuse-utils/fmfconv_ff.c 2011-03-15 12:15:22 UTC (rev 4319) +++ branches/fmfx-2010-09-14/fuse-utils/fmfconv_ff.c 2011-03-19 09:40:29 UTC (rev 4320) @@ -842,7 +842,7 @@ mime_type ? mime_type:"---", long_name ? long_name:"---" ); } - printf( "-------------------------------------------------------------------------------\n\n" ); + printf( "-------------------------------------------------------------------------------\n" ); } void @@ -889,15 +889,47 @@ /* p2->mime_type ? p2->mime_type : "---", */ p2->long_name ? p2->long_name : "---" ); } - printf( "-------------------------------------------------------------------------------\n\n" ); + printf( "-------------------------------------------------------------------------------\n" ); } void +ffmpeg_print_idents() +{ + if( verbose > 0 ) { + printf( "FFmpeg libraries:\n" ); + printf( " libavcodec: %s\n libavformat: %s\n libavutil: %s\n libswscale: %s\n", +#ifdef LIBAVCODEC_IDENT + LIBAVCODEC_IDENT, +#else + "<unknown>", +#endif +#ifdef LIBAVFORMAT_IDENT + LIBAVFORMAT_IDENT, +#else + "<unknown>", +#endif +#ifdef LIBAVUTIL_IDENT + LIBAVUTIL_IDENT, +#else + "<unknown>", +#endif +#ifdef LIBSWSCALE_IDENT + LIBSWSCALE_IDENT +#else + "<unknown>" +#endif + ); + } +} + +void ffmpeg_list_ffmpeg( int what ) { av_register_all(); if( what == 0 ) show_formats(); if( what == 1 ) show_codecs( 0 ); if( what == 2 ) show_codecs( 1 ); + ffmpeg_print_idents(); + putc('\n', stdout); } #endif /* ifdef USE_FFMPEG */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |