Mini VLC preview in apps

VLC for Android and Chrome OS specific usage questions
AndroidMatth
New Cone
New Cone
Posts: 5
Joined: 13 Mar 2013 20:52

Mini VLC preview in apps

Postby AndroidMatth » 13 Mar 2013 20:59

Hello,

I would like to have a small preview with VLC of a playing stream in my apps. How can I do that ? However I want to continue to use my main apps.

I think it's not possible to embbed the vlc apps in other activity ?
So may be can I start a little VLC player (with size and position parameters) over my apps screen.

If some one have an idea to do that, that's great. :)

Thank's

edwardw
Big Cone-huna
Big Cone-huna
Posts: 2346
Joined: 24 Jun 2012 23:36
VLC version: 3.0.0-git

Re: Mini VLC preview in apps

Postby edwardw » 13 Mar 2013 22:12

I don't think this is supported in any way right now, but you can use Intents to fulfill this or a similar use-case :)

gregoiregentil
Blank Cone
Blank Cone
Posts: 27
Joined: 30 Jan 2013 07:48

Re: Mini VLC preview in apps

Postby gregoiregentil » 14 Mar 2013 07:18

Do what I have done: viewtopic.php?t=108078. Integrate the library andthe jni without any modification, do small modif in java code...

edwardw
Big Cone-huna
Big Cone-huna
Posts: 2346
Joined: 24 Jun 2012 23:36
VLC version: 3.0.0-git

Re: Mini VLC preview in apps

Postby edwardw » 14 Mar 2013 12:23

Yes, and violate the GPL... great idea.

AndroidMatth
New Cone
New Cone
Posts: 5
Joined: 13 Mar 2013 20:52

Re: Mini VLC preview in apps

Postby AndroidMatth » 14 Mar 2013 14:09

Thank's for your answer, I'll take a look to use Intent.

AndroidMatth
New Cone
New Cone
Posts: 5
Joined: 13 Mar 2013 20:52

Re: Mini VLC preview in apps

Postby AndroidMatth » 23 Mar 2013 14:02

Hello,

I'll finally try to use direclty Libvlc.
I have take a look at the topic : viewtopic.php?t=108078

But I have a problem with the project.

- I compile successfuly vlc android.
- I create a new test project with the differents classes


and when I start the project I have the following exceptions :

Code: Select all

03-23 12:45:08.673: D/dalvikvm(1650): Trying to load lib /data/data/com.mypackage.testvlc/lib/libiomx-gingerbread.so 0x40514678 03-23 12:45:08.673: D/dalvikvm(1650): Added shared lib /data/data/com.mypackage.testvlc/lib/libiomx-gingerbread.so 0x40514678 03-23 12:45:08.673: D/dalvikvm(1650): No JNI_OnLoad found in /data/data/com.mypackage.testvlc/lib/libiomx-gingerbread.so 0x40514678, skipping init 03-23 12:45:08.683: D/dalvikvm(1650): Trying to load lib /data/data/com.mypackage.testvlc/lib/libvlcjni.so 0x40514678 03-23 12:45:08.703: D/dalvikvm(1650): Added shared lib /data/data/com.mypackage.testvlc/lib/libvlcjni.so 0x40514678 03-23 12:45:08.703: V/VLC/LibVLC(1650): Initializing LibVLC 03-23 12:45:08.703: D/AndroidRuntime(1650): Shutting down VM 03-23 12:45:08.703: W/dalvikvm(1650): threadid=1: thread exiting with uncaught exception (group=0x40015560) 03-23 12:45:08.723: E/AndroidRuntime(1650): FATAL EXCEPTION: main 03-23 12:45:08.723: E/AndroidRuntime(1650): java.lang.IllegalStateException: Could not execute method of the activity 03-23 12:45:08.723: E/AndroidRuntime(1650): at android.view.View$1.onClick(View.java:2144) 03-23 12:45:08.723: E/AndroidRuntime(1650): at android.view.View.performClick(View.java:2485) 03-23 12:45:08.723: E/AndroidRuntime(1650): at android.view.View$PerformClick.run(View.java:9153) 03-23 12:45:08.723: E/AndroidRuntime(1650): at android.os.Handler.handleCallback(Handler.java:587) 03-23 12:45:08.723: E/AndroidRuntime(1650): at android.os.Handler.dispatchMessage(Handler.java:92) 03-23 12:45:08.723: E/AndroidRuntime(1650): at android.os.Looper.loop(Looper.java:123) 03-23 12:45:08.723: E/AndroidRuntime(1650): at android.app.ActivityThread.main(ActivityThread.java:3647) 03-23 12:45:08.723: E/AndroidRuntime(1650): at java.lang.reflect.Method.invokeNative(Native Method) 03-23 12:45:08.723: E/AndroidRuntime(1650): at java.lang.reflect.Method.invoke(Method.java:507) 03-23 12:45:08.723: E/AndroidRuntime(1650): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 03-23 12:45:08.723: E/AndroidRuntime(1650): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 03-23 12:45:08.723: E/AndroidRuntime(1650): at dalvik.system.NativeStart.main(Native Method) 03-23 12:45:08.723: E/AndroidRuntime(1650): Caused by: java.lang.reflect.InvocationTargetException 03-23 12:45:08.723: E/AndroidRuntime(1650): at java.lang.reflect.Method.invokeNative(Native Method) 03-23 12:45:08.723: E/AndroidRuntime(1650): at java.lang.reflect.Method.invoke(Method.java:507) 03-23 12:45:08.723: E/AndroidRuntime(1650): at android.view.View$1.onClick(View.java:2139) 03-23 12:45:08.723: E/AndroidRuntime(1650): ... 11 more 03-23 12:45:08.723: E/AndroidRuntime(1650): Caused by: java.lang.NullPointerException 03-23 12:45:08.723: E/AndroidRuntime(1650): at org.videolan.vlc.VLCApplication.getAppResources(VLCApplication.java:93) 03-23 12:45:08.723: E/AndroidRuntime(1650): at org.videolan.vlc.Util.readAsset(Util.java:100) 03-23 12:45:08.723: E/AndroidRuntime(1650): at org.videolan.vlc.Util.hasCompatibleCPU(Util.java:279) 03-23 12:45:08.723: E/AndroidRuntime(1650): at org.videolan.vlc.LibVLC.init(LibVLC.java:195) 03-23 12:45:08.723: E/AndroidRuntime(1650): at org.videolan.vlc.LibVLC.getInstance(LibVLC.java:98) 03-23 12:45:08.723: E/AndroidRuntime(1650): at org.videolan.vlc.VideoPlayerActivity.BTN_LoadVLC_click(VideoPlayerActivity.java:47) 03-23 12:45:08.723: E/AndroidRuntime(1650): ... 14 more
I start initialize libvlc on button click : BTN_LoadVLC_click()
The VLCApplication instance is not initialise anywhere ? When getAppResources() method is calling a NullPointerExcption is throw. :?

