aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-09-06 12:53:52 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-09-06 12:53:52 +0000
commit5e61b9ecef276cb4418636986a9e3b2778300749 (patch)
tree242c208d9ec1a2dc6cea7f81342f82d7c4f40776
parent860a40c8a7756a3e63e7f9bb0d9caaf742d26402 (diff)
downloadffmpeg-5e61b9ecef276cb4418636986a9e3b2778300749.tar.gz
a little script to turn the inside of a struct into a AVOption array
Originally committed as revision 4564 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rwxr-xr-xbuild_avopt10
1 files changed, 10 insertions, 0 deletions
diff --git a/build_avopt b/build_avopt
new file mode 100755
index 0000000000..fc5d66d2f8
--- /dev/null
+++ b/build_avopt
@@ -0,0 +1,10 @@
+#!/bin/sh
+sed 's/unsigned//g' |\
+ sed 's/enum//g' |\
+ egrep '^ *(int|float|double|AVRational|char *\*) *[a-zA-Z_0-9]* *;' |\
+ sed 's/^ *\([^ ]*\)[ *]*\([^;]*\);.*$/{"\2", NULL, OFFSET(\2), FF_OPT_TYPE_\U\1, DEFAULT, \1_MIN, \1_MAX},/' |\
+ sed 's/AVRATIONAL_M/INT_M/g'|\
+ sed 's/TYPE_AVRATIONAL/TYPE_RATIONAL/g'|\
+ sed 's/FLOAT_M/FLT_M/g'|\
+ sed 's/FF_OPT_TYPE_CHAR/FF_OPT_TYPE_STRING/g'
+ \ No newline at end of file