Beispiel #1
0
PJ_DECL(pj_status_t) csipsimple_destroy(unsigned flags) {
	destroy_ringback_tone();

#if PJMEDIA_HAS_VIDEO
	unsigned i;
	for (i = 0; i < css_var.extra_vid_codecs_cnt; i++) {
		dynamic_factory *codec = &css_var.extra_vid_codecs_destroy[i];
		pj_status_t (*destroy_factory)() = get_library_factory(codec);
		if(destroy_factory != NULL){
			pj_status_t status = destroy_factory();
			if(status != PJ_SUCCESS) {
				PJ_LOG(2, (THIS_FILE,"Error loading dynamic codec plugin"));
			}
    	}
	}
#endif

	if (css_var.pool) {
		pj_pool_release(css_var.pool);
		css_var.pool = NULL;
	}
	if(css_var.context){
		JNIEnv *jni_env = 0;
		ATTACH_JVM(jni_env);
		(*jni_env)->DeleteGlobalRef(jni_env, css_var.context);
		DETACH_JVM(jni_env);
	}
	return (pj_status_t) pjsua_destroy2(flags);
}
Beispiel #2
0
PJ_DECL(pj_status_t) csipsimple_destroy(void){
	destroy_ringback_tone();
	return (pj_status_t) pjsua_destroy();
}