VLC android port with DVD support

VLC for Android and Chrome OS specific usage questions
alainp
New Cone
New Cone
Posts: 5
Joined: 04 Dec 2011 00:53

VLC android port with DVD support

Postby alainp » 04 Dec 2011 01:06

Hello there,

For some reasons that I'll ask anyone reading this to assume are good reasons, I'd like to get a VLC version with support for reading DVD iso files on an Android device. Since I think perfectly reasonable for VLC devs not to include this support out of the box, I decided to go and try to compile it by myself, even though I'm completely new both to VLC compilation and to Android development (not much of a developer, anyway). After a bit of fiddling around, I got that i needed to add ".dvdnav" to the android.mak file in the extras/contrib/src/Distributions folder, which would then also make libdvdcss and lidvdread included. I "bootstrapped" the extras again, but libdvdnav's configure script choked on pthread_create support, saying it was absent. Since pthread.h in the android NDK does look like it includes this function, I'm kind of at a loss here, and I thought maybe a kind soul on this forum would be able to help.

In any case, thanks for VLC.

funman
Developer
Developer
Posts: 1159
Joined: 03 Sep 2006 04:03
VLC version: master
Operating System: All of them
Location: Lost, please help me

Re: VLC android port with DVD support

Postby funman » 04 Dec 2011 04:17

android C and pthread libraries are actually crappy

google basically includes only the functions they use in the android stack, probably to save a few kilobytes in the binaries.

So your options are:
- hope that google ships a more complete libc at next android version
- modify libdvdnav to behave correctly on android

alainp
New Cone
New Cone
Posts: 5
Joined: 04 Dec 2011 00:53

Re: VLC android port with DVD support

Postby alainp » 04 Dec 2011 15:11

Indeed I had seen that not all of the pthread API was present in Android. But as I said in my previous post, what baffles me in that the configure script chokes on the "pthread_create" test. This function is of course present in android's pthread.h. For all I see in the src dir of libdvdnav, only the "init", "destroy", "lock" and "unlock" calls are used. All of them are implemented in Bionic (are at least present in pthread.h). So I guess it should be possible to compile libdvdnav with Bionic, shouldn't it ?

funman
Developer
Developer
Posts: 1159
Joined: 03 Sep 2006 04:03
VLC version: master
Operating System: All of them
Location: Lost, please help me

Re: VLC android port with DVD support

Postby funman » 04 Dec 2011 23:00

dvdnav's configure should tell you to look at config.log, you will see the content of the test that fails, with the gcc error messages

alainp
New Cone
New Cone
Posts: 5
Joined: 04 Dec 2011 00:53

Re: VLC android port with DVD support

Postby alainp » 05 Dec 2011 00:14

Thanks for your answer.

Well, that's another thing that baffled me, but it might come from my lack of knowledge of the autotools (and from C in general). Here's what the code basically looks like:

Code: Select all

char pthread_create(); int main() { return pthread_create(); return 0; }
I don't quite get how this is supposed to test for the presence of the pthread_create() function anywhere. I tried faking a positive result for this test in the configure script, which allowed me to get libdvdnav compiled, but then linkage for it failed with unresolved symbols at the "VLC_BUILD_DIR=vlc/android make" step, so I guess there's more to it than I can get my head around right now.

Any pointer to something that might help me do this is greatly appreciated.

Thanks anyway.

alainp
New Cone
New Cone
Posts: 5
Joined: 04 Dec 2011 00:53

Re: VLC android port with DVD support

Postby alainp » 06 Dec 2011 16:49

OK, since I was having trouble with compiling with libdvdnav activated, I decided to first have a try with a "vanilla" build. After disabling live555 and iomx modules, I was able to reach the final building step (VLC_BUILD_DIR=vlc/android make).

However, building the libvlcjni shared library fails with a "cannot find -lstagefright". Sure enough, stagefright was built as a shared library and only stagefright.so is to be found in "android-libs" (no stagefright.a). Is this supposed to be this way ? Is there a bug in the build system ? (I not its not supposed to be stable at the moment, I'm just asking to understand if I failed somewhere)

Thanks for your input.

funman
Developer
Developer
Posts: 1159
Joined: 03 Sep 2006 04:03
VLC version: master
Operating System: All of them
Location: Lost, please help me

Re: VLC android port with DVD support

Postby funman » 06 Dec 2011 23:18

afaik nobody works or builds vlc for android so the build system might be victim of bitrot

alainp
New Cone
New Cone
Posts: 5
Joined: 04 Dec 2011 00:53

Re: VLC android port with DVD support

Postby alainp » 29 Dec 2011 16:39

OK, so I finally got around to compiling the full VLC package, with and without DVD support. I'm just writing this here to let the intertubes know, but at the moment, dvdnav segfaults when trying to analyse the file (seemingly in a pthread_create call, which does not come as such a big surprise). Since the machine I compiled this on is remotely accessed, I cannot plug my phone in debug mode to it, and so this will have to wait until I find the time to get a Linux up and running on my laptop again.

In short: nothing to see here.

slcheng
New Cone
New Cone
Posts: 1
Joined: 22 Feb 2012 04:20

Re: VLC android port with DVD support

Postby slcheng » 07 Mar 2012 04:39

Hi,
I was building the libvlcjni shared library and failed with a "cannot find -lstagefright".
Would you please share your experience that how to solve the error ? Is there any configure I have to add or disable some setting in my build ?
Thanks in advance.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: VLC android port with DVD support

Postby Jean-Baptiste Kempf » 07 Mar 2012 19:06

PLease update your source. stragefright is gone.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “VLC for Android and Chrome OS”

Who is online

Users browsing this forum: No registered users and 96 guests