[FFmpeg-devel] [PATCH] List configurable codecs, (de)muxers, etc.

Panagiotis Issaris takis.issaris
Fri Jul 27 16:07:54 CEST 2007


Hi M?ns,

M?ns Rullg?rd schreef:
> Panagiotis Issaris <takis.issaris at uhasselt.be> writes:
> 
>> Hi,
>>
>> M?ns Rullg?rd wrote:
>>> Aurelien Jacobs <aurel at gnuage.org> writes:
>>>
>>>> Might be simplified using something like:
>>>>   --list-*)
>>>>   NAME=`echo "$opt" | sed......
>>>>   NAME=`toupper $NAME`
>>>>   show_list `eval \$${NAME}_LIST`
>>> My thoughts as well.
>> The attached patch takes Aurelien's suggestion into account.
>>
>> Currently it allows both:
>> --list-encoder
>> and
>> --list-encoders
>>
>> While the --help info shows:
>> --list-encoders
>>
>> As I found that nicer, although possibly a bit less consistent. What's
>> your preference?
>>
>>  configure |   19 +++++++++++++++++++
>>  1 file changed, 19 insertions(+)
>>
>> With friendly regards,
>> Takis
>> Index: configure
>> ===================================================================
>> --- configure	(revision 9104)
>> +++ configure	(working copy)
>> @@ -160,6 +160,13 @@
>>    echo "  --enable-protocol=NAME   enables protocol NAME"
>>    echo "  --disable-protocol=NAME  disables protocol NAME"
>>    echo "  --disable-protocols      disables all protocols"
>> +  echo "  --list-decoders          show all available decoders"
>> +  echo "  --list-encoders          show all available encoders"
>> +  echo "  --list-muxers            show all available muxers"
>> +  echo "  --list-demuxers          show all available demuxers"
>> +  echo "  --list-parsers           show all available parsers"
>> +  echo "  --list-protocols         show all available protocols"
>> +  echo "  --list-bsfs              show all available bitstream filters"
>>    echo
>>    echo "Developer options (useful when working on FFmpeg itself):"
>>    echo "  --enable-gprof           enable profiling with gprof [$gprof]"
>> @@ -922,6 +929,13 @@
>>      exit 1
>>  }
>>  
>> +show_list() {
>> +    for i in $*; do
>> +        echo $i|sed 's/_[^_]*$//'
>> +    done | sort
>> +    exit 0
>> +}
> 
> I agree with Diego's comments on this.

Fixed.

> 
>>  for opt do
>>    optval="${opt#*=}"
>>    case "$opt" in
>> @@ -997,6 +1011,11 @@
>>    echo "$CMDLINE_SELECT" | grep -q "^ *$option\$" || die_unknown $opt
>>    $action $option
>>    ;;
>> +  --list-*)
>> +    NAME=`echo "$opt" | sed 's/--list-//;s/s$//;s/$/_LIST/'`
>> +    NAME=`toupper $NAME`
>> +    show_list `eval echo \\$${NAME}`
> 
> This (untested) looks nicer to me:
> 
> NAME="${opt#--list-}"
> NAME=$(toupper ${NAME%s})
> eval show_list \$${NAME}_LIST

I have no preference in this, so here's modified patch.


 configure |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+)

With friendly regards,
Takis
--
vCard: http://issaris.org/pi.vcf
PGP key: http://issaris.org/pi.key
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pi-20070727T160455-ffmpeg-configure_lists4.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070727/e3409e4a/attachment.asc>



More information about the ffmpeg-devel mailing list