[gst-cvs] gst-plugins-bad: shm: fix debug messages

Tim Müller tpm at kemper.freedesktop.org
Thu Jun 3 12:53:47 PDT 2010


Module: gst-plugins-bad
Branch: master
Commit: 26e9df08b83e525962fb393a273fcf4a33550c59
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=26e9df08b83e525962fb393a273fcf4a33550c59

Author: Tim-Philipp Müller <tim.muller at collabora.co.uk>
Date:   Thu Jun  3 20:51:57 2010 +0100

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 d7a7148..8ed16e8 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 ebaf2c9..a451790 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;





More information about the Gstreamer-commits mailing list