diff --git a/examples/c/overlays.c b/examples/c/overlays.c index d0edc3b5b2..b646a07547 100644 --- a/examples/c/overlays.c +++ b/examples/c/overlays.c @@ -68,8 +68,8 @@ make_overlay (char *text, guint64 start, guint64 duration, gint priority, "priority", (guint32) priority, "in-point", (guint64) 0, "color", (guint32) color, - "valignment", (gint) GES_TEXT_VALIGN_POSITION, - "halignment", (gint) GES_TEXT_HALIGN_POSITION, + "valignment", (gint) GES_TEXT_VALIGN_ABSOLUTE, + "halignment", (gint) GES_TEXT_HALIGN_ABSOLUTE, "xpos", (gdouble) xpos, "ypos", (gdouble) ypos, NULL); return ret; diff --git a/ges/ges-enums.c b/ges/ges-enums.c index eadd4d656c..1c5524a2a1 100644 --- a/ges/ges-enums.c +++ b/ges/ges-enums.c @@ -420,8 +420,8 @@ ges_text_valign_get_type (void) {GES_TEXT_VALIGN_BASELINE, "GES_TEXT_VALIGN_BASELINE", "baseline"}, {GES_TEXT_VALIGN_BOTTOM, "GES_TEXT_VALIGN_BOTTOM", "bottom"}, {GES_TEXT_VALIGN_TOP, "GES_TEXT_VALIGN_TOP", "top"}, - {GES_TEXT_VALIGN_POSITION, "GES_TEXT_VALIGN_POSITION", "position"}, {GES_TEXT_VALIGN_CENTER, "GES_TEXT_VALIGN_CENTER", "center"}, + {GES_TEXT_VALIGN_ABSOLUTE, "GES_TEXT_VALIGN_ABSOLUTE", "absolute"}, {0, NULL, NULL}, }; @@ -442,7 +442,7 @@ ges_text_halign_get_type (void) {GES_TEXT_HALIGN_LEFT, "GES_TEXT_HALIGN_LEFT", "left"}, {GES_TEXT_HALIGN_CENTER, "GES_TEXT_HALIGN_CENTER", "center"}, {GES_TEXT_HALIGN_RIGHT, "GES_TEXT_HALIGN_RIGHT", "right"}, - {GES_TEXT_HALIGN_POSITION, "GES_TEXT_HALIGN_POSITION", "position"}, + {GES_TEXT_HALIGN_ABSOLUTE, "GES_TEXT_HALIGN_ABSOLUTE", "absolute"}, {0, NULL, NULL}, }; diff --git a/ges/ges-enums.h b/ges/ges-enums.h index 1e11a00165..5dda837be6 100644 --- a/ges/ges-enums.h +++ b/ges/ges-enums.h @@ -235,11 +235,11 @@ GType ges_video_standard_transition_type_get_type (void); * Vertical alignment of the text. */ typedef enum { - GES_TEXT_VALIGN_BASELINE, - GES_TEXT_VALIGN_BOTTOM, - GES_TEXT_VALIGN_TOP, - GES_TEXT_VALIGN_POSITION, - GES_TEXT_VALIGN_CENTER + GES_TEXT_VALIGN_BASELINE = 0, + GES_TEXT_VALIGN_BOTTOM = 1, + GES_TEXT_VALIGN_TOP = 2, + GES_TEXT_VALIGN_CENTER = 4, + GES_TEXT_VALIGN_ABSOLUTE = 5, } GESTextVAlign; #define DEFAULT_VALIGNMENT GES_TEXT_VALIGN_BASELINE @@ -262,7 +262,7 @@ typedef enum { GES_TEXT_HALIGN_LEFT = 0, GES_TEXT_HALIGN_CENTER = 1, GES_TEXT_HALIGN_RIGHT = 2, - GES_TEXT_HALIGN_POSITION = 4 + GES_TEXT_HALIGN_ABSOLUTE = 5 } GESTextHAlign; #define DEFAULT_HALIGNMENT GES_TEXT_HALIGN_CENTER diff --git a/ges/ges-title-source.c b/ges/ges-title-source.c index 95772e98d5..2b9ef680bd 100644 --- a/ges/ges-title-source.c +++ b/ges/ges-title-source.c @@ -106,8 +106,8 @@ struct _GESTitleSourcePrivate GESTextVAlign valign; guint32 color; guint32 background; - gdouble xpos; - gdouble ypos; + gdouble xabsolute; + gdouble yabsolute; GstElement *text_el; GstElement *background_el; }; @@ -181,8 +181,8 @@ ges_title_source_init (GESTitleSource * self) self->priv->valign = DEFAULT_VALIGNMENT; self->priv->color = G_MAXUINT32; self->priv->background = G_MAXUINT32; - self->priv->xpos = 0.5; - self->priv->ypos = 0.5; + self->priv->xabsolute = 0.5; + self->priv->yabsolute = 0.5; self->priv->background_el = NULL; } @@ -241,7 +241,7 @@ ges_title_source_create_source (GESTrackElement * object) GESTitleSourcePrivate *priv = self->priv; const gchar *bg_props[] = { "pattern", "foreground-color", NULL }; const gchar *text_props[] = { "text", "font-desc", "valignment", "halignment", - "color", "xpos", "ypos", "outline-color", "shaded-background", + "color", "x-absolute", "y-absolute", "outline-color", "shaded-background", "text-x", "text-y", "text-width", "text-height", NULL }; @@ -258,8 +258,8 @@ ges_title_source_create_source (GESTrackElement * object) g_object_set (text, "valignment", (gint) priv->valign, "halignment", (gint) priv->halign, NULL); g_object_set (text, "color", (guint) self->priv->color, NULL); - g_object_set (text, "xpos", (gdouble) self->priv->xpos, NULL); - g_object_set (text, "ypos", (gdouble) self->priv->ypos, NULL); + g_object_set (text, "x-absolute", (gdouble) self->priv->xabsolute, NULL); + g_object_set (text, "y-absolute", (gdouble) self->priv->yabsolute, NULL); g_object_set (background, "pattern", (gint) GES_VIDEO_TEST_PATTERN_SOLID, @@ -406,37 +406,37 @@ ges_title_source_set_background_color (GESTitleSource * self, guint32 color) } /** - * ges_title_source_set_xpos: + * ges_title_source_set_xabsolute: * @self: the #GESTitleSource* to set * @position: the horizontal position @self is being set to * * Sets the horizontal position of the text. */ void -ges_title_source_set_xpos (GESTitleSource * self, gdouble position) +ges_title_source_set_xabsolute (GESTitleSource * self, gdouble position) { - GST_DEBUG ("self:%p, xpos:%f", self, position); + GST_DEBUG ("self:%p, x-absolute:%f", self, position); - self->priv->xpos = position; + self->priv->xabsolute = position; if (self->priv->text_el) - g_object_set (self->priv->text_el, "xpos", position, NULL); + g_object_set (self->priv->text_el, "x-absolute", position, NULL); } /** - * ges_title_source_set_ypos: + * ges_title_source_set_yabsolute: * @self: the #GESTitleSource* to set * @position: the color @self is being set to * * Sets the vertical position of the text. */ void -ges_title_source_set_ypos (GESTitleSource * self, gdouble position) +ges_title_source_set_yabsolute (GESTitleSource * self, gdouble position) { - GST_DEBUG ("self:%p, ypos:%f", self, position); + GST_DEBUG ("self:%p, y-absolute:%f", self, position); - self->priv->ypos = position; + self->priv->yabsolute = position; if (self->priv->text_el) - g_object_set (self->priv->text_el, "ypos", position, NULL); + g_object_set (self->priv->text_el, "y-absolute", position, NULL); } /** @@ -555,7 +555,7 @@ ges_title_source_get_background_color (GESTitleSource * source) } /** - * ges_title_source_get_xpos: + * ges_title_source_get_xabsolute: * @source: a #GESTitleSource * * Get the horizontal position used by @source. @@ -563,18 +563,18 @@ ges_title_source_get_background_color (GESTitleSource * source) * Returns: The horizontal position used by @source. */ const gdouble -ges_title_source_get_xpos (GESTitleSource * source) +ges_title_source_get_xabsolute (GESTitleSource * source) { - gdouble xpos; + gdouble xabsolute; - ges_track_element_get_child_properties (GES_TRACK_ELEMENT (source), "xpos", - &xpos, NULL); + ges_track_element_get_child_properties (GES_TRACK_ELEMENT (source), + "x-absolute", &xabsolute, NULL); - return xpos; + return xabsolute; } /** - * ges_title_source_get_ypos: + * ges_title_source_get_yabsolute: * @source: a #GESTitleSource * * Get the vertical position used by @source. @@ -582,14 +582,14 @@ ges_title_source_get_xpos (GESTitleSource * source) * Returns: The vertical position used by @source. */ const gdouble -ges_title_source_get_ypos (GESTitleSource * source) +ges_title_source_get_yabsolute (GESTitleSource * source) { - gdouble ypos; + gdouble yabsolute; - ges_track_element_get_child_properties (GES_TRACK_ELEMENT (source), "ypos", - &ypos, NULL); + ges_track_element_get_child_properties (GES_TRACK_ELEMENT (source), + "y-absolute", &yabsolute, NULL); - return ypos; + return yabsolute; } /** diff --git a/ges/ges-title-source.h b/ges/ges-title-source.h index 49f835ad82..c4511e2295 100644 --- a/ges/ges-title-source.h +++ b/ges/ges-title-source.h @@ -92,9 +92,9 @@ void ges_title_source_set_text_color (GESTitleSource *self, guint32 color); void ges_title_source_set_background_color (GESTitleSource *self, guint32 color); -void ges_title_source_set_xpos (GESTitleSource *self, +void ges_title_source_set_xabsolute (GESTitleSource *self, gdouble position); -void ges_title_source_set_ypos (GESTitleSource *self, +void ges_title_source_set_yabsolute (GESTitleSource *self, gdouble position); const gchar *ges_title_source_get_text (GESTitleSource *source); @@ -103,8 +103,8 @@ GESTextHAlign ges_title_source_get_halignment (GESTitleSource *source); GESTextVAlign ges_title_source_get_valignment (GESTitleSource *source); const guint32 ges_title_source_get_text_color (GESTitleSource *source); const guint32 ges_title_source_get_background_color (GESTitleSource *source); -const gdouble ges_title_source_get_xpos (GESTitleSource *source); -const gdouble ges_title_source_get_ypos (GESTitleSource *source); +const gdouble ges_title_source_get_xabsolute (GESTitleSource *source); +const gdouble ges_title_source_get_yabsolute (GESTitleSource *source); G_END_DECLS