pad, task: improve debug logging

This commit is contained in:
Tim-Philipp Müller 2012-03-08 16:30:49 +00:00
parent c683e39429
commit 4d2adb0249
2 changed files with 4 additions and 2 deletions

View file

@ -5596,7 +5596,7 @@ gst_pad_start_task (GstPad * pad, GstTaskFunction func, gpointer data)
task = gst_task_create (func, data); task = gst_task_create (func, data);
gst_task_set_lock (task, GST_PAD_GET_STREAM_LOCK (pad)); gst_task_set_lock (task, GST_PAD_GET_STREAM_LOCK (pad));
gst_task_set_thread_callbacks (task, &thr_callbacks, pad, NULL); 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_PAD_TASK (pad) = task;
gst_object_ref (task); gst_object_ref (task);
/* release lock to post the message */ /* release lock to post the message */

View file

@ -306,7 +306,8 @@ gst_task_func (GstTask * task)
t = g_static_rec_mutex_unlock_full (lock); t = g_static_rec_mutex_unlock_full (lock);
if (t <= 0) { 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_SIGNAL (task);
GST_TASK_WAIT (task); GST_TASK_WAIT (task);
@ -443,6 +444,7 @@ gst_task_set_lock (GstTask * task, GStaticRecMutex * mutex)
GST_OBJECT_LOCK (task); GST_OBJECT_LOCK (task);
if (G_UNLIKELY (task->running)) if (G_UNLIKELY (task->running))
goto is_running; goto is_running;
GST_INFO ("setting stream lock %p on task %p", mutex, task);
GST_TASK_GET_LOCK (task) = mutex; GST_TASK_GET_LOCK (task) = mutex;
GST_OBJECT_UNLOCK (task); GST_OBJECT_UNLOCK (task);