[FFmpeg-devel] compiling libstagefright.cpp with android 4.1.1

Robert Rowntree rowntreerob at gmail.com
Sat Sep 15 01:05:30 CEST 2012


i looked over the shellscript in ./ffmpeg/tools folder and made the
following general changes to revise for 4.1.1

copied from the phone  the shared libs in /system/lib ...

    adb pull /system/lib/* ../android-libs

Cloned the 4.1.1 source , moving it into ./android-source/frameworks in a
couple different folders.

I focused on extra-cc-flags for the configure that would provide necessary
libs for the following configure test:

BEGIN /tmp/ffconf.MStGyddi.cpp
>     1 #include <binder/ProcessState.h>
>     2 #include <media/stagefright/MetaData.h>
>     3 #include <media/stagefright/MediaBufferGroup.h>
>     4 #include <media/stagefright/MediaDebug.h>
>     5 #include <media/stagefright/MediaDefs.h>
>     6 #include <media/stagefright/OMXClient.h>
>     7 #include <media/stagefright/OMXCodec.h>
>     8 int main(void) {
>     9 android::OMXClient obj1;
>    10 return 0; }


Result was lots of errors  - sample of config.log is below....

What should i do?

--- details config.log

BEGIN /tmp/ffconf.b36XT2pJ.cpp
    1 #include <binder/ProcessState.h>
    2 #include <media/stagefright/MetaData.h>
    3 #include <media/stagefright/MediaBufferGroup.h>
    4 #include <media/stagefright/MediaDebug.h>
    5 #include <media/stagefright/MediaDefs.h>
    6 #include <media/stagefright/OMXClient.h>
    7 #include <media/stagefright/OMXCodec.h>
    8 int main(void) {
    9 android::OMXClient obj1;
   10 return 0; }
END /tmp/ffconf.b36XT2pJ.cpp
arm-linux-androideabi-g++
--sysroot=/usr/local/src/android-ndk-r8b/platforms/android-14/arch-arm
-D_ISOC99_SOURCE -D_FILE_OFFSET_
BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
-DPIC -I/home/rob/src/android-ffmpeg/Project/jni/android
-source/frameworks/av/media/libstagefright/include
-I/home/rob/src/android-ffmpeg/Project/jni/android-source/system/core/include
-I/home/rob/src/android-ffmpeg/Project/jni/android-source/frameworks/av/media/libstagefright
-I/home/rob/src/android-ffmpeg/Proje
ct/jni/android-source/frameworks/av/media/libstagefright/omx
-I/home/rob/src/android-ffmpeg/Project/jni/android-source/frameworks
/av/include
-I/home/rob/src/android-ffmpeg/Project/jni/android-source/frameworks/native/include
-I/usr/local/src/android-ndk-r8b/
sources/cxx-stl/gnu-libstdc++/include
-I/usr/local/src/android-ndk-r8b/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include
-ma
rch=armv7-a -mfloat-abi=softfp -mfpu=neon -march=armv7-a -std=c99
-fomit-frame-pointer -fPIC -marm -Wno-multichar -fno-exceptions
 -fno-rtti -std=c++0x -D__STDC_CONSTANT_MACROS -c -o /tmp/ffconf.MrJUzHw2.o
/tmp/ffconf.b36XT2pJ.cpp
cc1plus: warning: command line option "-std=c99" is valid for C/ObjC but
not for C++
In file included from
/home/rob/src/android-ffmpeg/Project/jni/android-source/frameworks/native/include/utils/RefBase.h:28,
                 from
/home/rob/src/android-ffmpeg/Project/jni/android-source/frameworks/native/include/binder/IBinder.h:21,
                 from
/home/rob/src/android-ffmpeg/Project/jni/android-source/frameworks/native/include/binder/ProcessState.h:20,
                 from /tmp/ffconf.b36XT2pJ.cpp:1:
/home/rob/src/android-ffmpeg/Project/jni/android-source/frameworks/native/include/utils/TypeHelpers.h:20:15:
error: new: No such
file or directory
/tmp/ffconf.b36XT2pJ.cpp:4:42: error: media/stagefright/MediaDebug.h: No
such file or directory
In file included from
/home/rob/src/android-ffmpeg/Project/jni/android-source/frameworks/av/include/media/stagefright/OMXClient.h
:21,
                 from /tmp/ffconf.b36XT2pJ.cpp:6:
/home/rob/src/android-ffmpeg/Project/jni/android-source/frameworks/av/include/media/IOMX.h:22:30:
error: ui/GraphicBuffer.h: No s
uch file or directory
In file included from
/home/rob/src/android-ffmpeg/Project/jni/android-source/frameworks/native/include/utils/Errors.h:20,
                 from
/home/rob/src/android-ffmpeg/Project/jni/android-source/frameworks/native/include/binder/IBinder.h:20,
                 from
/home/rob/src/android-ffmpeg/Project/jni/android-source/frameworks/native/include/binder/ProcessState.h:20,
                 from /tmp/ffconf.b36XT2pJ.cpp:1:
/usr/local/src/android-ndk-r8b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4
.3/include-fixed/sys/types.h:137: error: 'uint64_t' does not name a type
In file included from
/home/rob/src/android-ffmpeg/Project/jni/android-source/frameworks/native/include/utils/RefBase.h:28,
                 from
/home/rob/src/android-ffmpeg/Project/jni/android-source/frameworks/native/include/binder/IBinder.h:21,
                 from
/home/rob/src/android-ffmpeg/Project/jni/android-source/frameworks/native/include/binder/ProcessState.h:20,
                 from /tmp/ffconf.b36XT2pJ.cpp:1:
/home/rob/src/android-ffmpeg/Project/jni/android-source/frameworks/native/include/utils/TypeHelpers.h:289:
error: ISO C++ forbids
 declaration of 'int64_t' with no type
/home/rob/src/android-ffmpeg/Project/jni/android-source/frameworks/native/include/utils/TypeHelpers.h:289:
error: expected ',' or
 '...' before '&' token
/home/rob/src/android-ffmpeg/Project/jni/android-source/frameworks/native/include/utils/TypeHelpers.h:289:
error: template-id 'ha
sh_type<>' for 'android::hash_t android::hash_type(int)' does not match any
template declaration
/home/rob/src/android-ffmpeg/Project/jni/android-source/frameworks/native/include/utils/TypeHelpers.h:290:
error: ISO C++ forbids
 declaration of 'uint64_t' with no type
/home/rob/src/android-ffmpeg/Project/jni/android-source/frameworks/native/include/utils/TypeHelpers.h:290:
error: expected ',' or
 '...' before '&' token
/home/rob/src/android-ffmpeg/Project/jni/android-source/frameworks/native/include/utils/TypeHelpers.h:290:
error: template-id 'ha
sh_type<>' for 'android::hash_t android::hash_type(int)' does not match any
template declaration
/home/rob/src/android-ffmpeg/Project/jni/android-source/frameworks/native/include/utils/TypeHelpers.h:
In function 'android::hash
_t android::hash_type(const TKey&) [with TKey = double]':
/home/rob/src/android-ffmpeg/Project/jni/android-source/frameworks/native/include/utils/TypeHelpers.h:292:
error: ISO C++ forbids


More information about the ffmpeg-devel mailing list