Compiling ffmpeg for android
cee1
fykcee1 at gmail.com
Thu Apr 4 22:08:21 PDT 2013
2013/1/11 Luis Linietsky <llinietsky at dlatv.net>:
> Hello there,
> I have been trying unsuccessfully to build Tutorial5 from the gstreamer
> android tutorials with ffmpeg plugin.
>
> I keep getting the following error:
>
> luigi at Fender:~/workspace/Tutorial5$ ndk-build
> GStreamer : [GEN] => gst-build/gstreamer_android.c
> GStreamer : [COMPILE] => gst-build/gstreamer_android.c
> GStreamer : [LINK] => gst-build/libgstreamer_android.so
> /home/luigi/projects/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.gold:
> /home/luigi/projects/gstreamer-sdk/lib/libavcodec.a(flashsvenc.o): in
> function flashsv_encode_frame:libavcodec/flashsvenc.c:169: error: undefined
> reference to 'compress2'
> /home/luigi/projects/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.gold:
> /home/luigi/projects/gstreamer-sdk/lib/libavcodec.a(tiffenc.o): in function
> encode_strip:libavcodec/tiffenc.c:165: error: undefined reference to
> 'compress'
>
> The .o files are referencing compress and compress2 from zlib, but the
> symbols in such library are z_compress and z_compress2 (there is a #define
> compress z_compress in the header), so i guess this is a compilation error?
> also I just need to use h264 from ffmpeg, so is there any plugin or module i
> can disable for this error to not happen? (I don't really need flash or tiff
> decoding)
Modify gstreamer-sdk-android-arm-release-2012.11/share/gst-android/ndk-build/gstreamer.mk:
"""
# Create the link command
GSTREAMER_ANDROID_CMD := $(call libtool-link,$(_CC) $(LDFLAGS)
-shared --sysroot=$(SYSROOT) \
-o $(GSTREAMER_ANDROID_SO) $(GSTREAMER_ANDROID_O) \
-L$(GSTREAMER_SDK_ROOT)/lib -L$(GSTREAMER_STATIC_PLUGINS_PATH)
$(G_IO_MODULES_PATH) \
$(GSTREAMER_ANDROID_LIBS), $(GSTREAMER_LD))
-Wl,--allow-multiple-definition -lz -lbz2 -Wl,-no-undefined
$(GSTREAMER_LD)
"""
Note the "-Wl,--allow-multiple-definition -lz -lbz2"
--
Regards,
- cee1
More information about the gstreamer-android
mailing list