summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.com>2019-03-25 16:30:11 +0100
committerGuillaume Desmottes <guillaume.desmottes@collabora.com>2019-03-26 15:15:21 +0100
commit7d1b77b0c44badaa4442e2990436fe1366028cf1 (patch)
tree5ca1e9c239e952ac091ea30e939ef61e8f81bf83
parent01bf661d6e8256d1d888a36b5ac5ac4de0ad8119 (diff)
downloadgst-omx-7d1b77b0c44badaa4442e2990436fe1366028cf1.tar.gz
omx: disable OMX_API_TRACE code if gst debug is disabled
No need to create debug structs which won't be used as DEBUG macros are no-op.
-rw-r--r--omx/gstomx.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/omx/gstomx.c b/omx/gstomx.c
index 527b5e8..49743c0 100644
--- a/omx/gstomx.c
+++ b/omx/gstomx.c
@@ -612,6 +612,7 @@ static void
log_omx_api_trace_event (GstOMXComponent * comp, OMX_EVENTTYPE event,
guint32 data1, guint32 data2, gpointer event_data)
{
+#ifndef GST_DISABLE_GST_DEBUG
GstStructure *s;
/* Don't bother creating useless structs if not needed */
@@ -629,6 +630,7 @@ log_omx_api_trace_event (GstOMXComponent * comp, OMX_EVENTTYPE event,
GST_CAT_DEBUG_OBJECT (OMX_API_TRACE, comp->parent, "%" GST_PTR_FORMAT, s);
gst_structure_free (s);
+#endif /* GST_DISABLE_GST_DEBUG */
}
static OMX_ERRORTYPE
@@ -801,6 +803,7 @@ static void
log_omx_api_trace_buffer (GstOMXComponent * comp, const gchar * event,
GstOMXBuffer * buf)
{
+#ifndef GST_DISABLE_GST_DEBUG
GstStructure *s;
/* Don't bother creating useless structs if not needed */
@@ -838,6 +841,7 @@ log_omx_api_trace_buffer (GstOMXComponent * comp, const gchar * event,
GST_CAT_TRACE_OBJECT (OMX_API_TRACE, comp->parent, "%" GST_PTR_FORMAT, s);
gst_structure_free (s);
+#endif /* GST_DISABLE_GST_DEBUG */
}
static OMX_ERRORTYPE
@@ -1107,6 +1111,7 @@ static void
log_omx_api_trace_send_command (GstOMXComponent * comp, OMX_COMMANDTYPE cmd,
guint32 param, gpointer cmd_data)
{
+#ifndef GST_DISABLE_GST_DEBUG
GstStructure *s;
/* Don't bother creating useless structs if not needed */
@@ -1123,6 +1128,7 @@ log_omx_api_trace_send_command (GstOMXComponent * comp, OMX_COMMANDTYPE cmd,
GST_CAT_DEBUG_OBJECT (OMX_API_TRACE, comp->parent, "%" GST_PTR_FORMAT, s);
gst_structure_free (s);
+#endif /* GST_DISABLE_GST_DEBUG */
}
static OMX_ERRORTYPE