I am creating a simple decoding application using the FFMPEG API. I know there are solutions in OpenCV, but for some reason I refrain from doing this. Since I am very new to FFMPEG (and in this community), I would like to know if there is any mistake that I could make when creating FFMPEG.
Compiler I am using gcc 5.3.0 to compile and build.
Below are the steps that I followed:
I ran into a problem:
CaptureFFMPEGFrame.cpp:203:169: error: 'PIX_FMT_BGR24' was not declared in this scope mpFrameSwsContext = sws_getContext(mpAVCodecContext->width, mpAVCodecContext->height, mpAVCodecContext->pix_fmt, mpAVCodecContext->width, mpAVCodecContext->height, PIX_FMT_BGR24, SWS_BICUBIC, NULL, NULL, NULL)
My effort and understanding:
In my opinion, libavutil / pixfmt.h contains the pixel formats that I included along with the others included, and the error persists. You can also see the libraries that I included with my application.
Since my program is cpp code, so my headers are already included using extern "C", i.e. #include "libavcodec/avcodec.h"
Anything I could miss?
Thank you very much.
source share