pad, task: improve debug logging
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Thu, 8 Mar 2012 16:30:49 +0000 (16:30 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Thu, 8 Mar 2012 16:30:49 +0000 (16:30 +0000)
gst/gstpad.c
gst/gsttask.c

index ef28bf5..f99bd7d 100644 (file)
@@ -5596,7 +5596,7 @@ gst_pad_start_task (GstPad * pad, GstTaskFunction func, gpointer data)
     task = gst_task_create (func, data);
     gst_task_set_lock (task, GST_PAD_GET_STREAM_LOCK (pad));
     gst_task_set_thread_callbacks (task, &thr_callbacks, pad, NULL);
-    GST_DEBUG_OBJECT (pad, "created task");
+    GST_INFO_OBJECT (pad, "created task %p", task);
     GST_PAD_TASK (pad) = task;
     gst_object_ref (task);
     /* release lock to post the message */
index 4aae349..1f72e92 100644 (file)
@@ -306,7 +306,8 @@ gst_task_func (GstTask * task)
 
         t = g_static_rec_mutex_unlock_full (lock);
         if (t <= 0) {
-          g_warning ("wrong STREAM_LOCK count %d", t);
+          g_warning ("wrong STREAM_LOCK count %d for lock %p on task %p", t,
+              lock, task);
         }
         GST_TASK_SIGNAL (task);
         GST_TASK_WAIT (task);
@@ -443,6 +444,7 @@ gst_task_set_lock (GstTask * task, GStaticRecMutex * mutex)
   GST_OBJECT_LOCK (task);
   if (G_UNLIKELY (task->running))
     goto is_running;
+  GST_INFO ("setting stream lock %p on task %p", mutex, task);
   GST_TASK_GET_LOCK (task) = mutex;
   GST_OBJECT_UNLOCK (task);