aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-08-13 00:31:13 +0200
committerNicolas George <nicolas.george@normalesup.org>2012-08-13 10:44:59 +0200
commitf594dafc100e317151d388360f99b5e8b8223fdc (patch)
treea0376166e6b16f13f88f39515752212ac6b6eb30 /tools
parent710600077d8c8ce64c14daa7ea6441f4589e3d55 (diff)
downloadffmpeg-f594dafc100e317151d388360f99b5e8b8223fdc.tar.gz
tools: add a script to find missing codec descriptors.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/missing_codec_desc37
1 files changed, 37 insertions, 0 deletions
diff --git a/tools/missing_codec_desc b/tools/missing_codec_desc
new file mode 100755
index 0000000000..093d02e02e
--- /dev/null
+++ b/tools/missing_codec_desc
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+srcdir=${0%/*}/..
+
+while read -r field equal value; do
+ case "$field $equal" in
+ ".id =")
+ eval "known_${value%,}=1"
+ ;;
+ esac
+done < $srcdir/libavcodec/codec_desc.c
+
+known_AV_CODEC_ID_NONE=1
+known_AV_CODEC_ID_FIRST_AUDIO=1
+known_AV_CODEC_ID_FIRST_SUBTITLE=1
+known_AV_CODEC_ID_FIRST_UNKNOWN=1
+known_AV_CODEC_ID_TTF=1
+known_AV_CODEC_ID_PROBE=1
+known_AV_CODEC_ID_MPEG2TS=1
+known_AV_CODEC_ID_MPEG4SYSTEMS=1
+known_AV_CODEC_ID_FFMETADATA=1
+
+in=0
+while read -r line; do
+ case "$in-$line" in
+ 0-"enum AVCodecID"*) in=1;;
+ 1-*"};"*) in=0;;
+ 1-*AV_CODEC_ID_*,*)
+ cid="${line%%[, =]*}"
+ eval "known=\$known_$cid"
+ case "$known" in
+ 1) ;;
+ *) echo "$cid missing";;
+ esac
+ ;;
+ esac
+done < $srcdir/libavcodec/avcodec.h