diff mbox series

[FFmpeg-devel,2/2] hwcontext_vulkan: fix make checkheaders fail

Message ID 1590844596-1577-2-git-send-email-mypopydev@gmail.com
State Superseded
Headers show
Series [FFmpeg-devel,1/2] checkasm: sw_rgb: Fix mixed declaration and code | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Jun Zhao May 30, 2020, 1:16 p.m. UTC
From: Jun Zhao <barryjzhao@tencent.com>

make checkheaders will get error as follow:
CC	libavutil/hwcontext_vulkan.h.o
In file included from libavutil/hwcontext_vulkan.h.c:1:
./libavutil/hwcontext_vulkan.h:130:23: error: ‘AV_NUM_DATA_POINTERS’ undeclared here (not in a function)
  130 |     void *alloc_pnext[AV_NUM_DATA_POINTERS];
      |                       ^~~~~~~~~~~~~~~~~~~~
./libavutil/hwcontext_vulkan.h:199:43: warning: ‘enum AVPixelFormat’ declared inside parameter list will not be visible outside of this definition or declaration

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
---
 libavutil/hwcontext_vulkan.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Lynne May 30, 2020, 2:17 p.m. UTC | #1
May 30, 2020, 14:16 by mypopydev@gmail.com:

> From: Jun Zhao <barryjzhao@tencent.com>
>
> make checkheaders will get error as follow:
> CC	libavutil/hwcontext_vulkan.h.o
> In file included from libavutil/hwcontext_vulkan.h.c:1:
> ./libavutil/hwcontext_vulkan.h:130:23: error: ‘AV_NUM_DATA_POINTERS’ undeclared here (not in a function)
>  130 |     void *alloc_pnext[AV_NUM_DATA_POINTERS];
>  |                       ^~~~~~~~~~~~~~~~~~~~
> ./libavutil/hwcontext_vulkan.h:199:43: warning: ‘enum AVPixelFormat’ declared inside parameter list will not be visible outside of this definition or declaration
>
> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
> ---
>  libavutil/hwcontext_vulkan.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/libavutil/hwcontext_vulkan.h b/libavutil/hwcontext_vulkan.h
> index aba9833..0f6a51f 100644
> --- a/libavutil/hwcontext_vulkan.h
> +++ b/libavutil/hwcontext_vulkan.h
> @@ -21,6 +21,8 @@
>  
>  #include <vulkan/vulkan.h>
>  
> +#include "libavutil/frame.h"
> +
>  /**
>  * @file
>  * API-specific header for AV_HWDEVICE_TYPE_VULKAN.
> -- 
> 2.7.4
>

LGTM, tnx.
James Almer May 30, 2020, 2:19 p.m. UTC | #2
On 5/30/2020 10:16 AM, Jun Zhao wrote:
> From: Jun Zhao <barryjzhao@tencent.com>
> 
> make checkheaders will get error as follow:
> CC	libavutil/hwcontext_vulkan.h.o
> In file included from libavutil/hwcontext_vulkan.h.c:1:
> ./libavutil/hwcontext_vulkan.h:130:23: error: ‘AV_NUM_DATA_POINTERS’ undeclared here (not in a function)
>   130 |     void *alloc_pnext[AV_NUM_DATA_POINTERS];
>       |                       ^~~~~~~~~~~~~~~~~~~~
> ./libavutil/hwcontext_vulkan.h:199:43: warning: ‘enum AVPixelFormat’ declared inside parameter list will not be visible outside of this definition or declaration
> 
> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
> ---
>  libavutil/hwcontext_vulkan.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/libavutil/hwcontext_vulkan.h b/libavutil/hwcontext_vulkan.h
> index aba9833..0f6a51f 100644
> --- a/libavutil/hwcontext_vulkan.h
> +++ b/libavutil/hwcontext_vulkan.h
> @@ -21,6 +21,8 @@
>  
>  #include <vulkan/vulkan.h>
>  
> +#include "libavutil/frame.h"

#include "frame.h"

This file is already inside libavutil.

> +
>  /**
>   * @file
>   * API-specific header for AV_HWDEVICE_TYPE_VULKAN.
>
James Almer May 30, 2020, 2:23 p.m. UTC | #3
On 5/30/2020 11:19 AM, James Almer wrote:
> On 5/30/2020 10:16 AM, Jun Zhao wrote:
>> From: Jun Zhao <barryjzhao@tencent.com>
>>
>> make checkheaders will get error as follow:
>> CC	libavutil/hwcontext_vulkan.h.o
>> In file included from libavutil/hwcontext_vulkan.h.c:1:
>> ./libavutil/hwcontext_vulkan.h:130:23: error: ‘AV_NUM_DATA_POINTERS’ undeclared here (not in a function)
>>   130 |     void *alloc_pnext[AV_NUM_DATA_POINTERS];
>>       |                       ^~~~~~~~~~~~~~~~~~~~
>> ./libavutil/hwcontext_vulkan.h:199:43: warning: ‘enum AVPixelFormat’ declared inside parameter list will not be visible outside of this definition or declaration

Also include pixfmt.h while at it. Don't rely on frame.h including it.

>>
>> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
>> ---
>>  libavutil/hwcontext_vulkan.h | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/libavutil/hwcontext_vulkan.h b/libavutil/hwcontext_vulkan.h
>> index aba9833..0f6a51f 100644
>> --- a/libavutil/hwcontext_vulkan.h
>> +++ b/libavutil/hwcontext_vulkan.h
>> @@ -21,6 +21,8 @@
>>  
>>  #include <vulkan/vulkan.h>
>>  
>> +#include "libavutil/frame.h"
> 
> #include "frame.h"
> 
> This file is already inside libavutil.
> 
>> +
>>  /**
>>   * @file
>>   * API-specific header for AV_HWDEVICE_TYPE_VULKAN.
>>
>
mypopy@gmail.com June 1, 2020, 1:49 a.m. UTC | #4
On Sat, May 30, 2020 at 10:23 PM James Almer <jamrial@gmail.com> wrote:
>
> On 5/30/2020 11:19 AM, James Almer wrote:
> > On 5/30/2020 10:16 AM, Jun Zhao wrote:
> >> From: Jun Zhao <barryjzhao@tencent.com>
> >>
> >> make checkheaders will get error as follow:
> >> CC   libavutil/hwcontext_vulkan.h.o
> >> In file included from libavutil/hwcontext_vulkan.h.c:1:
> >> ./libavutil/hwcontext_vulkan.h:130:23: error: ‘AV_NUM_DATA_POINTERS’ undeclared here (not in a function)
> >>   130 |     void *alloc_pnext[AV_NUM_DATA_POINTERS];
> >>       |                       ^~~~~~~~~~~~~~~~~~~~
> >> ./libavutil/hwcontext_vulkan.h:199:43: warning: ‘enum AVPixelFormat’ declared inside parameter list will not be visible outside of this definition or declaration
>
> Also include pixfmt.h while at it. Don't rely on frame.h including it.
>
> >>
> >> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
> >> ---
> >>  libavutil/hwcontext_vulkan.h | 2 ++
> >>  1 file changed, 2 insertions(+)
> >>
> >> diff --git a/libavutil/hwcontext_vulkan.h b/libavutil/hwcontext_vulkan.h
> >> index aba9833..0f6a51f 100644
> >> --- a/libavutil/hwcontext_vulkan.h
> >> +++ b/libavutil/hwcontext_vulkan.h
> >> @@ -21,6 +21,8 @@
> >>
> >>  #include <vulkan/vulkan.h>
> >>
> >> +#include "libavutil/frame.h"
> >
> > #include "frame.h"
> >
> > This file is already inside libavutil.
> >
> >> +
> >>  /**
> >>   * @file
> >>   * API-specific header for AV_HWDEVICE_TYPE_VULKAN.
> >>
Include "pixfmt.h" and "frame.h" as the commets in patch v2, tks
diff mbox series

Patch

diff --git a/libavutil/hwcontext_vulkan.h b/libavutil/hwcontext_vulkan.h
index aba9833..0f6a51f 100644
--- a/libavutil/hwcontext_vulkan.h
+++ b/libavutil/hwcontext_vulkan.h
@@ -21,6 +21,8 @@ 
 
 #include <vulkan/vulkan.h>
 
+#include "libavutil/frame.h"
+
 /**
  * @file
  * API-specific header for AV_HWDEVICE_TYPE_VULKAN.