From 16a9559c022f95c7f967311a814eed3f7172357f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 8 Apr 2013 17:02:32 +0100 Subject: omx: fix printf formats in debug messages OMX_U32 is typedefed to an unsigned long, OMX_TICKS to a 64-bit integer. Conflicts: omx/gstomxvideodec.c --- omx/gstomx.c | 14 +++++++------- omx/gstomxaudioenc.c | 10 +++++----- omx/gstomxh263enc.c | 2 +- omx/gstomxh264enc.c | 2 +- omx/gstomxmpeg4videoenc.c | 2 +- omx/gstomxvideodec.c | 24 ++++++++++++------------ omx/gstomxvideoenc.c | 16 ++++++++-------- 7 files changed, 35 insertions(+), 35 deletions(-) diff --git a/omx/gstomx.c b/omx/gstomx.c index 8bd1435..343c723 100644 --- a/omx/gstomx.c +++ b/omx/gstomx.c @@ -288,7 +288,7 @@ gst_omx_component_handle_messages (GstOMXComponent * comp) OMX_U32 index = msg->content.port_settings_changed.port; GList *outports = NULL, *l, *k; - GST_DEBUG_OBJECT (comp->parent, "%s settings changed (port %u)", + GST_DEBUG_OBJECT (comp->parent, "%s settings changed (port %lu)", comp->name, index); /* FIXME: This probably can be done better */ @@ -334,7 +334,7 @@ gst_omx_component_handle_messages (GstOMXComponent * comp) if (!port) break; - GST_DEBUG_OBJECT (comp->parent, "%s port %u got buffer flags 0x%08x", + GST_DEBUG_OBJECT (comp->parent, "%s port %u got buffer flags 0x%08lx", comp->name, port->index, flags); if ((flags & OMX_BUFFERFLAG_EOS) && port->port_def.eDir == OMX_DirOutput) @@ -439,7 +439,7 @@ EventHandler (OMX_HANDLETYPE hComponent, OMX_PTR pAppData, OMX_EVENTTYPE eEvent, msg->type = GST_OMX_MESSAGE_FLUSH; msg->content.flush.port = nData2; - GST_DEBUG_OBJECT (comp->parent, "%s port %u flushed", comp->name, + GST_DEBUG_OBJECT (comp->parent, "%s port %lu flushed", comp->name, msg->content.flush.port); gst_omx_component_send_message (comp, msg); @@ -452,7 +452,7 @@ EventHandler (OMX_HANDLETYPE hComponent, OMX_PTR pAppData, OMX_EVENTTYPE eEvent, msg->type = GST_OMX_MESSAGE_PORT_ENABLE; msg->content.port_enable.port = nData2; msg->content.port_enable.enable = (cmd == OMX_CommandPortEnable); - GST_DEBUG_OBJECT (comp->parent, "%s port %u %s", comp->name, + GST_DEBUG_OBJECT (comp->parent, "%s port %lu %s", comp->name, msg->content.port_enable.port, (msg->content.port_enable.enable ? "enabled" : "disabled")); @@ -504,7 +504,7 @@ EventHandler (OMX_HANDLETYPE hComponent, OMX_PTR pAppData, OMX_EVENTTYPE eEvent, msg->type = GST_OMX_MESSAGE_PORT_SETTINGS_CHANGED; msg->content.port_settings_changed.port = index; - GST_DEBUG_OBJECT (comp->parent, "%s settings changed (port index: %d)", + GST_DEBUG_OBJECT (comp->parent, "%s settings changed (port index: %lu)", comp->name, msg->content.port_settings_changed.port); gst_omx_component_send_message (comp, msg); @@ -518,7 +518,7 @@ EventHandler (OMX_HANDLETYPE hComponent, OMX_PTR pAppData, OMX_EVENTTYPE eEvent, msg->type = GST_OMX_MESSAGE_BUFFER_FLAG; msg->content.buffer_flag.port = nData1; msg->content.buffer_flag.flags = nData2; - GST_DEBUG_OBJECT (comp->parent, "%s port %u got buffer flags 0x%08x", + GST_DEBUG_OBJECT (comp->parent, "%s port %lu got buffer flags 0x%08lx", comp->name, msg->content.buffer_flag.port, msg->content.buffer_flag.flags); @@ -1634,7 +1634,7 @@ gst_omx_port_allocate_buffers_unlocked (GstOMXPort * port, OMX_ErrorBadParameter); GST_INFO_OBJECT (comp->parent, - "Allocating %d buffers of size %u for %s port %u", n, + "Allocating %d buffers of size %lu for %s port %u", n, port->port_def.nBufferSize, comp->name, port->index); if (!port->buffers) diff --git a/omx/gstomxaudioenc.c b/omx/gstomxaudioenc.c index c927048..e9d881f 100644 --- a/omx/gstomxaudioenc.c +++ b/omx/gstomxaudioenc.c @@ -164,8 +164,8 @@ gst_omx_audio_enc_open (GstOMXAudioEnc * self) in_port_index = 0; out_port_index = 1; } else { - GST_DEBUG_OBJECT (self, "Detected %u ports, starting at %u", param.nPorts, - param.nStartPortNumber); + GST_DEBUG_OBJECT (self, "Detected %lu ports, starting at %lu", + param.nPorts, param.nStartPortNumber); in_port_index = param.nStartPortNumber + 0; out_port_index = param.nStartPortNumber + 1; } @@ -406,8 +406,8 @@ gst_omx_audio_enc_loop (GstOMXAudioEnc * self) goto eos; } - GST_DEBUG_OBJECT (self, "Handling buffer: 0x%08x %lu", buf->omx_buf->nFlags, - buf->omx_buf->nTimeStamp); + GST_DEBUG_OBJECT (self, "Handling buffer: 0x%08lx %" G_GUINT64_FORMAT, + buf->omx_buf->nFlags, (guint64) buf->omx_buf->nTimeStamp); /* This prevents a deadlock between the srcpad stream * lock and the videocodec stream lock, if ::reset() @@ -1034,7 +1034,7 @@ gst_omx_audio_enc_handle_frame (GstAudioEncoder * encoder, GstBuffer * inbuf) full_buffer: { GST_ELEMENT_ERROR (self, LIBRARY, FAILED, (NULL), - ("Got OpenMAX buffer with no free space (%p, %u/%u)", buf, + ("Got OpenMAX buffer with no free space (%p, %lu/%lu)", buf, buf->omx_buf->nOffset, buf->omx_buf->nAllocLen)); return GST_FLOW_ERROR; } diff --git a/omx/gstomxh263enc.c b/omx/gstomxh263enc.c index 25b674a..b2272bf 100644 --- a/omx/gstomxh263enc.c +++ b/omx/gstomxh263enc.c @@ -197,7 +197,7 @@ gst_omx_h263_enc_set_format (GstOMXVideoEnc * enc, GstOMXPort * port, "Setting profile/level not supported by component"); } else if (err != OMX_ErrorNone) { GST_ERROR_OBJECT (self, - "Error setting profile %d and level %d: %s (0x%08x)", param.eProfile, + "Error setting profile %lu and level %lu: %s (0x%08x)", param.eProfile, param.eLevel, gst_omx_error_to_string (err), err); return FALSE; } diff --git a/omx/gstomxh264enc.c b/omx/gstomxh264enc.c index 0305226..d23c500 100644 --- a/omx/gstomxh264enc.c +++ b/omx/gstomxh264enc.c @@ -200,7 +200,7 @@ gst_omx_h264_enc_set_format (GstOMXVideoEnc * enc, GstOMXPort * port, "Setting profile/level not supported by component"); } else if (err != OMX_ErrorNone) { GST_ERROR_OBJECT (self, - "Error setting profile %d and level %d: %s (0x%08x)", param.eProfile, + "Error setting profile %lu and level %lu: %s (0x%08x)", param.eProfile, param.eLevel, gst_omx_error_to_string (err), err); return FALSE; } diff --git a/omx/gstomxmpeg4videoenc.c b/omx/gstomxmpeg4videoenc.c index a9f8022..bcd8d5e 100644 --- a/omx/gstomxmpeg4videoenc.c +++ b/omx/gstomxmpeg4videoenc.c @@ -205,7 +205,7 @@ gst_omx_mpeg4_video_enc_set_format (GstOMXVideoEnc * enc, GstOMXPort * port, "Setting profile/level not supported by component"); } else if (err != OMX_ErrorNone) { GST_ERROR_OBJECT (self, - "Error setting profile %d and level %d: %s (0x%08x)", param.eProfile, + "Error setting profile %lu and level %lu: %s (0x%08x)", param.eProfile, param.eLevel, gst_omx_error_to_string (err), err); return FALSE; } diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c index b672107..569f527 100644 --- a/omx/gstomxvideodec.c +++ b/omx/gstomxvideodec.c @@ -191,8 +191,8 @@ gst_omx_video_dec_open (GstVideoDecoder * decoder) in_port_index = 0; out_port_index = 1; } else { - GST_DEBUG_OBJECT (self, "Detected %u ports, starting at %u", param.nPorts, - param.nStartPortNumber); + GST_DEBUG_OBJECT (self, "Detected %lu ports, starting at %lu", + param.nPorts, param.nStartPortNumber); in_port_index = param.nStartPortNumber + 0; out_port_index = param.nStartPortNumber + 1; } @@ -564,7 +564,7 @@ gst_omx_video_dec_fill_buffer (GstOMXVideoDec * self, if (vinfo->width != port_def->format.video.nFrameWidth || vinfo->height != port_def->format.video.nFrameHeight) { - GST_ERROR_OBJECT (self, "Resolution do not match. port: %dx%d vinfo: %dx%d", + GST_ERROR_OBJECT (self, "Resolution do not match: port=%lux%lu vinfo=%dx%d", port_def->format.video.nFrameWidth, port_def->format.video.nFrameHeight, vinfo->width, vinfo->height); goto done; @@ -1142,7 +1142,7 @@ gst_omx_video_dec_reconfigure_output_port (GstOMXVideoDec * self) } GST_DEBUG_OBJECT (self, - "Setting output state: format %s, width %d, height %d", + "Setting output state: format %s, width %lu, height %lu", gst_video_format_to_string (format), port_def.format.video.nFrameWidth, port_def.format.video.nFrameHeight); @@ -1279,7 +1279,7 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self) } GST_DEBUG_OBJECT (self, - "Setting output state: format %s, width %d, height %d", + "Setting output state: format %s, width %lu, height %lu", gst_video_format_to_string (format), port_def.format.video.nFrameWidth, port_def.format.video.nFrameHeight); @@ -1320,8 +1320,8 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self) goto flushing; } - GST_DEBUG_OBJECT (self, "Handling buffer: 0x%08x %lu", - buf->omx_buf->nFlags, buf->omx_buf->nTimeStamp); + GST_DEBUG_OBJECT (self, "Handling buffer: 0x%08lx %" G_GUINT64_FORMAT, + buf->omx_buf->nFlags, (guint64) buf->omx_buf->nTimeStamp); GST_VIDEO_DECODER_STREAM_LOCK (self); frame = _find_nearest_frame (self, buf); @@ -1670,7 +1670,7 @@ gst_omx_video_dec_get_supported_colorformats (GstOMXVideoDec * self) m->format = GST_VIDEO_FORMAT_I420; m->type = param.eColorFormat; negotiation_map = g_list_append (negotiation_map, m); - GST_DEBUG_OBJECT (self, "Component supports I420 (%d) at index %d", + GST_DEBUG_OBJECT (self, "Component supports I420 (%d) at index %lu", param.eColorFormat, param.nIndex); break; case OMX_COLOR_FormatYUV420SemiPlanar: @@ -1678,12 +1678,12 @@ gst_omx_video_dec_get_supported_colorformats (GstOMXVideoDec * self) m->format = GST_VIDEO_FORMAT_NV12; m->type = param.eColorFormat; negotiation_map = g_list_append (negotiation_map, m); - GST_DEBUG_OBJECT (self, "Component supports NV12 (%d) at index %d", + GST_DEBUG_OBJECT (self, "Component supports NV12 (%d) at index %lu", param.eColorFormat, param.nIndex); break; default: GST_DEBUG_OBJECT (self, - "Component supports unsupported color format %d at index %d", + "Component supports unsupported color format %d at index %lu", param.eColorFormat, param.nIndex); break; } @@ -2378,7 +2378,7 @@ full_buffer: { gst_video_codec_frame_unref (frame); GST_ELEMENT_ERROR (self, LIBRARY, FAILED, (NULL), - ("Got OpenMAX buffer with no free space (%p, %u/%u)", buf, + ("Got OpenMAX buffer with no free space (%p, %lu/%lu)", buf, buf->omx_buf->nOffset, buf->omx_buf->nAllocLen)); return GST_FLOW_ERROR; } @@ -2394,7 +2394,7 @@ too_large_codec_data: { gst_video_codec_frame_unref (frame); GST_ELEMENT_ERROR (self, STREAM, FORMAT, (NULL), - ("codec_data larger than supported by OpenMAX port (%u > %u)", + ("codec_data larger than supported by OpenMAX port (%lu > %lu)", GST_BUFFER_SIZE (codec_data), self->dec_in_port->port_def.nBufferSize)); return GST_FLOW_ERROR; diff --git a/omx/gstomxvideoenc.c b/omx/gstomxvideoenc.c index 98fbf42..dcacdab 100644 --- a/omx/gstomxvideoenc.c +++ b/omx/gstomxvideoenc.c @@ -251,8 +251,8 @@ gst_omx_video_enc_open (GstVideoEncoder * encoder) in_port_index = 0; out_port_index = 1; } else { - GST_DEBUG_OBJECT (self, "Detected %u ports, starting at %u", param.nPorts, - param.nStartPortNumber); + GST_DEBUG_OBJECT (self, "Detected %lu ports, starting at %lu", + param.nPorts, param.nStartPortNumber); in_port_index = param.nStartPortNumber + 0; out_port_index = param.nStartPortNumber + 1; } @@ -845,8 +845,8 @@ gst_omx_video_enc_loop (GstOMXVideoEnc * self) goto flushing; } - GST_DEBUG_OBJECT (self, "Handling buffer: 0x%08x %lu", buf->omx_buf->nFlags, - buf->omx_buf->nTimeStamp); + GST_DEBUG_OBJECT (self, "Handling buffer: 0x%08lx %" G_GUINT64_FORMAT, + buf->omx_buf->nFlags, (guint64) buf->omx_buf->nTimeStamp); GST_VIDEO_ENCODER_STREAM_LOCK (self); frame = _find_nearest_frame (self, buf); @@ -1072,7 +1072,7 @@ gst_omx_video_enc_get_supported_colorformats (GstOMXVideoEnc * self) m->format = GST_VIDEO_FORMAT_I420; m->type = param.eColorFormat; negotiation_map = g_list_append (negotiation_map, m); - GST_DEBUG_OBJECT (self, "Component supports I420 (%d) at index %d", + GST_DEBUG_OBJECT (self, "Component supports I420 (%d) at index %ld", param.eColorFormat, param.nIndex); break; case OMX_COLOR_FormatYUV420SemiPlanar: @@ -1080,12 +1080,12 @@ gst_omx_video_enc_get_supported_colorformats (GstOMXVideoEnc * self) m->format = GST_VIDEO_FORMAT_NV12; m->type = param.eColorFormat; negotiation_map = g_list_append (negotiation_map, m); - GST_DEBUG_OBJECT (self, "Component supports NV12 (%d) at index %d", + GST_DEBUG_OBJECT (self, "Component supports NV12 (%d) at index %ld", param.eColorFormat, param.nIndex); break; default: GST_DEBUG_OBJECT (self, - "Component supports unsupported color format %d at index %d", + "Component supports unsupported color format %d at index %ld", param.eColorFormat, param.nIndex); break; } @@ -1700,7 +1700,7 @@ gst_omx_video_enc_handle_frame (GstVideoEncoder * encoder, full_buffer: { GST_ELEMENT_ERROR (self, LIBRARY, FAILED, (NULL), - ("Got OpenMAX buffer with no free space (%p, %u/%u)", buf, + ("Got OpenMAX buffer with no free space (%p, %lu/%lu)", buf, buf->omx_buf->nOffset, buf->omx_buf->nAllocLen)); gst_video_codec_frame_unref (frame); return GST_FLOW_ERROR; -- cgit v1.2.1