I got an error trying to use libvlc into an android application.
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);
String file = LibVLC.PathToURI(media.toString());
Log.d(TAG, file);
libvlc.playMRL(file);
Code: Select all
libvlc.playMRL(file);
The file exists and it works correctly in a VideoView.05-16 01:12:49.344 5952-6638/com.fox.red.provavlc E/VLC﹕ [ab7dd2b4] core input: open of `file:///content://com.android.providers.media.documents/document/video%3A134' failed
05-16 01:12:49.344 5952-6638/com.fox.red.provavlc E/VLC﹕ [ab7dd2b4] core input: Your input can't be opened
05-16 01:12:49.344 5952-6638/com.fox.red.provavlc E/VLC﹕ [ab7dd2b4] core input: VLC is unable to open the MRL 'file:///content://com.android.providers.media.documents/document/video%3A134'. Check the log for details.
I pickup the video from the android library.