From 88954a65995533eda2eb176422dde5263c54a013 Mon Sep 17 00:00:00 2001 From: Raymond Yang Date: Tue, 7 Feb 2023 16:02:56 +0800 Subject: [PATCH] =?UTF-8?q?GStreamer=E6=9B=B4=E6=96=B0=E5=88=B01.22.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gstreamer_player/jni/gst_player.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/gstreamer_player/jni/gst_player.c b/gstreamer_player/jni/gst_player.c index 80a5fe9..14c888c 100644 --- a/gstreamer_player/jni/gst_player.c +++ b/gstreamer_player/jni/gst_player.c @@ -196,8 +196,7 @@ static void state_changed_cb(GstBus *bus, GstMessage *msg, CustomData *data) { /* Only pay attention to messages coming from the pipeline, not its children */ if (GST_MESSAGE_SRC (msg) == GST_OBJECT (data->pipeline)) { data->state = new_state; - gchar *message = g_strdup_printf("State changed to %s", - gst_element_state_get_name(new_state)); + gchar *message = g_strdup_printf("State changed to %s", gst_element_state_get_name(new_state)); set_ui_message(message, data); g_free(message); @@ -217,9 +216,7 @@ static void state_changed_cb(GstBus *bus, GstMessage *msg, CustomData *data) { static void check_initialization_complete(CustomData *data) { JNIEnv *env = get_jni_env(); if (!data->initialized && data->native_window && data->main_loop) { - GST_DEBUG - ("Initialization complete, notifying application. native_window:%p main_loop:%p", - data->native_window, data->main_loop); + GST_DEBUG("Initialization complete, notifying application. native_window:%p main_loop:%p", data->native_window, data->main_loop); /* The main loop is running and we received a native window, inform the sink about it */ gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY (data->pipeline), @@ -311,8 +308,7 @@ static void *app_function(void *userdata) { static void gst_native_init(JNIEnv *env, jobject thiz) { CustomData *data = g_new0 (CustomData, 1); SET_CUSTOM_DATA (env, thiz, custom_data_field_id, data); - GST_DEBUG_CATEGORY_INIT (debug_category, "player", 0, - "Android tutorial 5"); + GST_DEBUG_CATEGORY_INIT (debug_category, "player", 0, "HI SHARP DX RTSP Player"); gst_debug_set_threshold_for_name("player", GST_LEVEL_DEBUG); GST_DEBUG ("Created CustomData at %p", data); data->app = (*env)->NewGlobalRef(env, thiz); @@ -455,8 +451,7 @@ jint 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, "player", - "Could not retrieve JNIEnv"); + __android_log_print(ANDROID_LOG_ERROR, "player", "Could not retrieve JNIEnv"); return 0; } jclass klass = (*env)->FindClass(env, "com/hisharp/gstreamer_player/GstLibrary");