Improve debug info for gst_vaapisink_ensure_render_rect().
authorgb <gb@5584edef-b1fe-4b99-b61b-dd2bab72e969>
Sat, 15 May 2010 04:25:32 +0000 (04:25 +0000)
committerGwenole Beauchesne <gbeauchesne@splitted-desktop.com>
Mon, 20 Sep 2010 10:55:46 +0000 (12:55 +0200)
gst/vaapisink/gstvaapisink.c

index 4d15c1c..1dcb4f4 100644 (file)
@@ -207,6 +207,8 @@ gst_vaapisink_ensure_render_rect(GstVaapiSink *sink, guint width, guint height)
     double display_ratio;
     gboolean success;
 
+    GST_DEBUG("ensure render rect within %ux%u bounds", width, height);
+
     gst_vaapi_display_get_pixel_aspect_ratio(
         sink->display,
         &display_par_n, &display_par_d
@@ -222,7 +224,7 @@ gst_vaapisink_ensure_render_rect(GstVaapiSink *sink, guint width, guint height)
     );
     if (!success)
         return FALSE;
-    GST_DEBUG("video size %dx%d, calculated render ratio %d/%d",
+    GST_DEBUG("video size %dx%d, calculated ratio %d/%d",
               sink->video_width, sink->video_height, num, den);
 
     if ((sink->video_height % den) == 0) {
@@ -257,7 +259,6 @@ gst_vaapisink_ensure_render_rect(GstVaapiSink *sink, guint width, guint height)
             display_rect->height = height;
         }
     }
-    GST_DEBUG("display size %ux%u", display_rect->width, display_rect->height);
 
     if (sink->fullscreen) {
         display_rect->x  = (width  - display_rect->width)  / 2;
@@ -267,6 +268,10 @@ gst_vaapisink_ensure_render_rect(GstVaapiSink *sink, guint width, guint height)
         display_rect->x  = 0;
         display_rect->y  = 0;
     }
+
+    GST_DEBUG("render rect (%d,%d):%ux%u",
+              display_rect->x, display_rect->y,
+              display_rect->width, display_rect->height);
     return TRUE;
 }