summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@gnome.org>2016-03-11 17:31:15 +0100
committerThibault Saunier <tsaunier@gnome.org>2016-03-11 17:31:15 +0100
commit024117642ac94ea08cf6ca713c3e886673933223 (patch)
tree466b3a882078bacf39fe4caab95dbf785d333f4c
parent8ce2b97a936c13a48bc3ef97eb19c557e00e3a6a (diff)
Revert "titlesource: use x/yabsolute instead of x/ypos."
This reverts commit c4356db40c6e50f7314a75ea65d46f9f21ef0a5d. This commit was not ready and was not support to be pushed
-rw-r--r--examples/c/overlays.c4
-rw-r--r--ges/ges-enums.c4
-rw-r--r--ges/ges-enums.h12
-rw-r--r--ges/ges-title-source.c58
-rw-r--r--ges/ges-title-source.h8
5 files changed, 43 insertions, 43 deletions
diff --git a/examples/c/overlays.c b/examples/c/overlays.c
index b646a075..d0edc3b5 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_ABSOLUTE,
- "halignment", (gint) GES_TEXT_HALIGN_ABSOLUTE,
+ "valignment", (gint) GES_TEXT_VALIGN_POSITION,
+ "halignment", (gint) GES_TEXT_HALIGN_POSITION,
"xpos", (gdouble) xpos, "ypos", (gdouble) ypos, NULL);
return ret;
diff --git a/ges/ges-enums.c b/ges/ges-enums.c
index 1c5524a2..eadd4d65 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_ABSOLUTE, "GES_TEXT_HALIGN_ABSOLUTE", "absolute"},
+ {GES_TEXT_HALIGN_POSITION, "GES_TEXT_HALIGN_POSITION", "position"},
{0, NULL, NULL},
};
diff --git a/ges/ges-enums.h b/ges/ges-enums.h
index 5dda837b..1e11a001 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 = 0,
- GES_TEXT_VALIGN_BOTTOM = 1,
- GES_TEXT_VALIGN_TOP = 2,
- GES_TEXT_VALIGN_CENTER = 4,
- GES_TEXT_VALIGN_ABSOLUTE = 5,
+ GES_TEXT_VALIGN_BASELINE,
+ GES_TEXT_VALIGN_BOTTOM,
+ GES_TEXT_VALIGN_TOP,
+ GES_TEXT_VALIGN_POSITION,
+ GES_TEXT_VALIGN_CENTER
} 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_ABSOLUTE = 5
+ GES_TEXT_HALIGN_POSITION = 4
} GESTextHAlign;
#define DEFAULT_HALIGNMENT GES_TEXT_HALIGN_CENTER
diff --git a/ges/ges-title-source.c b/ges/ges-title-source.c
index 2b9ef680..95772e98 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 xabsolute;
- gdouble yabsolute;
+ gdouble xpos;
+ gdouble ypos;
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->xabsolute = 0.5;
- self->priv->yabsolute = 0.5;
+ self->priv->xpos = 0.5;
+ self->priv->ypos = 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", "x-absolute", "y-absolute", "outline-color", "shaded-background",
+ "color", "xpos", "ypos", "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, "x-absolute", (gdouble) self->priv->xabsolute, NULL);
- g_object_set (text, "y-absolute", (gdouble) self->priv->yabsolute, NULL);
+ g_object_set (text, "xpos", (gdouble) self->priv->xpos, NULL);
+ g_object_set (text, "ypos", (gdouble) self->priv->ypos, 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_xabsolute:
+ * ges_title_source_set_xpos:
* @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_xabsolute (GESTitleSource * self, gdouble position)
+ges_title_source_set_xpos (GESTitleSource * self, gdouble position)
{
- GST_DEBUG ("self:%p, x-absolute:%f", self, position);
+ GST_DEBUG ("self:%p, xpos:%f", self, position);
- self->priv->xabsolute = position;
+ self->priv->xpos = position;
if (self->priv->text_el)
- g_object_set (self->priv->text_el, "x-absolute", position, NULL);
+ g_object_set (self->priv->text_el, "xpos", position, NULL);
}
/**
- * ges_title_source_set_yabsolute:
+ * ges_title_source_set_ypos:
* @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_yabsolute (GESTitleSource * self, gdouble position)
+ges_title_source_set_ypos (GESTitleSource * self, gdouble position)
{
- GST_DEBUG ("self:%p, y-absolute:%f", self, position);
+ GST_DEBUG ("self:%p, ypos:%f", self, position);
- self->priv->yabsolute = position;
+ self->priv->ypos = position;
if (self->priv->text_el)
- g_object_set (self->priv->text_el, "y-absolute", position, NULL);
+ g_object_set (self->priv->text_el, "ypos", position, NULL);
}
/**
@@ -555,7 +555,7 @@ ges_title_source_get_background_color (GESTitleSource * source)
}
/**
- * ges_title_source_get_xabsolute:
+ * ges_title_source_get_xpos:
* @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_xabsolute (GESTitleSource * source)
+ges_title_source_get_xpos (GESTitleSource * source)
{
- gdouble xabsolute;
+ gdouble xpos;
- ges_track_element_get_child_properties (GES_TRACK_ELEMENT (source),
- "x-absolute", &xabsolute, NULL);
+ ges_track_element_get_child_properties (GES_TRACK_ELEMENT (source), "xpos",
+ &xpos, NULL);
- return xabsolute;
+ return xpos;
}
/**
- * ges_title_source_get_yabsolute:
+ * ges_title_source_get_ypos:
* @source: a #GESTitleSource
*
* Get the vertical position used by @source.
@@ -582,14 +582,14 @@ ges_title_source_get_xabsolute (GESTitleSource * source)
* Returns: The vertical position used by @source.
*/
const gdouble
-ges_title_source_get_yabsolute (GESTitleSource * source)
+ges_title_source_get_ypos (GESTitleSource * source)
{
- gdouble yabsolute;
+ gdouble ypos;
- ges_track_element_get_child_properties (GES_TRACK_ELEMENT (source),
- "y-absolute", &yabsolute, NULL);
+ ges_track_element_get_child_properties (GES_TRACK_ELEMENT (source), "ypos",
+ &ypos, NULL);
- return yabsolute;
+ return ypos;
}
/**
diff --git a/ges/ges-title-source.h b/ges/ges-title-source.h
index c4511e22..49f835ad 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_xabsolute (GESTitleSource *self,
+void ges_title_source_set_xpos (GESTitleSource *self,
gdouble position);
-void ges_title_source_set_yabsolute (GESTitleSource *self,
+void ges_title_source_set_ypos (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_xabsolute (GESTitleSource *source);
-const gdouble ges_title_source_get_yabsolute (GESTitleSource *source);
+const gdouble ges_title_source_get_xpos (GESTitleSource *source);
+const gdouble ges_title_source_get_ypos (GESTitleSource *source);
G_END_DECLS