Maybe someone have an idea ?

Thank's

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: Mini VLC preview in apps

Postby Jean-Baptiste Kempf » 23 Mar 2013 20:36

Good point, that is a bug.
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.

edwardw
Big Cone-huna
Big Cone-huna
Posts: 2346
Joined: 24 Jun 2012 23:36
VLC version: 3.0.0-git

Re: Mini VLC preview in apps

Postby edwardw » 23 Mar 2013 20:41

VLCApplication.java does not have a line 93...

AndroidMatth
New Cone
New Cone
Posts: 5
Joined: 13 Mar 2013 20:52

Re: Mini VLC preview in apps

Postby AndroidMatth » 23 Mar 2013 23:13

At line 89 in the original file ... When I call getAppResources().

edwardw
Big Cone-huna
Big Cone-huna
Posts: 2346
Joined: 24 Jun 2012 23:36
VLC version: 3.0.0-git

Re: Mini VLC preview in apps

Postby edwardw » 23 Mar 2013 23:20

According to Android documentation: http://developer.android.com/reference/ ... eate%28%29
Called when the application is starting, before any activity, service, or receiver objects (excluding content providers) have been created.
Probably you are missing <application android:name="org.videolan.vlc.VLCApplication"> in your AndroidManifest.xml or something.

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: Mini VLC preview in apps

Postby Jean-Baptiste Kempf » 24 Mar 2013 23:34

This is totally wrong anyway, because Libvlc.java should not call VLCApplication
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.

edwardw
Big Cone-huna
Big Cone-huna
Posts: 2346
Joined: 24 Jun 2012 23:36
VLC version: 3.0.0-git

Re: Mini VLC preview in apps

Postby edwardw » 25 Mar 2013 03:15

Well, the current purpose of VLC for Android is to be a player, not a VLC SDK. Maybe that will be implemented later on, when we have VLC fully functioning and completely fast and stable.

AndroidMatth
New Cone
New Cone
Posts: 5
Joined: 13 Mar 2013 20:52

Re: Mini VLC preview in apps

Postby AndroidMatth » 25 Mar 2013 13:27

Thank's for your answer.

I call the VLCApplication constructor, pending a stable version, I can use Libvlc alone.

However, when I call readMedia() that apparent works but I have no video ...
I have a lot of warnings : yuv_rgb_neon filter can't get output picture
That's a problem with hardware decoding ? (when I use directly VLC apps, with the same stream that works fine) :?

I have also an error before the warning :

Code: Select all

E/VLC(1360): [0x2c3744]: main vout display Failed to set on top
May be that the cause ?

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: Mini VLC preview in apps

Postby Jean-Baptiste Kempf » 25 Mar 2013 13:38

Well, the current purpose of VLC for Android is to be a player, not a VLC SDK.
<ref needed>
It was clearly one of the purposes when the project was started.
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 59 guests