emotion: better debug infrastructure.

SVN revision: 63039
This commit is contained in:
Cedric BAIL 2011-08-31 15:51:50 +00:00
parent e1e28d7ba4
commit 5586b1ed11
2 changed files with 21 additions and 4 deletions

View File

@ -1474,9 +1474,10 @@ _eos_main_fct(void *data)
case GST_MESSAGE_STREAM_STATUS:
break;
default:
ERR("bus say: %s [%i]",
ERR("bus say: %s [%i - %s]",
GST_MESSAGE_SRC_NAME(msg),
GST_MESSAGE_TYPE(msg));
GST_MESSAGE_TYPE(msg),
GST_MESSAGE_TYPE_NAME(msg));
break;
}
@ -1502,10 +1503,22 @@ _eos_sync_fct(GstBus *bus, GstMessage *msg, gpointer data)
break;
case GST_MESSAGE_STATE_CHANGED:
{
GstState old_state, new_state;
gst_message_parse_state_changed (msg, &old_state, &new_state, NULL);
INF("Element %s changed state from %s to %s.",
GST_OBJECT_NAME(msg->src),
gst_element_state_get_name(old_state),
gst_element_state_get_name(new_state));
break;
}
default:
WRN("bus say: %s [%i]",
WRN("bus say: %s [%i - %s]",
GST_MESSAGE_SRC_NAME(msg),
GST_MESSAGE_TYPE(msg));
GST_MESSAGE_TYPE(msg),
GST_MESSAGE_TYPE_NAME(msg));
break;
}

View File

@ -768,6 +768,8 @@ _emotion_gstreamer_cancel(void *data, Ecore_Thread *thread)
ev->threads = eina_list_remove(ev->threads, thread);
if (getenv("EMOTION_GSTREAMER_DOT")) GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(GST_BIN(ev->pipeline), GST_DEBUG_GRAPH_SHOW_ALL, getenv("EMOTION_GSTREAMER_DOT"));
if (ev->in == ev->out && ev->threads == NULL && ev->delete_me)
em_shutdown(ev);
}
@ -785,6 +787,8 @@ _emotion_gstreamer_end(void *data, Ecore_Thread *thread)
ev->play_started = 1;
}
if (getenv("EMOTION_GSTREAMER_DOT")) GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(GST_BIN(ev->pipeline), GST_DEBUG_GRAPH_SHOW_ALL, getenv("EMOTION_GSTREAMER_DOT"));
if (ev->in == ev->out && ev->threads == NULL && ev->delete_me)
em_shutdown(ev);
else