Search code examples
androidgccffmpegpjsippjsua2

Error while building PJSIP with FFMPEG storage size of 'dstFormat' isn't known


Building PJSIP for armeabi with FFMPEG gives me following output:

../src/pjmedia/converter_libswscale.c: In function 'factory_create_converter':
../src/pjmedia/converter_libswscale.c:70:24: error: storage size of 'srcFormat' isn't known
 enum AVPixelFormat srcFormat, dstFormat;
                    ^

I've read many articles about problems with PixelFormat -> AVPixelFormat in newer versions of FFMPEG(Such as one i've built for PJSIP) - I got all of my pj sources updated according with AVPixelFormat.

Building environment:

Ubuntu 16.04 LTS 64bit running in VirtualBox

PJSIP 2.6

FFMPEG 3.0.9

Compiling PJSIP with flags:

#define PJMEDIA_HAS_VIDEO 1

#define PJMEDIA_HAS_FFMPEG 1

NDK-flag:

--with-ffmpeg="${BASE_DIR}/ffmpeg-output"

ffmpeg-output folder contains these files:

  • libavcodec.so
  • libavcodec.so.57
  • libavcodec.so.57.24.102
  • libavdevice.so
  • libavdevice.so.57
  • libavdevice.so.57.0.101
  • libavfilter.so
  • libavfilter.so.6
  • libavfilter.so.6.31.100
  • libavformat.so
  • libavformat.so.57
  • libavformat.so.57.25.100
  • libavutil.so
  • libavutil.so.55
  • libavutil.so.55.17.103
  • libpostproc.so
  • libpostproc.so.54
  • libpostproc.so.54.0.100
  • libswresample.so
  • libswresample.so.2
  • libswresample.so.2.0.101
  • libswscale.so
  • libswscale.so.4
  • libswscale.so.4.0.100

Trying to build different versions of FFMPEG didn't work at all(Got the same error at the end)

Any help will be appreciated.

UPD: Is there any strange stuff aboud AVPixelFormat in this part of compiler output related to ffmpeg:

checking ffmpeg packages...  libavdevice libavformat libavcodec libswscale libavutil
checking for enum AVPixelFormat... no
checking for v4l2_open in -lv4l2... no
Checking if OpenH264 is disabled... yes
Skipping Intel IPP settings (not wanted)

I mean the line says "checking for enum AVPixelFormat... no" - is there any flag I need to write to say to PJSIP "you have to work with AVPixelFormat"?


Solution

  • Solved compiling PJSIP + FFMPEG based on another project from scratch