/** * Destructor: * It is bad practice to rely on them, so please don't forget to call * destroy() before exiting. */ @Override protected void finalize() { if (mLibVlcInstance != 0) { Log.d(TAG, "LibVLC is was destroyed yet before finalize()"); destroy(); } }
public static synchronized void restartInstance(Context context) { if (sInstance != null) { try { sInstance.destroy(); sInstance.init(context); } catch (LibVlcException lve) { Log.e(TAG, "Unable to reinit libvlc: " + lve); } } }
public void restart(Context context) { try { this.destroy(); this.init(context); } catch (LibVlcException lve) { Log.e(TAG, "Unable to reinit libvlc: " + lve); } }
public void releasePlayer() { if (libvlc == null) return; mEventHandler.removeHandler(mHandler); libvlc.stop(); libvlc.detachSurface(); libvlc.closeAout(); libvlc.destroy(); libvlc = null; mVideoWidth = 0; mVideoHeight = 0; }
public void releasePlayer() { if (libvlc == null) return; mEventHandler.removeHandler(mHandler); libvlc.stop(); libvlc.detachSurface(); holder = null; libvlc.closeAout(); libvlc.destroy(); libvlc = null; mVideoWidth = 0; mVideoHeight = 0; }