Example #1
0
void Java_org_videolan_libvlc_LibVLC_nativeDestroy(JNIEnv *env, jobject thiz) {
	destroy_native_crash_handler(env);

	releaseMediaPlayer(env, thiz);
	jlong libVlcInstance = getLong(env, thiz, "mLibVlcInstance");
	if (!libVlcInstance)
		return; // Already destroyed

	libvlc_instance_t *instance = (libvlc_instance_t*) (intptr_t) libVlcInstance;
	libvlc_log_unset(instance);
	libvlc_release(instance);

	setLong(env, thiz, "mLibVlcInstance", 0);
}
Example #2
0
 /**
  * Unsets the logging callback for a LibVLC instance. This is rarely
  * needed: the callback is implicitly unset when the instance is
  * destroyed. This function will wait for any pending callbacks
  * invocation to complete (causing a deadlock if called from within the
  * callback).
  *
  * \version LibVLC 2.1.0 or later
  */
 void logUnset()
 {
     libvlc_log_unset( *this );
 }