The problem is avutil / pixfmt.h:
#define PixelFormat AVPixelFormat
This prevents users from using the word "PixelFormat" anywhere in their own code, even if in namespaces.
This is like a compatibility hack for older software that still uses older identifiers.
The solution is pretty simple if you can edit the code. Just add C ++ a code
#define FF_API_PIX_FMT 0
before including ffmpeg headers.
This disables the if in the pixfmt.h header:
#if FF_API_PIX_FMT #define PixelFormat AVPixelFormat ...
Source: https://trac.ffmpeg.org/ticket/4216
PS I know that the question is old, but for some reason I feel that there is no solution, and I need a solution, so I added it.
source share