<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Courier New, Courier, monospace">Hi guys,<br>
<br>
I've been fighting for a while to get gstreamer compiled for
Android following the instructions nicely provided by Reynaldo. I
just thought it might be interesting to share all the steps. This
was on an amd_64 machine running Ubuntu 10.04 Lucid, almost bare
bone (so you'll see some silly aptitude install's) and behind a
proxy.<br>
<br>
Biggest hurdle was glib/gobject didnt have an Android.mk so I had
to find one and frankenstenise it! :)<br>
<br>
Also thanks to Stefan <a
href="http://lists.freedesktop.org/archives/gstreamer-android/2012-February/000165.html">http://lists.freedesktop.org/archives/gstreamer-android/2012-February/000165.html</a>
for kindly pointing me to the right freedesktop git server ip :) .<br>
With a hash mark are my comments:<br>
<br>
<br>
</font>
<blockquote type="cite"><font face="Courier New, Courier, monospace">sudo
aptitude install emacs23 git-core sun-java6-bin<br>
sudo aptitude install ant<br>
<br>
###############################################################################<br>
#download and compile transconnect, to have the git:// access
from the company<br>
#<a class="moz-txt-link-freetext" href="http://sourceforge.net/projects/transconnect/files/latest/download">http://sourceforge.net/projects/transconnect/files/latest/download</a><br>
<br>
mkdir gst<br>
cd gst/<br>
tar -zxvf /home/imco/Downloads/transconnect-1.3-Beta.tar.gz <br>
cd trasconnect-1.3-Beta<br>
# add -fPIC to CFLAGS<br>
make<br>
make install<br>
#edit the ~/.tconn/tconn.conf *before* even using it<br>
# xxx.xxx.xxx.xxx and port xxxx<br>
export LD_PRELOAD=$HOME/.tconn/tconn.so<br>
cd ..<br>
<br>
################################################################################<br>
# now check out the gstreamer big bundle !<br>
git clone
git://git.collabora.co.uk/git/user/reynaldo/gstreamer_ndk_bundle<br>
<br>
#download latest android SDK (latest, 16) and android NDK r6b
(not the latest!!!)<br>
tar -xvf /home/imco/Downloads/android-ndk-r6b-linux-x86.tar.bz2<br>
tar -zxvf /home/imco/Downloads/android-sdk_r16-linux.tgz<br>
<br>
#add to path those two fellas<br>
export PATH=$PATH:~/gst/android-sdk-linux/tools/<br>
export PATH=$PATH:~/gst/android-ndk-r6b/<br>
#actually all those exports is best to add to some script file<br>
<br>
<br>
cd android-sdk-linux/tools<br>
./android<br>
# stop the download (squar red button bottom rigth).<br>
# menu Tools->options and configure proxy<br>
# menu OPacakges-> Reload<br>
# select Tools and Android 2.3.3 Api 10 and install the whole
lot<br>
<br>
###############################################################################<br>
# edit /etc/hosts as root and add the line (without the first #)<br>
# 131.252.210.176 anongit.freedesktop.org<br>
<br>
git clone
git://git.collabora.co.uk/git/user/derek/androgenizer.git<br>
cd androgenizer<br>
make<br>
export PATH=$PATH:~/gst/androgenizer<br>
<br>
<br>
###############################################################################<br>
git clone
git://git.collabora.co.uk/git/user/reynaldo/gstreamer_ndk_bundle<br>
cd gstreamer_ndk_bundle<br>
git submodule update --init<br>
# this takes a while btw<br>
<br>
<br>
cd gstreamer_ndk_bundle<br>
# edit AndroidManifest.xml and change the minSdkVersion to 10<br>
# and setup.sh, the same 11 -> 10<br>
<br>
export PKG_CONFIG_PATH=/usr/lib/pkgconfig<br>
#finally !<br>
./setup.sh<br>
<br>
<br>
# error bash:
/home/imco/gst/android-ndk-r6b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-cpp:
No such file or directory<br>
# install ia32-libs ! and others also needed :)<br>
sudo aptitude install ia32-libs make autoconf libtool<br>
# This is because im running linux 10.04 AMD_64 kernel so I need
compat for<br>
# 32b libraries/executables<br>
# back to <br>
./setup.sh<br>
<br>
#after a while fails during configuration, missing gtk-doc<br>
sudo aptitude install gtk-doc-tools bison flex build-essential<br>
./setup.sh #again<br>
<br>
# missing glib/gobject/gmarshal.[h,c] and
glib/gobject/Android.mk<br>
# and in this distro, there is no glib-devel<br>
# so go to
<a class="moz-txt-link-freetext" href="http://gitorious.org/android/libglib/trees/new/gobject">http://gitorious.org/android/libglib/trees/new/gobject</a><br>
# and get those three files.<br>
# Edit the android.mk and add to the list, the gatomicarray.c<br>
# and libgthread-2.0 to the LOCAL_SHARED_LIBRARIES<br>
<br>
# the error: missing glib-compile-schemas<br>
# this file can be found here
<a class="moz-txt-link-freetext" href="http://packages.ubuntu.com/maverick/libglib2.0-0">http://packages.ubuntu.com/maverick/libglib2.0-0</a><br>
# so download it and copy paste this file to /usr/bin or install
the .deb<br>
# After this, the LD_PRELOAD complains a lot but it still seems
to work (???)<br>
sudo cp /usr/lib/glib-2.0/glib-compile-schemas
/usr/bin/glib-compile-schemas<br>
<br>
# error: gst/gstmarshal.h: No such file or directory<br>
# install libglib2.0-dev<br>
# (this will btw downgrade the maverick libglib, but we copied
by hand the <br>
# glib-compile-schemas so it should not be a problem.<br>
<br>
# missing a lot of g_... symbols: go into glib folder and type
ndk_build <br>
# until g_object is correctly compiled and linked,<br>
# then go back to root,<br>
ndk-build clean<br>
ndk-build<br>
<br>
# next error:<br>
# error: 'GST_TYPE_AUDIO_CHANNEL_POSITION' undeclared (first use
in ...<br>
# install libgstreamer0.10-dev<br>
# rerun <br>
ANDROGENIZER_NDK=1 NDK_BUILD=1 ndk-build
gstreamer-aggregate-configure <br>
# and<br>
ndk-build <br>
# let's see...<br>
# obviously now gobject is not build. ndk-build, this piece of
junk, is<br>
# impossible to convince to recompile. So just save a dummy edit
in <br>
# in and run ndk-build again...<br>
<br>
#I'm missing many misterious defs and shit. Hummm<br>
sudo aptitude install libgstreamer0.10-dev
libgstreamer-plugins-base0.10-dev<br>
<br>
#some problems in gst-plugins-base/ audio xxx<br>
# add this line to gst-plugins-base/config.h: (with the hash in
the beginning<br>
#define GST_TYPE_AUDIO_CHANNEL_POSITION 0<br>
#comment lines37-38. of file
gst-plugins-base/gst/audioconvert/plugin.c<br>
#now it seems to work<br>
<br>
#missing -lmedia, get those files from my phone and add to <br>
# $NDK_HOME/platforms/android-9/arch-arm/usr/lib/<br>
# as described here <br>
#<a class="moz-txt-link-freetext" href="http://gstreamer.freedesktop.org/wiki/GstreamerAndroid_InstallInstructions">http://gstreamer.freedesktop.org/wiki/GstreamerAndroid_InstallInstructions</a><br>
# The libs I found where (never mind the path)<br>
#/media/88AD-07D8/miscosas/superlibs/libaudioflinger.so<br>
#/media/88AD-07D8/miscosas/superlibs/libbinder.so<br>
#/media/88AD-07D8/miscosas/superlibs/libcutils.so<br>
#/media/88AD-07D8/miscosas/superlibs/libmedia.so<br>
#/media/88AD-07D8/miscosas/superlibs/libmediaplayerservice.so<br>
#/media/88AD-07D8/miscosas/superlibs/libpixelflinger.so<br>
#/media/88AD-07D8/miscosas/superlibs/libsurfaceflinger.so<br>
#/media/88AD-07D8/miscosas/superlibs/libsurfaceflinger_client.so<br>
#/media/88AD-07D8/miscosas/superlibs/libui.so<br>
#/media/88AD-07D8/miscosas/superlibs/libutils.so<br>
#back to setup.sh<br>
<br>
#some misterious problem in gst-plugins-bad interfaces
photography:<br>
# unresolved ref to a symbol defined in win32 folder. Feck it,<br>
ndk-build -k<br>
<br>
<br>
<br>
<br>
ant release<br>
# too early ant version, needs 1.8.0<br>
# download
<a class="moz-txt-link-freetext" href="http://apache.cu.be//ant/binaries/apache-ant-1.8.2-bin.tar.gz">http://apache.cu.be//ant/binaries/apache-ant-1.8.2-bin.tar.gz</a><br>
cd ~/gst<br>
tar -zxvf ~/Downloads/apache-ant-1.8.2-bin.tar.gz<br>
export PATH=$PATH:~/gst/apache-ant-1.8.2/bin/<br>
<br>
<br>
<br>
<br>
sudo aptitude install sun-java6-jdk<br>
<br>
ant debug<br>
# the result is under bin<br>
<br>
<br>
<br>
<br>
<br>
###############################################################################<br>
# glib/gobject/Android.mk contents<br>
<br>
LOCAL_PATH:= $(call my-dir)<br>
<br>
include $(CLEAR_VARS)<br>
<br>
LOCAL_SRC_FILES:= \<br>
gatomicarray.c \<br>
gboxed.c \<br>
genums.c \<br>
gparam.c \<br>
gsignal.c \<br>
gtypemodule.c \<br>
gtypeplugin.c \<br>
gvalue.c \<br>
gvaluetypes.c \<br>
gclosure.c \<br>
gobject.c \<br>
gparamspecs.c \<br>
gtype.c \<br>
gvaluearray.c \<br>
gvaluetransform.c \<br>
gsourceclosure.c<br>
<br>
<br>
<br>
LOCAL_SHARED_LIBRARIES := libglib-2.0 libgthread-2.0<br>
<br>
LOCAL_MODULE:= libgobject-2.0<br>
<br>
LOCAL_C_INCLUDES := \<br>
$(LOCAL_PATH) \<br>
$(LOCAL_PATH)/.. \<br>
$(LOCAL_PATH)/../android \<br>
$(LOCAL_PATH)/../glib<br>
<br>
LOCAL_CFLAGS := \<br>
-DG_LOG_DOMAIN=\"GLib-GObject\" \<br>
-DGOBJECT_COMPILATION \<br>
-DG_DISABLE_CONST_RETURNS \<br>
-DG_DISABLE_DEPRECATED <br>
<br>
include $(BUILD_SHARED_LIBRARY)<br>
<br>
</font></blockquote>
<font face="Courier New, Courier, monospace"><br>
</font>
<pre class="moz-signature" cols="72"><font face="Courier New, Courier, monospace">--
-----------------------------------------------------------------------------
Miguel Casas-Sanchez
R&D Lead Immersive Communications
Alcatel-Lucent Bell NV
gsm: ( +32) 473925004</font></pre>
</body>
</html>