#11318: Can not compile mediacodec for android
-------------------------------------+-------------------------------------
             Reporter:  chinshou     |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  build        |                  Version:  git-
  system                             |  master
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:
 When I --enable-mediacodec and compile the library for android. The
 config.log report unknown type name 'bool'

 {{{
 check_lib mediandk stdint.h media/NdkMediaFormat.h AMediaFormat_new
 -lmediandk
 check_func_headers stdint.h media/NdkMediaFormat.h AMediaFormat_new
 -lmediandk
 test_ld cc -lmediandk
 test_cc
 BEGIN /tmp/ffconf.FOwksFOk/test.c
     1   #include <stdint.h>
     2   #include <media/NdkMediaFormat.h>
     3   #include <stdint.h>
     4   long check_AMediaFormat_new(void) { return (long)
 AMediaFormat_new; }
     5   int main(void) { int ret = 0;
     6    ret |= ((intptr_t)check_AMediaFormat_new) & 0xFFFF;
     7   return ret; }
 END /tmp/ffconf.FOwksFOk/test.c
 /home/xxx/Projects/android-ndk-r17c/toolchains/arm-linux-
 androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc
 --sysroot=/home/xxx/Projects/android-ndk-r17c/platforms/android-24/arch-
 arm/ -D_ISOC11_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
 -Dstrtod=avpriv_strtod -DPIC -I/home/xxx/Projects/android-ndk-
 r17c/sysroot/usr/include/arm-linux-androideabi -isysroot
 /home/xxx/Projects/android-ndk-r17c/sysroot -D__ANDROID_API__=24
 -I/home/xxx/Projects/android-ndk-r9/sources/android/arm/include
 -march=armv7-a -mfloat-abi=softfp -mfpu=neon -mfp16-format=ieee
 -march=armv7-a -std=c11 -fPIE -fomit-frame-pointer -fPIC -marm -c -o
 /tmp/ffconf.FOwksFOk/test.o /tmp/ffconf.FOwksFOk/test.c
 In file included from /tmp/ffconf.FOwksFOk/test.c:2:0:
 /home/xxx/Projects/android-ndk-
 r17c/sysroot/usr/include/media/NdkMediaFormat.h:60:1: error: unknown type
 name 'bool'
  bool AMediaFormat_getInt32(AMediaFormat*, const char *name, int32_t
 *out);
  ^
 }}}

 I fixed the problem by adding stdbool.h to mediandk in configure file

 {{{
 check_lib mediandk "stdint.h stdbool.h media/NdkMediaFormat.h"
 AMediaFormat_new -lmediandk
 }}}

 The fix has referenced the code for cameara2ndk
 {{{
 check_lib camera2ndk "stdbool.h stdint.h camera/NdkCameraManager.h"
 ACameraManager_create -lcamera2ndk
 }}}

 best regards
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/11318>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to