[MPlayer-dev-eng] FFmpeg include header

Ivan Kalvachev ikalvachev at gmail.com
Wed Apr 19 22:52:53 CEST 2006


Here is an early patch, it uses trick similar to what FreeType does to
declare include header paths.
You may have noticed that there are quite many places where #ifdef are
used to include ffmpeg headers from default system location or from
internal mplayer one.
This code duplication could be removed if we #define the path string
and include the define.

The patch I created remove about 27 lines total, please take a look
and test it. At least I was able to compile mplayer with this patch
applied.

I would like to hear your recommendations:

the names of the defines. FF_AVCODEC_H is too similar to the AVCODEC_H
used by avcodec.h itself. I was thinking about FF_AVCODEC_HEADER (too
long but..). Do you have better ideas?

jpeg_enc.c and vf_zrmjpeg.c are unchanged by my patch. They include
quite many internal headers and i think they behave more like parts of
lavc. I'm not going to mess with them ;)

vf_qp - does it really need all these heavy includes. I think we can
remove at least the dsputil one.

After this patch is committed I will make another for avformat and postprocess.

Let's talk about code.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer_define_header_path.patch
Type: text/x-patch
Size: 11430 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20060419/74a93201/attachment.bin>


More information about the MPlayer-dev-eng mailing list