diff mbox

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

Message ID 74e8cb14-f6e5-2fda-e590-265c6011f1d5@jkqxz.net
State Accepted
Commit 2ce3a48f30fe3cec7153aa3f18a1012a366aca3a
Headers show

Commit Message

Mark Thompson Nov. 14, 2018, 10:59 p.m. UTC
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(+)

Comments

James Almer Nov. 14, 2018, 11:02 p.m. UTC | #1
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.
Mark Thompson Nov. 14, 2018, 11:24 p.m. UTC | #2
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
diff mbox

Patch

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"