Page 1 of 1

VLC cross compile to run on android arm7 as command line

Posted: 24 Jul 2014 10:38
by issa82
Hi,
Im trying to cross compile vlc from source code (vlc-2.1.4) to run as command line on android 4.2 (arm7).

toolchain already in place, FFMPEG installed successfully

after few trial below is the configuration:

Code: Select all

export CC=/home/toolchain/bin/arm-linux-androideabi-gcc export CXX=/home/toolchain/bin/arm-linux-androideabi-g++ ./configure '--disable-v4l' '--disable-v4l2' '--disable-nls' '--disable-mozilla' '--disable-dbus' '--disable-dbus-control' '--disable-telepathy' '--disable-lua' '--disable-cdda' '--disable-vcd' '--disable-dvb' '-disable-libcddb' '-disable-x11' '--disable-glx' '--disable-opengl' '--disable-xvideo' '--disable-xvmc' '--disable-freetype' '--disable-fontconfig' '--disable-fb' '--disable-qt4' '--disable-skins2' '--disable-sdl' '--disable-sdl-image' '--disable-notify' '--disable-libgcrypt' '--disable-mad' '--enable-avcodec' '--enable-avformat' '--disable-swscale' '--disable-postproc' '--disable-a52' '--disable-remoteosd' '--disable-live555' --host=arm-linux --without-x --disable-xcb --without-kde-solid --disable-dvdnav --disable-dvdread --disable-vcd --disable-libcddb --disable-qt --with-arch=arm-linux CPPFLAGS=-I/home/toolchain/sysroot/usr/include LDFLAGS=-L/home/toolchain/sysroot/usr/lib --disable-alsa --disable-theora --disable-x264 --disable-ogg --disable-mux_ogg --disable-libxml2 --disable-bonjour --disable-udev --disable-mtp --disable-upnp --disable-atmo --prefix=/home/toolchain/sysroot/usr --without-x --program-prefix=arm7 --with-contrib=/home/toolchain/sysroot/usr/ --prefix=/home/toolchain/sysroot/usr/local/
when i compile i get:

Code: Select all

MAKE : bin /home/toolchain/bin/arm-linux-androideabi-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -I/home/toolchain/sysroot/usr/include -I/home/toolchain/sysroot/usr/include -g -O2 -I/home/toolchain/sysroot/usr/include -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -Werror-implicit-function-declaration -pipe -fvisibility=hidden -ffast-math -funroll-loops -fomit-frame-pointer -MT override.o -MD -MP -MF .deps/override.Tpo -c -o override.o override.c override.c: In function 'vlc_enable_override': ERROR : override.c:58: 5: implicit declaration of function 'pthread_atfork' [-Werror=implicit-function-declaration] override.c: At top level: ERROR : override.c:128: 5: conflicting types for 'putenv' /home/toolchain/bin/../sysroot/usr/include/stdlib.h:55:12: note: previous declaration of 'putenv' was here ERROR : override.c:173: 6: redefinition of 'srand' /home/toolchain/bin/../sysroot/usr/include/stdlib.h:123:24: note: previous definition of 'srand' was here ERROR : override.c:181: 5: redefinition of 'rand' /home/toolchain/bin/../sysroot/usr/include/stdlib.h:120:23: note: previous definition of 'rand' was here override.c: In function 'rand': ERROR : override.c:187: 5: implicit declaration of function 'rand_r' [-Werror=implicit-function-declaration] cc1: some warnings being treated as errors make: *** [all] Error 2
i appreciate your help

Re: VLC cross compile to run on android arm7 as command line

Posted: 24 Jul 2014 15:36
by edwardw
VLC for Android cannot run from the command line, sorry.

Re: VLC cross compile to run on android arm7 as command line

Posted: 25 Jul 2014 13:15
by issa82
Thanks for the reply, why not?
just to clarify, im not building vlc as APK file for android, im cross compiling it to run as command line on linux-arm, android platform

Re: VLC cross compile to run on android arm7 as command line

Posted: 25 Jul 2014 14:37
by flx42
Why are you trying to do that? Which feature of VLC do you want to use that requires running it from command line on Android?

Re: VLC cross compile to run on android arm7 as command line

Posted: 25 Jul 2014 15:56
by edwardw
You cannot run the Android port from the command line, because it is written in Java and using the Android Runtime.

Re: VLC cross compile to run on android arm7 as command line

Posted: 27 Jul 2014 09:59
by issa82
I got it working, thanks for the replies

Im compiling VLC from default source code and not from android version

Re: VLC cross compile to run on android arm7 as command line

Posted: 27 Jul 2014 11:26
by issa82
Why are you trying to do that? Which feature of VLC do you want to use that requires running it from command line on Android?
Android VLC (LIBVLC) does not have deinterlace feature.

Re: VLC cross compile to run on android arm7 as command line

Posted: 27 Jul 2014 15:37
by edwardw
This is not supported and will not work.

Re: VLC cross compile to run on android arm7 as command line

Posted: 06 Aug 2014 11:45
by issa82
This is not supported and will not work.
I got vlc working on command line on android platform ARM7, do you want the binary to test it your self?

Re: VLC cross compile to run on android arm7 as command line

Posted: 06 Aug 2014 16:07
by edwardw
It is probably broken in that it cannot access various Android system APIs, which depend on the Android Runtime, like video output for instance.

Re: VLC cross compile to run on android arm7 as command line

Posted: 06 Aug 2014 21:59
by issa82
It is probably broken in that it cannot access various Android system APIs, which depend on the Android Runtime, like video output for instance.
It doesnt need to access android system API, I am using it to as streaming system on linux command line, it receive the stream from network do what ever its requested to do, and then stream it back on local system where android native media player will read the stream from unicast or http url and play it as normal.

PS: this not for mobiles or tablets its for special android based STB.

Thanks for the reply anyways :)

Re: VLC cross compile to run on android arm7 as command line

Posted: 29 Aug 2014 00:16
by canar
I have used the vlc-nox build in Debian in a chroot on Android. I built the chroot using the Lil Debi app. It works, but is old. The deb-multimedia repos have nice fresh builds though, if you add them.