[FFmpeg-devel] codec_names.sh and #ifdefs

Nicolas George nicolas.george at normalesup.org
Sat Oct 22 11:31:15 CEST 2011


Le decadi 30 vendémiaire, an CCXX, Michael Niedermayer a écrit :
> codec_names.sh doesnt work when there are #ifs (for example checking
> ABI version in the enum list)
> 
> Nicolas (or someone else) do you have time to look into this?

I came up with the attached patch. The principle of the change is to call
$(CC) -E avcodec.h from the makefile and pipe it to the script, and it seems
to work: it fixes the error when LIBAVCODEC_VERSION_MAJOR is set to 54. I
could not test it on a wide variety of platforms though.

It has a slight drawback: in the brief output, the generation is written as:
"CC libavcodec/codec_names.h" instead of GEN. I think this is acceptable
(and my opinion is that brief output should be implemented as an option in
make rather than ugly and hackish constructs in makefiles; but I digress).

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-codec_names-invoke-preprocessor-on-avcodec.h.patch
Type: text/x-diff
Size: 1839 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111022/1cb8eced/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111022/1cb8eced/attachment.asc>


More information about the ffmpeg-devel mailing list