From 70242780c3d2c90caf7281fea3768e0fd55a33cd Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Thu, 6 Sep 2012 13:13:44 +0200 Subject: [PATCH] Testing logging facilities --- gst-sdk/tutorials/android-tutorial-1/jni/tutorial-1.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gst-sdk/tutorials/android-tutorial-1/jni/tutorial-1.c b/gst-sdk/tutorials/android-tutorial-1/jni/tutorial-1.c index c95a78e3fa..5a115ffcad 100755 --- a/gst-sdk/tutorials/android-tutorial-1/jni/tutorial-1.c +++ b/gst-sdk/tutorials/android-tutorial-1/jni/tutorial-1.c @@ -18,6 +18,9 @@ #include #include +GST_DEBUG_CATEGORY_STATIC (debug_category); +#define GST_CAT_DEFAULT debug_category + jstring Java_com_gst_1sdk_1tutorials_tutorial_11_Tutorial1_gstVersion (JNIEnv* env, jobject thiz ) @@ -27,6 +30,7 @@ Java_com_gst_1sdk_1tutorials_tutorial_11_Tutorial1_gstVersion (JNIEnv* env, GList *original_plugin_list = gst_registry_get_plugin_list (gst_registry_get_default()); GList *plugin_list = original_plugin_list; + GST_DEBUG ("Preparing to dump plugin list"); buffer = g_strdup_printf ("Version: %s\n", gst_version_string()); while (plugin_list) { GstPlugin *plugin = (GstPlugin *)plugin_list->data; @@ -48,9 +52,14 @@ Java_com_gst_1sdk_1tutorials_tutorial_11_Tutorial1_gstVersion (JNIEnv* env, } gst_plugin_feature_list_free (original_features_list); } + GST_DEBUG ("Plugin list dumped"); gst_plugin_list_free (original_plugin_list); ret = (*env)->NewStringUTF(env, buffer); g_free (buffer); return ret; } +jint JNI_OnLoad(JavaVM *vm, void *reserved) { + GST_DEBUG_CATEGORY_INIT (debug_category, "tutorial-1", 0, "Android tutorial 1"); + return JNI_VERSION_1_4; +}