[FFmpeg-user] FFmpeg for Android

Срђан Обућина obucinac at gmail.com
Fri Sep 21 11:53:48 CEST 2012


2012/9/21 Carl Eugen Hoyos <cehoyos at ag.or.at>

> Is there a way to insert the required specific includes into
> the existing Makefiles? In case this is possible, it would
> allow easier building iiuc.
>



I dont think so. At least, not easily. Simple Android.mk (thats android
makefile), very close to minimal, looks like this:

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_SRC_FILES := \
    cmdutils.c \
    ffmpeg.c

LOCAL_SHARED_LIBRARIES := \
    libavcodec$(VERSION_SUFFIX) \
    libavdevice$(VERSION_SUFFIX) \
    libavfilter$(VERSION_SUFFIX) \
    libavformat$(VERSION_SUFFIX) \
    libavresample$(VERSION_SUFFIX) \
    libavutil$(VERSION_SUFFIX) \
    libpostproc$(VERSION_SUFFIX) \
    libswresample$(VERSION_SUFFIX) \
    libswscale$(VERSION_SUFFIX)

LOCAL_MODULE_TAGS := optional

LOCAL_MODULE := ffmpeg$(VERSION_SUFFIX)

include $(BUILD_EXECUTABLE)



include $(CLEAR_VARS) and include $(BUILD_EXECUTABLE) are those specific
includes, which are located in Android source code tree. First clears all
variables starting with LOCAL_, which are very important for the build
system, second instructs build system to build executable file.

Few other differences are:

Files in FFmpeg Makefiles are listed as filename.o, while Android makefile
requires real names, like filename1.c, filename2.S, filename3.asm.
There are default android linker and compiler flags which will always be
included in command line.
Android build system always strips files which will be installed on device
file system, and keeps non stripped files in a separate folder.

IMO, the best help Android build system can get from FFmpeg would be if
Makefiles provide variables which will contain values which can be used as
initialization values for Android makefile variables. Basically, this is
what I am trying to do now - get a list of files and flags from Makefiles,
according to configuration, and use them in Android makefiles.


More information about the ffmpeg-user mailing list