diff mbox series

[FFmpeg-devel,1/4] lavu: Remove libva 1.x support

Message ID 15056f44-06c8-40a1-bb78-db3e66b2ee86@jkqxz.net
State New
Headers show
Series [FFmpeg-devel,1/4] lavu: Remove libva 1.x support | expand

Checks

Context Check Description
andriy/configure_x86 warning Failed to apply patch

Commit Message

Mark Thompson April 3, 2024, 7:44 p.m. UTC
libva 2.0 was released in 2017 and the 2.x versions are included in all
supported distributions nowadays.
---
  libavutil/hwcontext_vaapi.c | 4 ----
  1 file changed, 4 deletions(-)

Comments

Rémi Denis-Courmont April 3, 2024, 8:09 p.m. UTC | #1
Le keskiviikkona 3. huhtikuuta 2024, 22.44.29 EEST Mark Thompson a écrit :
> libva 2.0 was released in 2017 and the 2.x versions are included in all
> supported distributions nowadays.
> ---
>   libavutil/hwcontext_vaapi.c | 4 ----
>   1 file changed, 4 deletions(-)
> 
> diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c
> index 56d03aa4cd..bc82ab31e6 100644
> --- a/libavutil/hwcontext_vaapi.c
> +++ b/libavutil/hwcontext_vaapi.c
> @@ -1637,7 +1637,6 @@ static void vaapi_device_free(AVHWDeviceContext *ctx)
>       av_freep(&priv);
>   }
> 
> -#if CONFIG_VAAPI_1

IMO, it wouldn't hurt to clarify in the change description that CONFIG_VAAPI_1 
actually corresponded to libva 2.x. No objections to the code changes though.
Mark Thompson April 3, 2024, 8:18 p.m. UTC | #2
On 03/04/2024 21:09, Rémi Denis-Courmont wrote:
> Le keskiviikkona 3. huhtikuuta 2024, 22.44.29 EEST Mark Thompson a écrit :
>> libva 2.0 was released in 2017 and the 2.x versions are included in all
>> supported distributions nowadays.
>> ---
>>    libavutil/hwcontext_vaapi.c | 4 ----
>>    1 file changed, 4 deletions(-)
>>
>> diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c
>> index 56d03aa4cd..bc82ab31e6 100644
>> --- a/libavutil/hwcontext_vaapi.c
>> +++ b/libavutil/hwcontext_vaapi.c
>> @@ -1637,7 +1637,6 @@ static void vaapi_device_free(AVHWDeviceContext *ctx)
>>        av_freep(&priv);
>>    }
>>
>> -#if CONFIG_VAAPI_1
> 
> IMO, it wouldn't hurt to clarify in the change description that CONFIG_VAAPI_1
> actually corresponded to libva 2.x. No objections to the code changes though.

Fair, the library major version being the API major version plus one is a slightly bizarre feature.  I've added some words to that effect locally.

Thanks,

- Mark
Michael Niedermayer April 3, 2024, 9:29 p.m. UTC | #3
On Wed, Apr 03, 2024 at 08:44:29PM +0100, Mark Thompson wrote:
> libva 2.0 was released in 2017 and the 2.x versions are included in all
> supported distributions nowadays.

on ubuntu mingw

make
CC	libavdevice/version.o
AR	libavdevice/libavdevice.a
CC	libavfilter/vaapi_vpp.o
In file included from src/libavfilter/vaapi_vpp.c:26:0:
src/libavfilter/vaapi_vpp.h:22:10: fatal error: va/va.h: No such file or directory
 #include <va/va.h>
          ^~~~~~~~~
compilation terminated.
src/ffbuild/common.mak:81: recipe for target 'libavfilter/vaapi_vpp.o' failed
make: *** [libavfilter/vaapi_vpp.o] Error 1

thx

[...]
diff mbox series

Patch

diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c
index 56d03aa4cd..bc82ab31e6 100644
--- a/libavutil/hwcontext_vaapi.c
+++ b/libavutil/hwcontext_vaapi.c
@@ -1637,7 +1637,6 @@  static void vaapi_device_free(AVHWDeviceContext *ctx)
      av_freep(&priv);
  }

-#if CONFIG_VAAPI_1
  static void vaapi_device_log_error(void *context, const char *message)
  {
      AVHWDeviceContext *ctx = context;
@@ -1651,7 +1650,6 @@  static void vaapi_device_log_info(void *context, const char *message)

      av_log(ctx, AV_LOG_VERBOSE, "libva: %s", message);
  }
-#endif

  static int vaapi_device_connect(AVHWDeviceContext *ctx,
                                  VADisplay display)
@@ -1660,10 +1658,8 @@  static int vaapi_device_connect(AVHWDeviceContext *ctx,
      int major, minor;
      VAStatus vas;

-#if CONFIG_VAAPI_1
      vaSetErrorCallback(display, &vaapi_device_log_error, ctx);
      vaSetInfoCallback (display, &vaapi_device_log_info,  ctx);
-#endif

      hwctx->display = display;