• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/sh
2
3srcdir=${0%/*}/..
4
5while read -r field equal value; do
6  case "$field $equal" in
7    ".id =")
8      eval "known_${value%,}=1"
9      ;;
10  esac
11done < $srcdir/libavcodec/codec_desc.c
12
13known_AV_CODEC_ID_NONE=1
14known_AV_CODEC_ID_FIRST_AUDIO=1
15known_AV_CODEC_ID_FIRST_SUBTITLE=1
16known_AV_CODEC_ID_FIRST_UNKNOWN=1
17known_AV_CODEC_ID_PROBE=1
18known_AV_CODEC_ID_MPEG2TS=1
19known_AV_CODEC_ID_MPEG4SYSTEMS=1
20known_AV_CODEC_ID_FFMETADATA=1
21
22in=0
23while 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
36done < $srcdir/libavcodec/avcodec.h
37