Android libvlc Error handler for load errors of differrent media types

This forum is about all development around libVLC.
gecko19
New Cone
New Cone
Posts: 2
Joined: 08 Mar 2021 23:20

Android libvlc Error handler for load errors of differrent media types

Postby gecko19 » 08 Mar 2021 23:38

Hello All,

I am new to the forum and I am hoping I am asking the right questions.

I have embedded libvlc in my Android app and it works perfect!
However, I wish to know if there are any android libvlc APIs I can use to determine if a media file can be played back without errors. I have this issue with some files where playback of the file causes a crash, I would like to warn the user that playing the content will cause a crash.

I used the MediaPlayer.setEventListener to listen for errors, yet no MediaPlayer.Event.EncounteredError are generated for these files.
Any ideas how I could handle this issue with differrent media gracefully.

Thanks,
G.

mfkl
Developer
Developer
Posts: 740
Joined: 13 Jun 2017 10:41

Re: Android libvlc Error handler for load errors of differrent media types

Postby mfkl » 09 Mar 2021 03:28

I wish to know if there are any android libvlc APIs I can use to determine if a media file can be played back without errors.
No. How would that be possible without playing the file?

The correct way would be to report the crash, and fix it.
https://mfkl.github.io

gecko19
New Cone
New Cone
Posts: 2
Joined: 08 Mar 2021 23:20

Re: Android libvlc Error handler for load errors of differrent media types

Postby gecko19 » 11 Mar 2021 15:35

Hello Mkfi,

Thanks for getting back to me. Sorry I did not clarify, I am able to load the video and start playback - however, while playing the video, libvlc crashes and I was hoping to get an error notification from MediaPlayer.EventListener registered to org.videolan.libvlc.MediaPlayer.setEventListener().

Any ideas why I am not getting any errors before the crash, I am sure the content is the culprit here - hoping there would be some mechanism I could use.

Thanks,
G.

mfkl
Developer
Developer
Posts: 740
Joined: 13 Jun 2017 10:41

Re: Android libvlc Error handler for load errors of differrent media types

Postby mfkl » 15 Mar 2021 02:18

Any ideas why I am not getting any errors before the crash, I am sure the content is the culprit here - hoping there would be some mechanism I could use..
Maybe it crashes before the event is sent, maybe no event is sent. Do share the full crash logs and media file if possible (and libvlc version used).
https://mfkl.github.io


Return to “Development around libVLC”

Who is online

Users browsing this forum: Google [Bot] and 11 guests