[Ffmpeg-devel] [RFC #3] X11 device demuxer (synced svn 2006-11-28)

Måns Rullgård mru
Tue Nov 28 02:19:02 CET 2006


Diego Biurrun <diego at biurrun.de> writes:

> On Tue, Nov 28, 2006 at 12:57:36AM +0100, Edouard Gomez wrote:
>> 
>> --- a/configure	Mon Nov 27 15:48:16 2006 +0000
>> +++ b/configure	Tue Nov 28 00:56:18 2006 +0100
>> @@ -1644,6 +1644,15 @@ struct v4l2_buffer dummy1;
>>  
>> +# Deal with the x11 frame grabber
>> +enabled gpl || disable x11_grab_device_demuxer
>> +check_header X11/X.h || disable x11_grab_device_demuxer
>> +check_header X11/Xlib.h || disable x11_grab_device_demuxer
>> +check_header X11/Xlibint.h || disable x11_grab_device_demuxer
>> +check_header X11/Xproto.h || disable x11_grab_device_demuxer
>> +check_header X11/extensions/XShm.h || disable x11_grab_device_demuxer
>> +enabled x11_grab_device_demuxer && add_extralibs "-lX11 -lXext"
>
> Please align the ||, build system parts look good otherwise.

Checking for, and #including, X11/Xlib.h and X11/extensions/XShm.h
should be enough.  The others contain stuff that no normal app will
need, or which is only for Xlib internal use and strictly off-limits
to portable apps.

There should also be an explicit check for Xlib presence.

Something like this looks much nicer IMHO:

enabled gpl &&
enabled x11_grab_device_demuxer &&
check_header X11/Xlib.h &&
check_header X11/extensions/XShm.h &&
check_func XOpenDisplay -lX11 &&
check_func XShmCreateImage -lX11 -lXext &&
add_extralibs -lX11 -lXext ||
disable x11_grab_device_demuxer

Even nicer would be to use the check_lib function, but it doesn't work
well when we depend on two libs.  Perhaps that's something to work on...

-- 
M?ns Rullg?rd
mru at inprovide.com




More information about the ffmpeg-devel mailing list