3

I am building ffmpeg 2.1.3 in the android with ndk r9b version.

I have used the below command.

./configure --enable-shared --prefix=/home/fbuild 
             --cross-prefix=arm-linux-androideabi- 
             --enable-cross-compile 
             --target-os=linux --arch=arm --enable-gpl 
             --enable-libx264 --extra-cflags=-I/home/fbuild/include 
             --extra-ldflags=-L/home/fbuild/lib --disable-doc 
             --disable-ffmpeg --enable-network --disable-ffplay 
             --disable-ffprobe --disable-ffserver --enable-avresample 
             --enable-decoders 
             --enable-encoders 
             --enable-muxers 
             --enable-demuxers 
             --enable-parsers --enable-protocols --enable-filters 
             --enable-avresample --disable-indevs --enable-indev=lavfi 
             --disable-outdevs --enable-hwaccels --enable-libx264 
             --enable-zlib --enable-muxer=md5 --enable-runtime-cpudetect  
             --cpu=cortex-a8 
             --enable-pthreads --enable-static

in config.log

 main:ffconf.82qqjSTF.c(.text+0x4): error: undefined reference to '**pthread_cancel**

Which clearly indicates, pthread_cancel is unavailable.

Is it an existing issue, or do we have a any other solution for the same ?

I have enabled '--enable-pthreads',

I am trying to stream RTSP Stream through, UDP

Your help is much appreciated. Thanks.

Whoami
  • 13,930
  • 19
  • 84
  • 140

1 Answers1

2

Is it an existing issue?

The official NDK documentation states that:

pthread_cancel() will not be supported in Bionic, because doing this would involve making the C library significantly bigger for very little benefit. [...] All of this is contrary to the Bionic design goals. If your code depends on thread cancellation, please consider alternatives.

see the Bionic Overview section

That being said ffmpeg configure script auto detects this:

if enabled pthreads; then
  check_func pthread_cancel
fi

So I assume ffmpeg has fallbacks on the implementation side if pthread_cancel is not available (see the #if HAVE_PTHREAD_CANCEL sections).

deltheil
  • 15,496
  • 2
  • 44
  • 64