[FFmpeg-devel] [PATCH] configure: Add missing xlib dependency for VAAPI X11 code

Mark Thompson sw at jkqxz.net
Thu Nov 15 01:24:26 EET 2018


On 14/11/18 23:02, James Almer wrote:
> On 11/14/2018 7:59 PM, Mark Thompson wrote:
>> Fixes #7538.
>> ---
>> $ ../configure --disable-vdpau --enable-vaapi
>> ...
>> $ rm libavutil/libavutil.pc ; make libavutil/libavutil.pc ; cat libavutil/libavutil.pc
>> ...
>>
>> Before:
>> Libs: -L${libdir}  -lavutil -pthread -L/usr/local/lib -lva-drm -lva -L/usr/local/lib -lva-x11 -lva -lm -L/usr/local/lib -lva
>>
>> After:
>> Libs: -L${libdir}  -lavutil -pthread -L/usr/local/lib -lva-drm -lva -L/usr/local/lib -lva-x11 -lva -lm -L/usr/local/lib -lva -lXv -lX11 -lXext
>>
>>
>>  configure | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/configure b/configure
>> index b02b4ccb2e..9bc4cf330d 100755
>> --- a/configure
>> +++ b/configure
>> @@ -2815,6 +2815,7 @@ d3d11va_deps="dxva_h ID3D11VideoDecoder ID3D11VideoContext"
>>  dxva2_deps="dxva2api_h DXVA2_ConfigPictureDecode ole32 user32"
>>  ffnvcodec_deps_any="libdl LoadLibrary"
>>  nvdec_deps="ffnvcodec"
>> +vaapi_x11_deps="xlib"
>>  videotoolbox_hwaccel_deps="videotoolbox pthreads"
>>  videotoolbox_hwaccel_extralibs="-framework QuartzCore"
>>  xvmc_deps="X11_extensions_XvMClib_h"
>>
> 
> LGTM.
> 
> Opening a ticket in libva's repo so they fix their pkg-config files may
> be worth it as well.

I'm not sure there is anything which can usefully be fixed in libva:
* The shared libraries themselves have the right internal linking (DT_NEEDED), so they don't need anything extra at link time.
* Static linking libva isn't really supported at all - libva depends on dynamic linking, including being able to find its own symbols backwards from a dynamically-loaded driver binary.  (It's probably possible by some method involving --export-dynamic, though I haven't tried.)

Anyway, applied.  I'll backport to 4.1 as well, since that was where the original report came from.

Thanks,

- Mark


More information about the ffmpeg-devel mailing list