tests: cleanup some code

This commit is contained in:
Wim Taymans 2009-04-23 19:41:01 +02:00 committed by Wim Taymans
parent 4b604f7da6
commit 1cf54ede9d

View file

@ -45,6 +45,7 @@ sync_bus_handler (GstBus * bus, GstMessage * message, GstElement * bin)
GstElement *owner; GstElement *owner;
const GValue *val; const GValue *val;
gchar *path; gchar *path;
GstTask *task = NULL;
g_message ("received STREAM_STATUS"); g_message ("received STREAM_STATUS");
gst_message_parse_stream_status (message, &type, &owner); gst_message_parse_stream_status (message, &type, &owner);
@ -61,20 +62,21 @@ sync_bus_handler (GstBus * bus, GstMessage * message, GstElement * bin)
g_message ("object: type %s, value %p", G_VALUE_TYPE_NAME (val), g_message ("object: type %s, value %p", G_VALUE_TYPE_NAME (val),
g_value_get_object (val)); g_value_get_object (val));
/* see if we know how to deal with this object */
if (G_VALUE_TYPE (val) == GST_TYPE_TASK) {
task = g_value_get_object (val);
}
switch (type) { switch (type) {
case GST_STREAM_STATUS_TYPE_CREATE:
g_message ("created task %p", task);
break;
case GST_STREAM_STATUS_TYPE_ENTER: case GST_STREAM_STATUS_TYPE_ENTER:
{ if (task) {
/* see if we know how to deal with this object */ g_message ("raising task priority for %p", task);
if (G_VALUE_TYPE (val) == GST_TYPE_TASK) {
GstTask *task;
task = g_value_get_object (val);
g_message ("raising task priority");
gst_task_set_priority (task, G_THREAD_PRIORITY_HIGH); gst_task_set_priority (task, G_THREAD_PRIORITY_HIGH);
} }
break; break;
}
case GST_STREAM_STATUS_TYPE_LEAVE: case GST_STREAM_STATUS_TYPE_LEAVE:
break; break;
default: default: