From 73ef89807e27e39e400264766296318cb313a285 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5ns=20Rullg=C3=A5rd?= Date: Sun, 17 Feb 2008 00:00:06 +0000 Subject: [PATCH] prettify encoder/decoder/muxer/... list extraction Originally committed as revision 12127 to svn://svn.ffmpeg.org/ffmpeg/trunk --- configure | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/configure b/configure index d83a24a4bb..b2e9e1e522 100755 --- a/configure +++ b/configure @@ -949,15 +949,22 @@ fi FFMPEG_CONFIGURATION="$@" -ENCODER_LIST=`sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' "$source_path/libavcodec/allcodecs.c"` -DECODER_LIST=`sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' "$source_path/libavcodec/allcodecs.c"` -PARSER_LIST=`sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' "$source_path/libavcodec/allcodecs.c"` -BSF_LIST=`sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' "$source_path/libavcodec/allcodecs.c"` -MUXER_LIST=`sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' "$source_path/libavformat/allformats.c"` -DEMUXER_LIST=`sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' "$source_path/libavformat/allformats.c"` -OUTDEV_LIST=`sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' "$source_path/libavdevice/alldevices.c"` -INDEV_LIST=`sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' "$source_path/libavdevice/alldevices.c"` -PROTOCOL_LIST=`sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' "$source_path/libavformat/allformats.c"` +find_things(){ + thing=$1 + pattern=$2 + file=$source_path/$3 + sed -n "s/^[^#]*$pattern.*(.*, *\\(.*\\)).*/\\1_$thing/p" "$file" +} + +ENCODER_LIST=$(find_things encoder ENC libavcodec/allcodecs.c) +DECODER_LIST=$(find_things decoder DEC libavcodec/allcodecs.c) +PARSER_LIST=$(find_things parser PARSER libavcodec/allcodecs.c) +BSF_LIST=$(find_things bsf BSF libavcodec/allcodecs.c) +MUXER_LIST=$(find_things muxer _MUX libavformat/allformats.c) +DEMUXER_LIST=$(find_things demuxer DEMUX libavformat/allformats.c) +OUTDEV_LIST=$(find_things muxer _MUX libavdevice/alldevices.c) +INDEV_LIST=$(find_things demuxer DEMUX libavdevice/alldevices.c) +PROTOCOL_LIST=$(find_things protocol PROTOCOL libavformat/allformats.c) enable $ARCH_EXT_LIST \ $DECODER_LIST \