aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2008-02-17 00:00:06 +0000
committerMåns Rullgård <mans@mansr.com>2008-02-17 00:00:06 +0000
commit73ef89807e27e39e400264766296318cb313a285 (patch)
treee31543ea45fd3423f81b3422cec3257b4f404b11 /configure
parent5c319d33348c59761fb80d524e58f50d8aaf4fb7 (diff)
downloadffmpeg-73ef89807e27e39e400264766296318cb313a285.tar.gz
prettify encoder/decoder/muxer/... list extraction
Originally committed as revision 12127 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure25
1 files 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 \