aboutsummaryrefslogtreecommitdiffstats
path: root/tools/missing_codec_desc
blob: 093d02e02eeb8ff45202ee87b8867431a61c90ff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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