I am developping an App that use libVLC to display MP4 videos. I recompile libVLC two weeks ago in order to get le lastest version.
To manage libVLC, I have created a customView that inherits from SurfaceView. When the customView is attached to the Window (onAttachedToWindow() method), I initialize libVLC with that code :
Code: Select all
private void initVlcPlayer() throws LibVlcException {
libVLC = new LibVLC();
libVLC.setHardwareAcceleration(LibVLC.HW_ACCELERATION_DISABLED);
libVLC.setSubtitlesEncoding("");
libVLC.setTimeStretching(false);
libVLC.setFrameSkip(false);
libVLC.setAout(LibVLC.AOUT_OPENSLES);
libVLC.setVout(LibVLC.VOUT_ANDROID_SURFACE);
libVLC.setChroma("RV32");
libVLC.setDevHardwareDecoder(LibVLC.DEV_HW_DECODER_AUTOMATIC);
libVLC.setVerboseMode(true);
EventHandler.getInstance().addHandler(videoPlayerHandler);
libVLC.init(getContext());
}
Code: Select all
private void release() {
if (libVLC != null) {
if (libVLC.isPlaying()) {
stopVideo();
}
EventHandler.getInstance().removeHandler(videoPlayerHandler);
videoPlayerHandler.removeCallbacksAndMessages(null);
libVLC.detachSurface();
libVLC.destroy();
videoPlayerHandler = null;
libVLC = null;
videoHeight = 0;
videoWidth = 0;
Log.i(LOG_TAG, " VLC Player instance released");
}
}
Code: Select all
W/art﹕ Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?): Thread[29,tid=1382,Native,Thread*=0xaee7a400,peer=0x135270e0,"libvlcjni"]
I don't think it is a normal behavior, so I post here.
Do you have any ideas?
Maybe I make a bad init/release of libVLC. Dealing with libVLC without real doc is hard...
Thanks in advance for your answers and for all the work you have made and you are still making!
Valentin