Fix and clarify debug statements
authorJosep Torra <n770galaxy@gmail.com>
Wed, 10 Aug 2011 09:01:58 +0000 (11:01 +0200)
committerEdward Hervey <edward.hervey@collabora.co.uk>
Wed, 10 Aug 2011 09:01:58 +0000 (11:01 +0200)
Fixes build on MacOSX

Signed-off-by: Edward Hervey <edward.hervey@collabora.co.uk>
14 files changed:
gst/gstbuffer.c
gst/gstmemory.c
gst/gstmeta.c
gst/gstpad.c
libs/gst/base/gstadapter.c
libs/gst/base/gstbaseparse.c
libs/gst/base/gstbasesrc.c
libs/gst/base/gstbasetransform.c
libs/gst/check/gstcheck.c
plugins/elements/gstfdsink.c
plugins/elements/gstfilesink.c
plugins/elements/gstqueue.c
plugins/elements/gstqueue2.c
plugins/elements/gsttypefindelement.c

index 5c5982f..8ff815c 100644 (file)
@@ -512,7 +512,8 @@ gst_buffer_new_allocate (const GstAllocator * allocator, gsize size,
   if (mem != NULL)
     _memory_add (newbuf, -1, mem);
 
-  GST_CAT_LOG (GST_CAT_BUFFER, "new %p of size %d from allocator %p", newbuf,
+  GST_CAT_LOG (GST_CAT_BUFFER,
+      "new buffer %p of size %" G_GSIZE_FORMAT " from allocator %p", newbuf,
       size, allocator);
 #endif
 
@@ -563,7 +564,8 @@ gst_buffer_new_allocate (const GstAllocator * allocator, gsize size,
   /* ERRORS */
 no_memory:
   {
-    GST_CAT_WARNING (GST_CAT_BUFFER, "failed to allocate %d bytes", size);
+    GST_CAT_WARNING (GST_CAT_BUFFER,
+        "failed to allocate %" G_GSIZE_FORMAT " bytes", size);
     return NULL;
   }
 }
index 32c045c..17516d6 100644 (file)
@@ -597,7 +597,7 @@ gst_allocator_register (const gchar * name, const GstMemoryInfo * info)
   INSTALL_FALLBACK (is_span);
 #undef INSTALL_FALLBACK
 
-  GST_DEBUG ("register \"%s\" of size %" G_GSIZE_FORMAT, name);
+  GST_DEBUG ("registering allocator \"%s\"", name);
 
   g_static_rw_lock_writer_lock (&lock);
   g_hash_table_insert (allocators, (gpointer) name, (gpointer) allocator);
index ae0f77e..78fc40c 100644 (file)
@@ -112,7 +112,8 @@ meta_timing_copy (GstBuffer * copybuf, GstMetaTiming * meta,
 {
   GstMetaTiming *timing;
 
-  GST_DEBUG ("trans called from buffer %p to %p, meta %p, %u-%u", buffer,
+  GST_DEBUG ("trans called from buffer %p to %p, meta %p,"
+      "offset %" G_GSIZE_FORMAT ", size %" G_GSIZE_FORMAT, buffer,
       copybuf, meta, offset, size);
 
   timing = gst_buffer_add_meta_timing (copybuf);
index 6e83033..1b63b59 100644 (file)
@@ -2336,7 +2336,7 @@ filter_done:
         GST_PTR_FORMAT, result, result, filter, filter);
     result = gst_caps_intersect_full (filter, result, GST_CAPS_INTERSECT_FIRST);
     GST_CAT_DEBUG_OBJECT (GST_CAT_CAPS, pad, "result %p %" GST_PTR_FORMAT,
-        result);
+        result, result);
   } else {
     GST_CAT_DEBUG_OBJECT (GST_CAT_CAPS, pad,
         "using caps %p %" GST_PTR_FORMAT, result, result);
index 94fbabf..797eaaa 100644 (file)
@@ -265,7 +265,8 @@ copy_into_unchecked (GstAdapter * adapter, guint8 * dest, gsize skip,
   }
   /* copy partial buffer */
   csize = MIN (bsize - skip, size);
-  GST_DEBUG ("%u %u %u", bsize, skip, csize);
+  GST_DEBUG ("bsize %" G_GSIZE_FORMAT ", skip %" G_GSIZE_FORMAT ", csize %"
+      G_GSIZE_FORMAT, bsize, skip, csize);
   gst_buffer_extract (buf, skip, dest, csize);
   size -= csize;
   dest += csize;
@@ -305,13 +306,13 @@ gst_adapter_push (GstAdapter * adapter, GstBuffer * buf)
 
   /* Note: merging buffers at this point is premature. */
   if (G_UNLIKELY (adapter->buflist == NULL)) {
-    GST_LOG_OBJECT (adapter, "pushing first %u bytes", size);
+    GST_LOG_OBJECT (adapter, "pushing first %" G_GSIZE_FORMAT " bytes", size);
     adapter->buflist = adapter->buflist_end = g_slist_append (NULL, buf);
     update_timestamp (adapter, buf);
   } else {
     /* Otherwise append to the end, and advance our end pointer */
-    GST_LOG_OBJECT (adapter, "pushing %u bytes at end, size now %u", size,
-        adapter->size);
+    GST_LOG_OBJECT (adapter, "pushing %" G_GSIZE_FORMAT " bytes at end, "
+        "size now %" G_GSIZE_FORMAT, size, adapter->size);
     adapter->buflist_end = g_slist_append (adapter->buflist_end, buf);
     adapter->buflist_end = g_slist_next (adapter->buflist_end);
   }
@@ -349,8 +350,8 @@ gst_adapter_try_to_merge_up (GstAdapter * adapter, gsize size)
       return ret;
 
     /* Merge the head buffer and the next in line */
-    GST_LOG_OBJECT (adapter,
-        "Merging buffers of size %u & %u in search of target %u",
+    GST_LOG_OBJECT (adapter, "Merging buffers of size %" G_GSIZE_FORMAT " & %"
+        G_GSIZE_FORMAT " in search of target %" G_GSIZE_FORMAT,
         hsize, gst_buffer_get_size (cur), size);
 
     head = gst_buffer_join (head, cur);
@@ -438,7 +439,7 @@ gst_adapter_map (GstAdapter * adapter, gsize size)
   /* Gonna need to copy stuff out */
   if (G_UNLIKELY (adapter->assembled_size < size)) {
     adapter->assembled_size = (size / DEFAULT_SIZE + 1) * DEFAULT_SIZE;
-    GST_DEBUG_OBJECT (adapter, "resizing internal buffer to %u",
+    GST_DEBUG_OBJECT (adapter, "resizing internal buffer to %" G_GSIZE_FORMAT,
         adapter->assembled_size);
     if (toreuse == 0) {
       GST_CAT_DEBUG (GST_CAT_PERFORMANCE, "alloc new buffer");
@@ -448,13 +449,14 @@ gst_adapter_map (GstAdapter * adapter, gsize size)
       adapter->assembled_data = g_malloc (adapter->assembled_size);
     } else {
       /* we are going to reuse all data, realloc then */
-      GST_CAT_DEBUG (GST_CAT_PERFORMANCE, "reusing %u bytes", toreuse);
+      GST_CAT_DEBUG (GST_CAT_PERFORMANCE, "reusing %" G_GSIZE_FORMAT " bytes",
+          toreuse);
       adapter->assembled_data =
           g_realloc (adapter->assembled_data, adapter->assembled_size);
     }
   }
-  GST_CAT_DEBUG (GST_CAT_PERFORMANCE, "copy remaining %u bytes from adapter",
-      tocopy);
+  GST_CAT_DEBUG (GST_CAT_PERFORMANCE, "copy remaining %" G_GSIZE_FORMAT
+      " bytes from adapter", tocopy);
   data = adapter->assembled_data;
   copy_into_unchecked (adapter, data + toreuse, skip + toreuse, tocopy);
   adapter->assembled_len = size;
@@ -529,7 +531,7 @@ gst_adapter_flush_unchecked (GstAdapter * adapter, gsize flush)
   GstAdapterPrivate *priv;
   GSList *g;
 
-  GST_LOG_OBJECT (adapter, "flushing %u bytes", flush);
+  GST_LOG_OBJECT (adapter, "flushing %" G_GSIZE_FORMAT " bytes", flush);
 
   priv = adapter->priv;
 
@@ -603,18 +605,19 @@ gst_adapter_take_internal (GstAdapter * adapter, gsize nbytes)
     /* we reuse already allocated memory but only when we're going to reuse
      * something from it because else we are worse than the malloc and copy
      * case below */
-    GST_LOG_OBJECT (adapter, "reusing %u bytes of assembled data", toreuse);
+    GST_LOG_OBJECT (adapter, "reusing %" G_GSIZE_FORMAT " bytes of assembled"
+        " data", toreuse);
     /* we have enough free space in the assembled array */
     data = adapter->assembled_data;
     /* flush after this function should set the assembled_size to 0 */
     adapter->assembled_data = g_malloc (adapter->assembled_size);
   } else {
-    GST_LOG_OBJECT (adapter, "allocating %u bytes", nbytes);
+    GST_LOG_OBJECT (adapter, "allocating %" G_GSIZE_FORMAT " bytes", nbytes);
     /* not enough bytes in the assembled array, just allocate new space */
     data = g_malloc (nbytes);
     /* reuse what we can from the already assembled data */
     if (toreuse) {
-      GST_LOG_OBJECT (adapter, "reusing %u bytes", toreuse);
+      GST_LOG_OBJECT (adapter, "reusing %" G_GSIZE_FORMAT " bytes", toreuse);
       memcpy (data, adapter->assembled_data, toreuse);
     }
   }
@@ -693,7 +696,8 @@ gst_adapter_take_buffer (GstAdapter * adapter, gsize nbytes)
   g_return_val_if_fail (GST_IS_ADAPTER (adapter), NULL);
   g_return_val_if_fail (nbytes > 0, NULL);
 
-  GST_LOG_OBJECT (adapter, "taking buffer of %u bytes", nbytes);
+  GST_LOG_OBJECT (adapter, "taking buffer of %" G_GSIZE_FORMAT " bytes",
+      nbytes);
 
   /* we don't have enough data, return NULL. This is unlikely
    * as one usually does an _available() first instead of grabbing a
@@ -707,13 +711,13 @@ gst_adapter_take_buffer (GstAdapter * adapter, gsize nbytes)
 
   /* our head buffer has enough data left, return it */
   if (skip == 0 && hsize == nbytes) {
-    GST_LOG_OBJECT (adapter, "providing buffer of %d bytes as head buffer",
-        nbytes);
+    GST_LOG_OBJECT (adapter, "providing buffer of %" G_GSIZE_FORMAT " bytes"
+        " as head buffer", nbytes);
     buffer = gst_buffer_ref (cur);
     goto done;
   } else if (hsize >= nbytes + skip) {
-    GST_LOG_OBJECT (adapter, "providing buffer of %d bytes via region copy",
-        nbytes);
+    GST_LOG_OBJECT (adapter, "providing buffer of %" G_GSIZE_FORMAT " bytes"
+        " via region copy", nbytes);
     buffer = gst_buffer_copy_region (cur, GST_BUFFER_COPY_ALL, skip, nbytes);
     goto done;
   }
@@ -722,8 +726,8 @@ gst_adapter_take_buffer (GstAdapter * adapter, gsize nbytes)
     /* Merged something, let's try again for sub-buffering */
     cur = adapter->buflist->data;
     if (gst_buffer_get_size (cur) >= nbytes + skip) {
-      GST_LOG_OBJECT (adapter, "providing buffer of %d bytes via sub-buffer",
-          nbytes);
+      GST_LOG_OBJECT (adapter, "providing buffer of %" G_GSIZE_FORMAT " bytes"
+          " via sub-buffer", nbytes);
       buffer = gst_buffer_copy_region (cur, GST_BUFFER_COPY_ALL, skip, nbytes);
       goto done;
     }
@@ -770,7 +774,7 @@ gst_adapter_take_list (GstAdapter * adapter, gsize nbytes)
   g_return_val_if_fail (GST_IS_ADAPTER (adapter), NULL);
   g_return_val_if_fail (nbytes <= adapter->size, NULL);
 
-  GST_LOG_OBJECT (adapter, "taking %u bytes", nbytes);
+  GST_LOG_OBJECT (adapter, "taking %" G_GSIZE_FORMAT " bytes", nbytes);
 
   while (nbytes > 0) {
     cur = adapter->buflist->data;
index b5a829f..b58e9e6 100644 (file)
@@ -996,7 +996,7 @@ gst_base_parse_sink_eventfunc (GstBaseParse * parse, GstEvent * event)
 
         event = gst_event_new_segment (&out_segment);
 
-        GST_DEBUG_OBJECT (parse, "Converted incoming segment to TIME. "
+        GST_DEBUG_OBJECT (parse, "Converted incoming segment to TIME. %"
             GST_SEGMENT_FORMAT, in_segment);
 
       } else if (in_segment->format != GST_FORMAT_TIME) {
@@ -1646,7 +1646,7 @@ gst_base_parse_handle_and_push_frame (GstBaseParse * parse,
 
   GST_LOG_OBJECT (parse,
       "parsing frame at offset %" G_GUINT64_FORMAT
-      " (%#" G_GINT64_MODIFIER "x) of size %d",
+      " (%#" G_GINT64_MODIFIER "x) of size %" G_GSIZE_FORMAT,
       GST_BUFFER_OFFSET (buffer), GST_BUFFER_OFFSET (buffer),
       gst_buffer_get_size (buffer));
 
@@ -1767,7 +1767,7 @@ gst_base_parse_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
   buffer = frame->buffer;
 
   GST_LOG_OBJECT (parse,
-      "processing buffer of size %d with ts %" GST_TIME_FORMAT
+      "processing buffer of size %" G_GSIZE_FORMAT " with ts %" GST_TIME_FORMAT
       ", duration %" GST_TIME_FORMAT, gst_buffer_get_size (buffer),
       GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)),
       GST_TIME_ARGS (GST_BUFFER_DURATION (buffer)));
@@ -2062,7 +2062,7 @@ gst_base_parse_process_fragment (GstBaseParse * parse, gboolean push_only)
   parse->priv->buffers_pending = g_slist_reverse (parse->priv->buffers_pending);
   while (parse->priv->buffers_pending) {
     buf = GST_BUFFER_CAST (parse->priv->buffers_pending->data);
-    GST_LOG_OBJECT (parse, "adding pending buffer (size %d)",
+    GST_LOG_OBJECT (parse, "adding pending buffer (size %" G_GSIZE_FORMAT ")",
         gst_buffer_get_size (buf));
     gst_adapter_push (parse->priv->adapter, buf);
     parse->priv->buffers_pending =
@@ -2148,7 +2148,7 @@ push:
 
   /* any trailing unused no longer usable (ideally none) */
   if (G_UNLIKELY (gst_adapter_available (parse->priv->adapter))) {
-    GST_DEBUG_OBJECT (parse, "discarding %d trailing bytes",
+    GST_DEBUG_OBJECT (parse, "discarding %" G_GSIZE_FORMAT " trailing bytes",
         gst_adapter_available (parse->priv->adapter));
     gst_adapter_clear (parse->priv->adapter);
   }
@@ -2190,7 +2190,8 @@ gst_base_parse_chain (GstPad * pad, GstBuffer * buffer)
   frame = &parse->priv->frame;
 
   if (G_LIKELY (buffer)) {
-    GST_LOG_OBJECT (parse, "buffer size: %d, offset = %" G_GINT64_FORMAT,
+    GST_LOG_OBJECT (parse,
+        "buffer size: %" G_GSIZE_FORMAT ", offset = %" G_GINT64_FORMAT,
         gst_buffer_get_size (buffer), GST_BUFFER_OFFSET (buffer));
     if (G_UNLIKELY (parse->priv->passthrough)) {
       gst_base_parse_frame_init (frame);
@@ -2277,8 +2278,8 @@ gst_base_parse_chain (GstPad * pad, GstBuffer * buffer)
       gst_buffer_replace (&frame->buffer, NULL);
       if (res) {
         if (gst_adapter_available (parse->priv->adapter) < fsize) {
-          GST_DEBUG_OBJECT (parse,
-              "found valid frame but not enough data available (only %d bytes)",
+          GST_DEBUG_OBJECT (parse, "found valid frame but not enough data"
+              " available (only %" G_GSIZE_FORMAT " bytes)",
               gst_adapter_available (parse->priv->adapter));
           gst_buffer_unref (tmpbuf);
           goto done;
@@ -2443,8 +2444,8 @@ gst_base_parse_pull_range (GstBaseParse * parse, guint size,
 
   if (gst_buffer_get_size (parse->priv->cache) < size) {
     GST_DEBUG_OBJECT (parse, "Returning short buffer at offset %"
-        G_GUINT64_FORMAT ": wanted %u bytes, got %u bytes", parse->priv->offset,
-        size, gst_buffer_get_size (parse->priv->cache));
+        G_GUINT64_FORMAT ": wanted %u bytes, got %" G_GSIZE_FORMAT " bytes",
+        parse->priv->offset, size, gst_buffer_get_size (parse->priv->cache));
 
     *buffer = parse->priv->cache;
     parse->priv->cache = NULL;
@@ -3331,7 +3332,7 @@ gst_base_parse_find_frame (GstBaseParse * parse, gint64 * pos,
   buf = frame.buffer;
   GST_LOG_OBJECT (parse,
       "peek parsing frame at offset %" G_GUINT64_FORMAT
-      " (%#" G_GINT64_MODIFIER "x) of size %d",
+      " (%#" G_GINT64_MODIFIER "x) of size %" G_GSIZE_FORMAT,
       GST_BUFFER_OFFSET (buf), GST_BUFFER_OFFSET (buf),
       gst_buffer_get_size (buf));
 
index b0c93e9..4ca2e92 100644 (file)
@@ -1327,7 +1327,7 @@ no_function:
   }
 alloc_failed:
   {
-    GST_DEBUG_OBJECT (src, "Failed to allocate buffer", size);
+    GST_DEBUG_OBJECT (src, "Failed to allocate buffer of %u bytes", size);
     return ret;
   }
 not_ok:
index ee83461..efc3ace 100644 (file)
@@ -535,7 +535,8 @@ gst_base_transform_transform_size (GstBaseTransform * trans,
 
   klass = GST_BASE_TRANSFORM_GET_CLASS (trans);
 
-  GST_DEBUG_OBJECT (trans, "asked to transform size %d for caps %"
+  GST_DEBUG_OBJECT (trans,
+      "asked to transform size %" G_GSIZE_FORMAT " for caps %"
       GST_PTR_FORMAT " to size for caps %" GST_PTR_FORMAT " in direction %s",
       size, caps, othercaps, direction == GST_PAD_SRC ? "SRC" : "SINK");
 
@@ -555,8 +556,9 @@ gst_base_transform_transform_size (GstBaseTransform * trans,
     if (!gst_base_transform_get_unit_size (trans, caps, &inunitsize))
       goto no_in_size;
 
-    GST_DEBUG_OBJECT (trans, "input size %d, input unit size %d", size,
-        inunitsize);
+    GST_DEBUG_OBJECT (trans,
+        "input size %" G_GSIZE_FORMAT ", input unit size %" G_GSIZE_FORMAT,
+        size, inunitsize);
 
     /* input size must be a multiple of the unit_size of the input caps */
     if (inunitsize == 0 || (size % inunitsize != 0))
@@ -572,7 +574,8 @@ gst_base_transform_transform_size (GstBaseTransform * trans,
     /* the output size is the unit_size times the amount of units on the
      * input */
     *othersize = units * outunitsize;
-    GST_DEBUG_OBJECT (trans, "transformed size to %d", *othersize);
+    GST_DEBUG_OBJECT (trans, "transformed size to %" G_GSIZE_FORMAT,
+        *othersize);
 
     ret = TRUE;
   }
@@ -587,8 +590,8 @@ no_in_size:
   }
 no_multiple:
   {
-    GST_DEBUG_OBJECT (trans, "Size %u is not a multiple of unit size %u", size,
-        inunitsize);
+    GST_DEBUG_OBJECT (trans, "Size %" G_GSIZE_FORMAT " is not a multiple of"
+        "unit size %" G_GSIZE_FORMAT, size, inunitsize);
     g_warning ("%s: size %" G_GSIZE_FORMAT " is not a multiple of unit size %"
         G_GSIZE_FORMAT, GST_ELEMENT_NAME (trans), size, inunitsize);
     return FALSE;
@@ -1435,7 +1438,7 @@ default_prepare_output_buffer (GstBaseTransform * trans,
             goto unknown_size;
         }
       }
-      GST_DEBUG_OBJECT (trans, "doing alloc of size %u", outsize);
+      GST_DEBUG_OBJECT (trans, "doing alloc of size %" G_GSIZE_FORMAT, outsize);
       *outbuf =
           gst_buffer_new_allocate (priv->allocator, outsize, priv->alignment);
     }
@@ -1529,31 +1532,36 @@ gst_base_transform_get_unit_size (GstBaseTransform * trans, GstCaps * caps,
   /* see if we have the result cached */
   if (trans->cache_caps1 == caps) {
     *size = trans->cache_caps1_size;
-    GST_DEBUG_OBJECT (trans, "returned %d from first cache", *size);
+    GST_DEBUG_OBJECT (trans,
+        "returned %" G_GSIZE_FORMAT " from first cache", *size);
     return TRUE;
   }
   if (trans->cache_caps2 == caps) {
     *size = trans->cache_caps2_size;
-    GST_DEBUG_OBJECT (trans, "returned %d from second cached", *size);
+    GST_DEBUG_OBJECT (trans,
+        "returned %" G_GSIZE_FORMAT " from second cached", *size);
     return TRUE;
   }
 
   bclass = GST_BASE_TRANSFORM_GET_CLASS (trans);
   if (bclass->get_unit_size) {
     res = bclass->get_unit_size (trans, caps, size);
-    GST_DEBUG_OBJECT (trans, "caps %" GST_PTR_FORMAT
-        ") has unit size %d, result %s", caps, *size, res ? "TRUE" : "FALSE");
+    GST_DEBUG_OBJECT (trans,
+        "caps %" GST_PTR_FORMAT ") has unit size %" G_GSIZE_FORMAT ", res %s",
+        caps, *size, res ? "TRUE" : "FALSE");
 
     if (res) {
       /* and cache the values */
       if (trans->cache_caps1 == NULL) {
         gst_caps_replace (&trans->cache_caps1, caps);
         trans->cache_caps1_size = *size;
-        GST_DEBUG_OBJECT (trans, "caching %d in first cache", *size);
+        GST_DEBUG_OBJECT (trans,
+            "caching %" G_GSIZE_FORMAT " in first cache", *size);
       } else if (trans->cache_caps2 == NULL) {
         gst_caps_replace (&trans->cache_caps2, caps);
         trans->cache_caps2_size = *size;
-        GST_DEBUG_OBJECT (trans, "caching %d in second cache", *size);
+        GST_DEBUG_OBJECT (trans,
+            "caching %" G_GSIZE_FORMAT " in second cache", *size);
       } else {
         GST_DEBUG_OBJECT (trans, "no free spot to cache unit_size");
       }
index 1a95f8f..761c0c9 100644 (file)
@@ -508,8 +508,8 @@ gst_check_element_push_buffer_list (const gchar * element_name,
     newdata = gst_buffer_map (new, &newsize, NULL, GST_MAP_READ);
     origdata = gst_buffer_map (orig, &origsize, NULL, GST_MAP_READ);
 
-    GST_LOG ("orig buffer: size %u", origsize);
-    GST_LOG ("new  buffer: size %u", newsize);
+    GST_LOG ("orig buffer: size %" G_GSIZE_FORMAT, origsize);
+    GST_LOG ("new  buffer: size %" G_GSIZE_FORMAT, newsize);
     GST_MEMDUMP ("orig buffer", origdata, origsize);
     GST_MEMDUMP ("new  buffer", newdata, newsize);
 
index d05067e..01edb3f 100644 (file)
@@ -235,8 +235,8 @@ gst_fd_sink_render (GstBaseSink * sink, GstBuffer * buffer)
 again:
 #ifndef HAVE_WIN32
   do {
-    GST_DEBUG_OBJECT (fdsink, "going into select, have %d bytes to write",
-        size);
+    GST_DEBUG_OBJECT (fdsink, "going into select, have %" G_GSIZE_FORMAT
+        " bytes to write", size);
     retval = gst_poll_wait (fdsink->fdset, GST_CLOCK_TIME_NONE);
   } while (retval == -1 && (errno == EINTR || errno == EAGAIN));
 
@@ -248,8 +248,8 @@ again:
   }
 #endif
 
-  GST_DEBUG_OBJECT (fdsink, "writing %d bytes to file descriptor %d", size,
-      fdsink->fd);
+  GST_DEBUG_OBJECT (fdsink, "writing %" G_GSIZE_FORMAT " bytes to"
+      " file descriptor %d", size, fdsink->fd);
 
   written = write (fdsink->fd, ptr, left);
 
index 6935c01..02fee92 100644 (file)
@@ -632,7 +632,8 @@ gst_file_sink_render (GstBaseSink * sink, GstBuffer * buffer)
 
   data = gst_buffer_map (buffer, &size, NULL, GST_MAP_READ);
 
-  GST_DEBUG_OBJECT (filesink, "writing %u bytes at %" G_GUINT64_FORMAT,
+  GST_DEBUG_OBJECT (filesink,
+      "writing %" G_GSIZE_FORMAT " bytes at %" G_GUINT64_FORMAT,
       size, filesink->current_pos);
 
   if (size > 0 && data != NULL) {
index 3e16fe8..19ccf8f 100644 (file)
@@ -931,8 +931,8 @@ gst_queue_chain (GstPad * pad, GstBuffer * buffer)
   timestamp = GST_BUFFER_TIMESTAMP (buffer);
   duration = GST_BUFFER_DURATION (buffer);
 
-  GST_CAT_LOG_OBJECT (queue_dataflow, queue,
-      "received buffer %p of size %d, time %" GST_TIME_FORMAT ", duration %"
+  GST_CAT_LOG_OBJECT (queue_dataflow, queue, "received buffer %p of size %"
+      G_GSIZE_FORMAT ", time %" GST_TIME_FORMAT ", duration %"
       GST_TIME_FORMAT, buffer, gst_buffer_get_size (buffer),
       GST_TIME_ARGS (timestamp), GST_TIME_ARGS (duration));
 
index e91d3cb..202836d 100644 (file)
@@ -2123,8 +2123,8 @@ gst_queue2_chain (GstPad * pad, GstBuffer * buffer)
 
   queue = GST_QUEUE2 (GST_OBJECT_PARENT (pad));
 
-  GST_CAT_LOG_OBJECT (queue_dataflow, queue,
-      "received buffer %p of size %d, time %" GST_TIME_FORMAT ", duration %"
+  GST_CAT_LOG_OBJECT (queue_dataflow, queue, "received buffer %p of size %"
+      G_GSIZE_FORMAT ", time %" GST_TIME_FORMAT ", duration %"
       GST_TIME_FORMAT, buffer, gst_buffer_get_size (buffer),
       GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)),
       GST_TIME_ARGS (GST_BUFFER_DURATION (buffer)));
@@ -2792,7 +2792,7 @@ gst_queue2_src_activate_pull (GstPad * pad, gboolean active)
         result = gst_queue2_open_temp_location_file (queue);
       } else if (!queue->ring_buffer) {
         queue->ring_buffer = g_malloc (queue->ring_buffer_max_size);
-        result = ! !queue->ring_buffer;
+        result = !!queue->ring_buffer;
       } else {
         result = TRUE;
       }
index b5ecb85..0757abf 100644 (file)
@@ -633,7 +633,7 @@ gst_type_find_element_setcaps (GstTypeFindElement * typefind, GstCaps * caps)
     buffer = gst_adapter_take_buffer (typefind->adapter, avail);
     GST_OBJECT_UNLOCK (typefind);
 
-    GST_DEBUG_OBJECT (typefind, "Pushing buffer: %d", avail);
+    GST_DEBUG_OBJECT (typefind, "Pushing buffer: %" G_GSIZE_FORMAT, avail);
     gst_pad_push (typefind->src, buffer);
   }