Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using the vlclib on Android

Well i´m trying to create a application which should show some streams (udp/rtsp..) I found out that the vlc-player can handle most of it! So i decided to use the vlclib. On windows there is a vlclib which can be easily used. But how can i use the vlc-android project as a vlclib for my own app?

On the web i found another question: Using libvlc on android with NDK

The answer links to this side: https://bitbucket.org/tewilove/nyan.tv-jni/src

But the readme is really strange. It tells me only to compile it using the shell script... But this side referring to the nyan.tv-jni project tells me that i can use it simply as a wrapper in my code? http://blog.moenyan.net/?p=18

So now i´m really confused... Can anyone please help me shed some light on how to create my own app using the lib?

Thanks in advance.

like image 834
mkl Avatar asked Jan 25 '13 08:01

mkl


1 Answers

I found a solution for my problem. I decided to build my application into the vlc application. I cloned the git-project from vlc and followed the instruction to build a ARM-CPU version. After the successful compilation I was able to merge my project into the vlc application.

Just change the package in the AndroidManifest.xml, change the declared classes from for example:

.GUI.Main to org.videolan.GUI.Main

Remember to do not register your Main as the starting activity. Just start your activity after finishing the onCreate() of the VLC-Main activity. Remember to call finish() in the onResume() of the VLC-Main activity. The onResume() will be called after your destroyed your own activity.

// OnCreate
VLC.Main.onCreate() -> startActivity(Intent) -> MyApplication.Main.onCreate()
// OnDestroy
MyApplication.Main.onDestroy() -> VLC.Main.onResume() -> VLC.Main.onDestroy()

/!\ Remember to credit the VLC-Team for the great base!

like image 100
mkl Avatar answered Oct 23 '22 09:10

mkl