mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-05 23:18:47 +00:00
webrtc/android: initialize the debug category
Fixes possible critical/crash on startup Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/25>
This commit is contained in:
parent
101d9965e5
commit
8b4d156712
2 changed files with 4 additions and 2 deletions
|
@ -822,6 +822,8 @@ native_class_init (JNIEnv * env, jclass klass)
|
||||||
__android_log_print (ANDROID_LOG_ERROR, "GstPlayer", "%s", message);
|
__android_log_print (ANDROID_LOG_ERROR, "GstPlayer", "%s", message);
|
||||||
(*env)->ThrowNew (env, exception_class, message);
|
(*env)->ThrowNew (env, exception_class, message);
|
||||||
}
|
}
|
||||||
|
GST_DEBUG_CATEGORY_INIT (debug_category, "webrtc", 0,
|
||||||
|
"GStreamer Android WebRTC");
|
||||||
//gst_debug_set_threshold_from_string ("gl*:7", FALSE);
|
//gst_debug_set_threshold_from_string ("gl*:7", FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -905,7 +907,7 @@ JNI_OnLoad (JavaVM * vm, void *reserved)
|
||||||
java_vm = vm;
|
java_vm = vm;
|
||||||
|
|
||||||
if ((*vm)->GetEnv (vm, (void **) &env, JNI_VERSION_1_4) != JNI_OK) {
|
if ((*vm)->GetEnv (vm, (void **) &env, JNI_VERSION_1_4) != JNI_OK) {
|
||||||
__android_log_print (ANDROID_LOG_ERROR, "GstPlayer",
|
__android_log_print (ANDROID_LOG_ERROR, "GstWebRTC",
|
||||||
"Could not retrieve JNIEnv");
|
"Could not retrieve JNIEnv");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue