Fix printf()-like formats.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Thu, 2 Jan 2014 10:17:28 +0000 (11:17 +0100)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Mon, 6 Jan 2014 09:04:05 +0000 (10:04 +0100)
Fix formts for various GST_DEBUG et al. invocations. More precisely,
make size_t arguments use the %zu format specifier accordingly; force
XID formats to be a 32-bit unsigned integer; and fix the format used
for gst_vaapi_create_surface_with_format() error cases since we have
been using strings nowadays.

gst-libs/gst/vaapi/gstvaapidecoder.c
gst-libs/gst/vaapi/gstvaapipixmap_x11.c
gst-libs/gst/vaapi/gstvaapisurface.c
gst-libs/gst/vaapi/gstvaapiwindow_glx.c
gst-libs/gst/vaapi/gstvaapiwindow_x11.c
gst/vaapi/gstvaapiencode.c

index 6df5ba8..8a8fa4c 100644 (file)
@@ -101,7 +101,7 @@ push_buffer(GstVaapiDecoder *decoder, GstBuffer *buffer)
         GST_BUFFER_FLAG_SET(buffer, GST_BUFFER_FLAG_EOS);
     }
 
-    GST_DEBUG("queue encoded data buffer %p (%d bytes)",
+    GST_DEBUG("queue encoded data buffer %p (%zu bytes)",
               buffer, gst_buffer_get_size(buffer));
 
     g_async_queue_push(decoder->buffers, buffer);
@@ -117,7 +117,7 @@ pop_buffer(GstVaapiDecoder *decoder)
     if (!buffer)
         return NULL;
 
-    GST_DEBUG("dequeue buffer %p for decoding (%d bytes)",
+    GST_DEBUG("dequeue buffer %p for decoding (%zu bytes)",
               buffer, gst_buffer_get_size(buffer));
 
     return buffer;
index 8031383..ac84a76 100644 (file)
@@ -208,7 +208,7 @@ gst_vaapi_pixmap_x11_new(GstVaapiDisplay *display, GstVideoFormat format,
 GstVaapiPixmap *
 gst_vaapi_pixmap_x11_new_with_xid(GstVaapiDisplay *display, Pixmap xid)
 {
-    GST_DEBUG("new pixmap from xid 0x%08x", xid);
+    GST_DEBUG("new pixmap from xid 0x%08x", (guint)xid);
 
     g_return_val_if_fail(GST_VAAPI_IS_DISPLAY_X11(display), NULL);
     g_return_val_if_fail(xid != None, NULL);
index 564c3a9..902926d 100644 (file)
@@ -187,7 +187,7 @@ gst_vaapi_surface_create_with_format(GstVaapiSurface *surface,
 
     /* ERRORS */
 error_unsupported_format:
-    GST_ERROR("unsupported format %u", gst_vaapi_video_format_to_string(format));
+    GST_ERROR("unsupported format %s", gst_vaapi_video_format_to_string(format));
     return FALSE;
 #else
     return FALSE;
index 707a524..d027eae 100644 (file)
@@ -400,7 +400,7 @@ gst_vaapi_window_glx_new_with_xid(GstVaapiDisplay *display, Window xid)
 {
     GstVaapiWindow *window;
 
-    GST_DEBUG("new window from xid 0x%08x", xid);
+    GST_DEBUG("new window from xid 0x%08x", (guint)xid);
 
     g_return_val_if_fail(GST_VAAPI_IS_DISPLAY_GLX(display), NULL);
     g_return_val_if_fail(xid != None, NULL);
index d399943..f0a5170 100644 (file)
@@ -626,7 +626,7 @@ gst_vaapi_window_x11_new(GstVaapiDisplay *display, guint width, guint height)
 GstVaapiWindow *
 gst_vaapi_window_x11_new_with_xid(GstVaapiDisplay *display, Window xid)
 {
-    GST_DEBUG("new window from xid 0x%08x", xid);
+    GST_DEBUG("new window from xid 0x%08x", (guint)xid);
 
     g_return_val_if_fail(GST_VAAPI_IS_DISPLAY_X11(display), NULL);
     g_return_val_if_fail(xid != None, NULL);
index d1afc44..32e01cb 100644 (file)
@@ -122,7 +122,7 @@ gst_vaapiencode_default_allocate_buffer (GstVaapiEncode * encode,
   /* ERRORS */
 error_invalid_buffer:
   {
-    GST_ERROR ("invalid GstVaapiCodedBuffer size (%d)", buf_size);
+    GST_ERROR ("invalid GstVaapiCodedBuffer size (%d bytes)", buf_size);
     return GST_VAAPI_ENCODE_FLOW_MEM_ERROR;
   }
 error_create_buffer:
@@ -202,7 +202,7 @@ gst_vaapiencode_push_frame (GstVaapiEncode * encode, gint64 timeout)
   }
   GST_VIDEO_ENCODER_STREAM_UNLOCK (encode);
 
-  GST_DEBUG ("output:%" GST_TIME_FORMAT ", size:%d",
+  GST_DEBUG ("output:%" GST_TIME_FORMAT ", size:%zu",
       GST_TIME_ARGS (out_frame->pts), gst_buffer_get_size (out_buffer));
 
   return gst_video_encoder_finish_frame (venc, out_frame);