textoverlay: Expose rendering dimensions as properties.
[platform/upstream/gstreamer.git] / ext / pango / gstbasetextoverlay.h
index ef06394..76fb10d 100644 (file)
@@ -143,8 +143,8 @@ struct _GstBaseTextOverlay {
     /* stream metrics */
     GstVideoInfo             info;
     GstVideoFormat           format;
-    gint                     stream_width;
-    gint                     stream_height;
+    gint                     width;
+    gint                     height;
 
     /* properties */
     gint                     xpad;
@@ -176,23 +176,31 @@ struct _GstBaseTextOverlay {
     gboolean                 need_render;
     GstBuffer               *text_image;
 
-    /* rendering canvas dimension, this is adjusted to compensate the
-     * downstream reported window size. */
-    gint                     width;
-    gint                     height;
+    /* dimension relative to witch the render is done, this is the stream size
+     * or a portion of the window_size (adapted to aspect ratio) */
+    gint                     render_width;
+    gint                     render_height;
+    /* This is (render_width / width) uses to convert to stream scale */
+    gdouble                  render_scale;
 
     /* dimension of text_image, the physical dimension */
-    gint                     image_width;
-    gint                     image_height;
+    guint                    text_width;
+    guint                    text_height;
+
+    /* position of rendering in image coordinates */
+    gint                     text_x;
+    gint                     text_y;
 
     /* window dimension, reported in the composition meta params. This is set
-     * to stream_width, stream_height if missing */
+     * to stream width, height if missing */
     gint                     window_width;
     gint                     window_height;
 
     gdouble                  shadow_offset;
     gdouble                  outline_offset;
-    gint                     baseline_y;
+
+    PangoRectangle           ink_rect;
+    PangoRectangle           logical_rect;
 
     gboolean                    attach_compo_to_buffer;
     GstVideoOverlayComposition *composition;