[Gstreamer-openmax] [PATCH 04/10] add some debug traces
Rob Clark
rob at ti.com
Sun Mar 7 15:14:51 PST 2010
---
omx/gstomx_util.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/omx/gstomx_util.c b/omx/gstomx_util.c
index efe953d..b6633e4 100644
--- a/omx/gstomx_util.c
+++ b/omx/gstomx_util.c
@@ -157,6 +157,9 @@ imp_new (const gchar *name)
void *handle;
imp->dl_handle = handle = dlopen (name, RTLD_LAZY);
+
+ GST_DEBUG ("dlopen(%s) -> %p", name, handle);
+
if (!handle)
{
g_warning ("%s\n", dlerror ());
@@ -307,6 +310,9 @@ g_omx_core_init (GOmxCore *core)
if (core->omx_handle)
return;
+ GST_DEBUG_OBJECT (core->object, "loading: %s (%s)",
+ core->component_name, core->library_name);
+
core->imp = request_imp (core->library_name);
if (!core->imp)
@@ -316,6 +322,10 @@ g_omx_core_init (GOmxCore *core)
(char *) core->component_name,
core,
&callbacks);
+
+ GST_DEBUG_OBJECT (core->object, "OMX_GetHandle(&%p) -> %d",
+ core->omx_handle, core->omx_error);
+
if (!core->omx_error)
core->omx_state = OMX_StateLoaded;
}
@@ -332,6 +342,8 @@ g_omx_core_deinit (GOmxCore *core)
if (core->omx_handle)
{
core->omx_error = core->imp->sym_table.free_handle (core->omx_handle);
+ GST_DEBUG_OBJECT (core->object, "OMX_FreeHandle(%p) -> %d",
+ core->omx_handle, core->omx_error);
core->omx_handle = NULL;
}
}
@@ -530,6 +542,10 @@ g_omx_port_setup (GOmxPort *port,
port->num_buffers = omx_port->nBufferCountActual;
port->buffer_size = omx_port->nBufferSize;
+ GST_DEBUG_OBJECT (port->core->object,
+ "type=%d, num_buffers=%d, buffer_size=%ld, port_index=%d",
+ port->type, port->num_buffers, port->buffer_size, port->port_index);
+
g_free (port->buffers);
port->buffers = g_new0 (OMX_BUFFERHEADERTYPE *, port->num_buffers);
}
@@ -862,6 +878,8 @@ EventHandler (OMX_HANDLETYPE omx_handle,
cmd = (OMX_COMMANDTYPE) data_1;
+ GST_DEBUG_OBJECT (core->object, "OMX_EventCmdComplete: %d", cmd);
+
switch (cmd)
{
case OMX_CommandStateSet:
@@ -880,6 +898,7 @@ EventHandler (OMX_HANDLETYPE omx_handle,
}
case OMX_EventBufferFlag:
{
+ GST_DEBUG_OBJECT (core->object, "OMX_EventBufferFlag");
if (data_2 & OMX_BUFFERFLAG_EOS)
{
g_omx_core_set_done (core);
@@ -888,6 +907,7 @@ EventHandler (OMX_HANDLETYPE omx_handle,
}
case OMX_EventPortSettingsChanged:
{
+ GST_DEBUG_OBJECT (core->object, "OMX_EventPortSettingsChanged");
/** @todo only on the relevant port. */
if (core->settings_changed_cb)
{
--
1.6.3.2
More information about the Gstreamer-openmax
mailing list