I must be missing something because if i run the vlc-android application it works.
I thought it was a fault due to the file location but then i the location string from the vlc app using the logging system but it doesn't work anyway.
Quite strange there must be some parameter to set before call
Code: Select all
libvlc.playMRL(videoMedia.getMrl());
Code: Select all
// Create a new media player
libvlc = new LibVLC();
libvlc.init(this);
libvlc.setHardwareAcceleration(LibVLC.HW_ACCELERATION_DISABLED);
libvlc.setSubtitlesEncoding("");
libvlc.setAout(LibVLC.AOUT_OPENSLES);
libvlc.setTimeStretching(true);
libvlc.setVerboseMode(true);
if(LibVlcUtil.isGingerbreadOrLater())
libvlc.setVout(LibVLC.VOUT_ANDROID_WINDOW);
else
libvlc.setVout(LibVLC.VOUT_ANDROID_SURFACE);
EventHandler.getInstance().addHandler(mHandler);
holder.setKeepScreenOn(true);
Media videoMedia = new Media(libvlc, "file:///storage/emulated/0/DCIM/Camera/20150513_005427.mp4");
String[] options = libvlc.getMediaOptions(0);
Log.d(TAG, options.toString());
libvlc.playMRL(videoMedia.getMrl());
core input: open of `file:///storage/emulated/0/DCIM/Camera/20150513_005427.mp4' failed
core input: Your input can't be opened
core input: VLC is unable to open the MRL 'file:///storage/emulated/0/DCIM/Camera/20150513_005427.mp4'. Check the log for details.