c++ - What to do if extern "C" include collides with Qt libraries? -


Text after "

In my case, I am experimenting with QtMultimedia and libffmpeg as decoder. . Extron imported as "C", but Ffmpeg's AvPixelFormat QVideoFrame collapsed with PixelFormat

Exact error:

'AVPixelFormat': No 'QVideoFrame' Is the member / P>

Does anyone know the possible solution?

Edit:. Code Part

Part 1:

Part 2: Based on the use of libffmpeg,

  extern "C" {#include & lt; Libavcodec / avcodec.h & gt; # Include & lt; Libavformat / avformat.h & gt; # Include & lt; Libswscale / swscale.h & gt; }  

After

This was caused by the following line in pixfmt.h for FFmpeg :

#define PixelFormat AVPixelFormat

You can try the following tricks:

  Extern "C" {#include & lt; Libavcodec / avcodec.h & gt; # Include & lt; Libavformat / avformat.h & gt; # Include & lt; Libswscale / swscale.h & gt; } #undefpixel format #include & lt; QT Header & gt;  

Comments