summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2020-06-26 16:19:03 +1000
committerMatthew Waters <matthew@centricular.com>2020-08-19 20:42:16 +1000
commit8b4d1567124a5ad6999cf00b90721bfdc659c261 (patch)
tree547b05319dd74586bd233cfdc46625174ea480ec
parent101d9965e54d380aa76f1c88372fc3374369ed9e (diff)
webrtc/android: initialize the debug category
Fixes possible critical/crash on startup Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/25>
-rw-r--r--webrtc/android/app/src/main/jni/Android.mk2
-rw-r--r--webrtc/android/app/src/main/jni/webrtc.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/webrtc/android/app/src/main/jni/Android.mk b/webrtc/android/app/src/main/jni/Android.mk
index c0ab0f8..326781d 100644
--- a/webrtc/android/app/src/main/jni/Android.mk
+++ b/webrtc/android/app/src/main/jni/Android.mk
@@ -31,7 +31,7 @@ GSTREAMER_NDK_BUILD_PATH := $(GSTREAMER_ROOT)/share/gst-android/ndk-build/
include $(GSTREAMER_NDK_BUILD_PATH)/plugins.mk
-GSTREAMER_PLUGINS_CORE_CUSTOM := coreelements app audioconvert audiorate audioresample videoconvert videorate videoscale videotestsrc volume
+GSTREAMER_PLUGINS_CORE_CUSTOM := coreelements app audioconvert audiorate audioresample videoconvert videorate videoscale videotestsrc volume
GSTREAMER_PLUGINS_CODECS_CUSTOM := videoparsersbad vpx opus audioparsers opusparse androidmedia
GSTREAMER_PLUGINS_NET_CUSTOM := tcp rtsp rtp rtpmanager udp srtp webrtc dtls nice
GSTREAMER_PLUGINS := $(GSTREAMER_PLUGINS_CORE_CUSTOM) $(GSTREAMER_PLUGINS_CODECS_CUSTOM) $(GSTREAMER_PLUGINS_NET_CUSTOM) \
diff --git a/webrtc/android/app/src/main/jni/webrtc.c b/webrtc/android/app/src/main/jni/webrtc.c
index e5b47fc..7a30dd9 100644
--- a/webrtc/android/app/src/main/jni/webrtc.c
+++ b/webrtc/android/app/src/main/jni/webrtc.c
@@ -822,6 +822,8 @@ native_class_init (JNIEnv * env, jclass klass)
__android_log_print (ANDROID_LOG_ERROR, "GstPlayer", "%s", 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);
}
@@ -905,7 +907,7 @@ JNI_OnLoad (JavaVM * vm, void *reserved)
java_vm = vm;
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");
return 0;
}