From 26e9df08b83e525962fb393a273fcf4a33550c59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Thu, 3 Jun 2010 20:51:57 +0100 Subject: [PATCH] shm: fix debug messages Misc. printf format fixes and missing arguments. --- sys/shm/gstshmsink.c | 17 +++++++++-------- sys/shm/gstshmsrc.c | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/sys/shm/gstshmsink.c b/sys/shm/gstshmsink.c index d7a7148855..8ed16e841f 100644 --- a/sys/shm/gstshmsink.c +++ b/sys/shm/gstshmsink.c @@ -213,12 +213,13 @@ gst_shm_sink_set_property (GObject * object, guint prop_id, break; case PROP_SHM_SIZE: GST_OBJECT_LOCK (object); - if (sp_writer_resize (self->pipe, g_value_get_uint (value)) < 0) - GST_DEBUG_OBJECT (self, - "Resize shared memory area from %u to %u bytes"); - else - GST_WARNING_OBJECT (self, - "Could not resize shared memory area from %u to %u bytes"); + if (sp_writer_resize (self->pipe, g_value_get_uint (value)) < 0) { + GST_DEBUG_OBJECT (self, "Resized shared memory area from %u to " + "%u bytes", self->size, g_value_get_uint (value)); + } else { + GST_WARNING_OBJECT (self, "Could not resize shared memory area from %u " + "to %u bytes", self->size, g_value_get_uint (value)); + } self->size = g_value_get_uint (value); GST_OBJECT_UNLOCK (object); break; @@ -436,10 +437,10 @@ gst_shm_sink_buffer_alloc (GstBaseSink * sink, guint64 offset, guint size, GST_DEBUG_FUNCPTR (gst_shm_sink_free_buffer); GST_BUFFER_SIZE (buffer) = size; GST_LOG_OBJECT (self, - "Allocated buffer of %lu bytes from shared memory at %p", size, buf); + "Allocated buffer of %u bytes from shared memory at %p", size, buf); } else { buffer = gst_buffer_new_and_alloc (size); - GST_LOG_OBJECT (self, "Not enough shared memory for buffer of %lu bytes, " + GST_LOG_OBJECT (self, "Not enough shared memory for buffer of %u bytes, " "allocating using standard allocator", size); } diff --git a/sys/shm/gstshmsrc.c b/sys/shm/gstshmsrc.c index ebaf2c9dab..a451790c34 100644 --- a/sys/shm/gstshmsrc.c +++ b/sys/shm/gstshmsrc.c @@ -305,7 +305,7 @@ gst_shm_src_create (GstPushSrc * psrc, GstBuffer ** outbuf) } } while (buf == NULL); - GST_LOG_OBJECT (self, "Got buffer %p of size %d %d", buf, rv); + GST_LOG_OBJECT (self, "Got buffer %p of size %d", buf, rv); gsb = g_slice_new0 (struct GstShmBuffer); gsb->buf = buf;