Libvlc Android and exception handling

This forum is about all development around libVLC.
Greg767
New Cone
New Cone
Posts: 2
Joined: 17 May 2016 09:40

Libvlc Android and exception handling

Postby Greg767 » 17 May 2016 09:47

Hi,

I cannot find any info on how to handle errors like this:

E/VLC: [7126d274] core input: Your input can't be opened
E/VLC: [7126d274] core input: VLC is unable to open the MRL ...

This makes the activity crash when I try to load another URI. So I'd like to release and recreate the player when this arrives.

Thanks

Greg767
New Cone
New Cone
Posts: 2
Joined: 17 May 2016 09:40

Re: Libvlc Android and exception handling

Postby Greg767 » 24 May 2016 13:08

I am wondering why there is no reply to this question. I searched and haven't find anything about this. Could a libvlc dev please chime in and point me to the right direction?
Just to make sure its clear, I don't want a solution for the crash. I just want to know how to handle VLC errors.

Thank you.

pecana
Cone that earned his stripes
Cone that earned his stripes
Posts: 145
Joined: 27 Dec 2015 20:30

Re: Libvlc Android and exception handling

Postby pecana » 07 Jun 2016 10:30

Hello I think you should implements MediaPlayer.EventListener in your video activity and override the OnEvent method:

Code: Select all

@Override public void onEvent(MediaPlayer.Event event) { switch (event.type) { case MediaPlayer.Event.EndReached: break; case MediaPlayer.Event.Buffering: break; case MediaPlayer.Event.Playing: break; case MediaPlayer.Event.Paused: break; case MediaPlayer.Event.Stopped: break; case MediaPlayer.Event.Opening: break; case MediaPlayer.Event.PositionChanged: break; case MediaPlayer.Event.EncounteredError: break; default: break; } }


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 27 guests