]> git.sesse.net Git - ffmpeg/blob - tools/missing_codec_desc
Merge commit 'dbbaad32e36b9046cd19d6e3329e2ca7ab49b401'
[ffmpeg] / tools / missing_codec_desc
1 #!/bin/sh
2
3 srcdir=${0%/*}/..
4
5 while read -r field equal value; do
6   case "$field $equal" in
7     ".id =")
8       eval "known_${value%,}=1"
9       ;;
10   esac
11 done < $srcdir/libavcodec/codec_desc.c
12
13 known_AV_CODEC_ID_NONE=1
14 known_AV_CODEC_ID_FIRST_AUDIO=1
15 known_AV_CODEC_ID_FIRST_SUBTITLE=1
16 known_AV_CODEC_ID_FIRST_UNKNOWN=1
17 known_AV_CODEC_ID_PROBE=1
18 known_AV_CODEC_ID_MPEG2TS=1
19 known_AV_CODEC_ID_MPEG4SYSTEMS=1
20 known_AV_CODEC_ID_FFMETADATA=1
21
22 in=0
23 while read -r line; do
24   case "$in-$line" in
25     0-"enum AVCodecID"*) in=1;;
26     1-*"};"*)            in=0;;
27     1-*AV_CODEC_ID_*,*)
28       cid="${line%%[, =]*}"
29       eval "known=\$known_$cid"
30       case "$known" in
31         1) ;;
32         *) echo "$cid missing";;
33       esac
34       ;;
35   esac
36 done < $srcdir/libavcodec/avcodec.h