GESTrackVideoTitleSource -> GESTrackTitleSource

This commit is contained in:
Brandon Lewis 2010-06-30 17:29:21 +02:00 committed by Edward Hervey
parent 44781f9e39
commit 526e37589b
10 changed files with 136 additions and 142 deletions

View file

@ -63,12 +63,10 @@ ges_tl_overlay_set_font_desc (GESTimelineOverlay * self, const gchar *
font_desc); font_desc);
static void static void
ges_tl_overlay_set_valign (GESTimelineOverlay * self, ges_tl_overlay_set_valign (GESTimelineOverlay * self, GESTrackTitleSrcVAlign);
GESTrackVideoTitleSrcVAlign);
static void static void
ges_tl_overlay_set_halign (GESTimelineOverlay * self, ges_tl_overlay_set_halign (GESTimelineOverlay * self, GESTrackTitleSrcHAlign);
GESTrackVideoTitleSrcHAlign);
static GESTrackObject static GESTrackObject
* ges_tl_overlay_create_track_object (GESTimelineObject * obj, * ges_tl_overlay_create_track_object (GESTimelineObject * obj,
@ -233,9 +231,9 @@ ges_timeline_overlay_valign_get_type (void)
static GType text_overlay_valign_type = 0; static GType text_overlay_valign_type = 0;
static gsize initialized = 0; static gsize initialized = 0;
static const GEnumValue text_overlay_valign[] = { static const GEnumValue text_overlay_valign[] = {
{GES_TRACK_VIDEO_TITLE_SRC_VALIGN_BASELINE, "baseline", "baseline"}, {GES_TRACK_TITLE_SRC_VALIGN_BASELINE, "baseline", "baseline"},
{GES_TRACK_VIDEO_TITLE_SRC_VALIGN_BOTTOM, "bottom", "bottom"}, {GES_TRACK_TITLE_SRC_VALIGN_BOTTOM, "bottom", "bottom"},
{GES_TRACK_VIDEO_TITLE_SRC_VALIGN_TOP, "top", "top"}, {GES_TRACK_TITLE_SRC_VALIGN_TOP, "top", "top"},
{0, NULL, NULL}, {0, NULL, NULL},
}; };
@ -254,9 +252,9 @@ ges_timeline_overlay_halign_get_type (void)
static GType text_overlay_halign_type = 0; static GType text_overlay_halign_type = 0;
static gsize initialized = 0; static gsize initialized = 0;
static const GEnumValue text_overlay_halign[] = { static const GEnumValue text_overlay_halign[] = {
{GES_TRACK_VIDEO_TITLE_SRC_HALIGN_LEFT, "left", "left"}, {GES_TRACK_TITLE_SRC_HALIGN_LEFT, "left", "left"},
{GES_TRACK_VIDEO_TITLE_SRC_HALIGN_CENTER, "center", "center"}, {GES_TRACK_TITLE_SRC_HALIGN_CENTER, "center", "center"},
{GES_TRACK_VIDEO_TITLE_SRC_HALIGN_RIGHT, "right", "right"}, {GES_TRACK_TITLE_SRC_HALIGN_RIGHT, "right", "right"},
{0, NULL, NULL}, {0, NULL, NULL},
}; };
@ -317,7 +315,7 @@ ges_tl_overlay_set_font_desc (GESTimelineOverlay * self, const gchar *
static void static void
ges_tl_overlay_set_halign (GESTimelineOverlay * self, ges_tl_overlay_set_halign (GESTimelineOverlay * self,
GESTrackVideoTitleSrcHAlign halign) GESTrackTitleSrcHAlign halign)
{ {
GList *tmp; GList *tmp;
GESTimelineObject *object = (GESTimelineObject *) self; GESTimelineObject *object = (GESTimelineObject *) self;
@ -339,7 +337,7 @@ ges_tl_overlay_set_halign (GESTimelineOverlay * self,
static void static void
ges_tl_overlay_set_valign (GESTimelineOverlay * self, ges_tl_overlay_set_valign (GESTimelineOverlay * self,
GESTrackVideoTitleSrcVAlign valign) GESTrackTitleSrcVAlign valign)
{ {
GList *tmp; GList *tmp;
GESTimelineObject *object = (GESTimelineObject *) self; GESTimelineObject *object = (GESTimelineObject *) self;

View file

@ -66,11 +66,11 @@ ges_tl_title_src_set_font_desc (GESTimelineTitleSource * self, const gchar *
static void static void
ges_tl_title_src_set_valign (GESTimelineTitleSource * self, ges_tl_title_src_set_valign (GESTimelineTitleSource * self,
GESTrackVideoTitleSrcVAlign); GESTrackTitleSrcVAlign);
static void static void
ges_tl_title_src_set_halign (GESTimelineTitleSource * self, ges_tl_title_src_set_halign (GESTimelineTitleSource * self,
GESTrackVideoTitleSrcHAlign); GESTrackTitleSrcHAlign);
static GESTrackObject static GESTrackObject
* ges_tl_title_src_create_track_object (GESTimelineObject * obj, * ges_tl_title_src_create_track_object (GESTimelineObject * obj,
@ -235,9 +235,9 @@ ges_timeline_title_source_valign_get_type (void)
static GType text_overlay_valign_type = 0; static GType text_overlay_valign_type = 0;
static gsize initialized = 0; static gsize initialized = 0;
static const GEnumValue text_overlay_valign[] = { static const GEnumValue text_overlay_valign[] = {
{GES_TRACK_VIDEO_TITLE_SRC_VALIGN_BASELINE, "baseline", "baseline"}, {GES_TRACK_TITLE_SRC_VALIGN_BASELINE, "baseline", "baseline"},
{GES_TRACK_VIDEO_TITLE_SRC_VALIGN_BOTTOM, "bottom", "bottom"}, {GES_TRACK_TITLE_SRC_VALIGN_BOTTOM, "bottom", "bottom"},
{GES_TRACK_VIDEO_TITLE_SRC_VALIGN_TOP, "top", "top"}, {GES_TRACK_TITLE_SRC_VALIGN_TOP, "top", "top"},
{0, NULL, NULL}, {0, NULL, NULL},
}; };
@ -256,9 +256,9 @@ ges_timeline_title_source_halign_get_type (void)
static GType text_overlay_halign_type = 0; static GType text_overlay_halign_type = 0;
static gsize initialized = 0; static gsize initialized = 0;
static const GEnumValue text_overlay_halign[] = { static const GEnumValue text_overlay_halign[] = {
{GES_TRACK_VIDEO_TITLE_SRC_HALIGN_LEFT, "left", "left"}, {GES_TRACK_TITLE_SRC_HALIGN_LEFT, "left", "left"},
{GES_TRACK_VIDEO_TITLE_SRC_HALIGN_CENTER, "center", "center"}, {GES_TRACK_TITLE_SRC_HALIGN_CENTER, "center", "center"},
{GES_TRACK_VIDEO_TITLE_SRC_HALIGN_RIGHT, "right", "right"}, {GES_TRACK_TITLE_SRC_HALIGN_RIGHT, "right", "right"},
{0, NULL, NULL}, {0, NULL, NULL},
}; };
@ -288,7 +288,7 @@ ges_tl_title_src_set_text (GESTimelineTitleSource * self, const gchar * text)
GESTrackObject *trackobject = (GESTrackObject *) tmp->data; GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
if (trackobject->track->type == GES_TRACK_TYPE_VIDEO) if (trackobject->track->type == GES_TRACK_TYPE_VIDEO)
ges_track_video_title_source_set_text (GES_TRACK_VIDEO_TITLE_SOURCE ges_track_title_source_set_text (GES_TRACK_TITLE_SOURCE
(trackobject), self->text); (trackobject), self->text);
} }
} }
@ -311,14 +311,14 @@ ges_tl_title_src_set_font_desc (GESTimelineTitleSource * self, const gchar *
GESTrackObject *trackobject = (GESTrackObject *) tmp->data; GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
if (trackobject->track->type == GES_TRACK_TYPE_VIDEO) if (trackobject->track->type == GES_TRACK_TYPE_VIDEO)
ges_track_video_title_source_set_font_desc (GES_TRACK_VIDEO_TITLE_SOURCE ges_track_title_source_set_font_desc (GES_TRACK_TITLE_SOURCE
(trackobject), self->font_desc); (trackobject), self->font_desc);
} }
} }
static void static void
ges_tl_title_src_set_halign (GESTimelineTitleSource * self, ges_tl_title_src_set_halign (GESTimelineTitleSource * self,
GESTrackVideoTitleSrcHAlign halign) GESTrackTitleSrcHAlign halign)
{ {
GList *tmp; GList *tmp;
GESTimelineObject *object = (GESTimelineObject *) self; GESTimelineObject *object = (GESTimelineObject *) self;
@ -331,14 +331,14 @@ ges_tl_title_src_set_halign (GESTimelineTitleSource * self,
GESTrackObject *trackobject = (GESTrackObject *) tmp->data; GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
if (trackobject->track->type == GES_TRACK_TYPE_VIDEO) if (trackobject->track->type == GES_TRACK_TYPE_VIDEO)
ges_track_video_title_source_set_halignment (GES_TRACK_VIDEO_TITLE_SOURCE ges_track_title_source_set_halignment (GES_TRACK_TITLE_SOURCE
(trackobject), self->halign); (trackobject), self->halign);
} }
} }
static void static void
ges_tl_title_src_set_valign (GESTimelineTitleSource * self, ges_tl_title_src_set_valign (GESTimelineTitleSource * self,
GESTrackVideoTitleSrcVAlign valign) GESTrackTitleSrcVAlign valign)
{ {
GList *tmp; GList *tmp;
GESTimelineObject *object = (GESTimelineObject *) self; GESTimelineObject *object = (GESTimelineObject *) self;
@ -351,7 +351,7 @@ ges_tl_title_src_set_valign (GESTimelineTitleSource * self,
GESTrackObject *trackobject = (GESTrackObject *) tmp->data; GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
if (trackobject->track->type == GES_TRACK_TYPE_VIDEO) if (trackobject->track->type == GES_TRACK_TYPE_VIDEO)
ges_track_video_title_source_set_valignment (GES_TRACK_VIDEO_TITLE_SOURCE ges_track_title_source_set_valignment (GES_TRACK_TITLE_SOURCE
(trackobject), self->valign); (trackobject), self->valign);
} }
} }
@ -385,10 +385,9 @@ ges_tl_title_src_create_track_object (GESTimelineObject * obj, GESTrack * track)
GST_DEBUG ("Creating a GESTrackTitleSource"); GST_DEBUG ("Creating a GESTrackTitleSource");
if (track->type == GES_TRACK_TYPE_VIDEO) { if (track->type == GES_TRACK_TYPE_VIDEO) {
res = (GESTrackObject *) ges_track_video_title_source_new (); res = (GESTrackObject *) ges_track_title_source_new ();
GST_DEBUG ("Setting text property"); GST_DEBUG ("Setting text property");
ges_track_video_title_source_set_text ( ges_track_title_source_set_text ((GESTrackTitleSource *) res, tfs->text);
(GESTrackVideoTitleSource *) res, tfs->text);
} }
else if (track->type == GES_TRACK_TYPE_AUDIO) { else if (track->type == GES_TRACK_TYPE_AUDIO) {

View file

@ -19,7 +19,7 @@
*/ */
/** /**
* SECTION:ges-title-source * SECTION:ges-track-overlay
* @short_description: Base Class for single-media sources * @short_description: Base Class for single-media sources
*/ */

View file

@ -28,29 +28,27 @@
#include "ges-track-title-source.h" #include "ges-track-title-source.h"
#include "ges-track-video-background-source.h" #include "ges-track-video-background-source.h"
G_DEFINE_TYPE (GESTrackVideoTitleSource, ges_track_video_title_src, G_DEFINE_TYPE (GESTrackTitleSource, ges_track_title_src, GES_TYPE_TRACK_SOURCE);
GES_TYPE_TRACK_SOURCE);
enum enum
{ {
PROP_0, PROP_0,
}; };
static void ges_track_video_title_src_dispose (GObject * object); static void ges_track_title_src_dispose (GObject * object);
static void ges_track_video_title_src_finalize (GObject * object); static void ges_track_title_src_finalize (GObject * object);
static void ges_track_video_title_src_get_property (GObject * object, guint static void ges_track_title_src_get_property (GObject * object, guint
property_id, GValue * value, GParamSpec * pspec); property_id, GValue * value, GParamSpec * pspec);
static void ges_track_video_title_src_set_property (GObject * object, guint static void ges_track_title_src_set_property (GObject * object, guint
property_id, const GValue * value, GParamSpec * pspec); property_id, const GValue * value, GParamSpec * pspec);
static GstElement *ges_track_video_title_src_create_element (GESTrackSource static GstElement *ges_track_title_src_create_element (GESTrackSource * self);
* self);
static void static void
ges_track_video_title_src_class_init (GESTrackVideoTitleSourceClass * klass) ges_track_title_src_class_init (GESTrackTitleSourceClass * klass)
{ {
GObjectClass *object_class; GObjectClass *object_class;
GESTrackSourceClass *bg_class; GESTrackSourceClass *bg_class;
@ -58,16 +56,16 @@ ges_track_video_title_src_class_init (GESTrackVideoTitleSourceClass * klass)
object_class = G_OBJECT_CLASS (klass); object_class = G_OBJECT_CLASS (klass);
bg_class = GES_TRACK_SOURCE_CLASS (klass); bg_class = GES_TRACK_SOURCE_CLASS (klass);
object_class->get_property = ges_track_video_title_src_get_property; object_class->get_property = ges_track_title_src_get_property;
object_class->set_property = ges_track_video_title_src_set_property; object_class->set_property = ges_track_title_src_set_property;
object_class->dispose = ges_track_video_title_src_dispose; object_class->dispose = ges_track_title_src_dispose;
object_class->finalize = ges_track_video_title_src_finalize; object_class->finalize = ges_track_title_src_finalize;
bg_class->create_element = ges_track_video_title_src_create_element; bg_class->create_element = ges_track_title_src_create_element;
} }
static void static void
ges_track_video_title_src_init (GESTrackVideoTitleSource * self) ges_track_title_src_init (GESTrackTitleSource * self)
{ {
self->text = NULL; self->text = NULL;
self->font_desc = g_strdup (DEFAULT_FONT_DESC); self->font_desc = g_strdup (DEFAULT_FONT_DESC);
@ -78,9 +76,9 @@ ges_track_video_title_src_init (GESTrackVideoTitleSource * self)
} }
static void static void
ges_track_video_title_src_dispose (GObject * object) ges_track_title_src_dispose (GObject * object)
{ {
GESTrackVideoTitleSource *self = GES_TRACK_VIDEO_TITLE_SOURCE (object); GESTrackTitleSource *self = GES_TRACK_TITLE_SOURCE (object);
if (self->text) { if (self->text) {
g_free (self->text); g_free (self->text);
} }
@ -99,17 +97,17 @@ ges_track_video_title_src_dispose (GObject * object)
self->background_el = NULL; self->background_el = NULL;
} }
G_OBJECT_CLASS (ges_track_video_title_src_parent_class)->dispose (object); G_OBJECT_CLASS (ges_track_title_src_parent_class)->dispose (object);
} }
static void static void
ges_track_video_title_src_finalize (GObject * object) ges_track_title_src_finalize (GObject * object)
{ {
G_OBJECT_CLASS (ges_track_video_title_src_parent_class)->finalize (object); G_OBJECT_CLASS (ges_track_title_src_parent_class)->finalize (object);
} }
static void static void
ges_track_video_title_src_get_property (GObject * object, ges_track_title_src_get_property (GObject * object,
guint property_id, GValue * value, GParamSpec * pspec) guint property_id, GValue * value, GParamSpec * pspec)
{ {
switch (property_id) { switch (property_id) {
@ -119,7 +117,7 @@ ges_track_video_title_src_get_property (GObject * object,
} }
static void static void
ges_track_video_title_src_set_property (GObject * object, ges_track_title_src_set_property (GObject * object,
guint property_id, const GValue * value, GParamSpec * pspec) guint property_id, const GValue * value, GParamSpec * pspec)
{ {
switch (property_id) { switch (property_id) {
@ -129,9 +127,9 @@ ges_track_video_title_src_set_property (GObject * object,
} }
static GstElement * static GstElement *
ges_track_video_title_src_create_element (GESTrackSource * object) ges_track_title_src_create_element (GESTrackSource * object)
{ {
GESTrackVideoTitleSource *self = GES_TRACK_VIDEO_TITLE_SOURCE (object); GESTrackTitleSource *self = GES_TRACK_TITLE_SOURCE (object);
GstElement *topbin, *background, *text; GstElement *topbin, *background, *text;
GstPad *src; GstPad *src;
@ -168,8 +166,8 @@ ges_track_video_title_src_create_element (GESTrackSource * object)
} }
/** /**
* ges_track_video_title_source_set_text: * ges_track_title_source_set_text:
* @self: the #GESTrackVideoTitleSource* to set text on * @self: the #GESTrackTitleSource* to set text on
* @text: the text to render. an internal copy of this text will be * @text: the text to render. an internal copy of this text will be
* made. * made.
* *
@ -178,8 +176,7 @@ ges_track_video_title_src_create_element (GESTrackSource * object)
*/ */
void void
ges_track_video_title_source_set_text (GESTrackVideoTitleSource * self, ges_track_title_source_set_text (GESTrackTitleSource * self, const gchar * text)
const gchar * text)
{ {
if (self->text) if (self->text)
g_free (self->text); g_free (self->text);
@ -190,8 +187,8 @@ ges_track_video_title_source_set_text (GESTrackVideoTitleSource * self,
} }
/** /**
* ges_track_video_title_source_set_font_desc: * ges_track_title_source_set_font_desc:
* @self: the #GESTrackVideoTitleSource * @self: the #GESTrackTitleSource
* @font_desc: the pango font description * @font_desc: the pango font description
* *
* Sets the text this track object will render. * Sets the text this track object will render.
@ -199,7 +196,7 @@ ges_track_video_title_source_set_text (GESTrackVideoTitleSource * self,
*/ */
void void
ges_track_video_title_source_set_font_desc (GESTrackVideoTitleSource * self, ges_track_title_source_set_font_desc (GESTrackTitleSource * self,
const gchar * font_desc) const gchar * font_desc)
{ {
if (self->font_desc) if (self->font_desc)
@ -212,15 +209,15 @@ ges_track_video_title_source_set_font_desc (GESTrackVideoTitleSource * self,
} }
/** /**
* ges_track_video_title_source_valignment: * ges_track_title_source_valignment:
* @self: the #GESTrackVideoTitleSource* to set text on * @self: the #GESTrackTitleSource* to set text on
* @valign: #GESTrackVideoTitleSrcVAlign * @valign: #GESTrackTitleSrcVAlign
* *
* Sets the vertical aligment of the text. * Sets the vertical aligment of the text.
*/ */
void void
ges_track_video_title_source_set_valignment (GESTrackVideoTitleSource * self, ges_track_title_source_set_valignment (GESTrackTitleSource * self,
GESTrackVideoTitleSrcVAlign valign) GESTrackTitleSrcVAlign valign)
{ {
self->valign = valign; self->valign = valign;
GST_LOG ("set valignment to: %d", valign); GST_LOG ("set valignment to: %d", valign);
@ -229,15 +226,15 @@ ges_track_video_title_source_set_valignment (GESTrackVideoTitleSource * self,
} }
/** /**
* ges_track_video_title_source_halignment: * ges_track_title_source_halignment:
* @self: the #GESTrackVideoTitleSource* to set text on * @self: the #GESTrackTitleSource* to set text on
* @halign: #GESTrackVideoTitleSrcHAlign * @halign: #GESTrackTitleSrcHAlign
* *
* Sets the vertical aligment of the text. * Sets the vertical aligment of the text.
*/ */
void void
ges_track_video_title_source_set_halignment (GESTrackVideoTitleSource * self, ges_track_title_source_set_halignment (GESTrackTitleSource * self,
GESTrackVideoTitleSrcHAlign halign) GESTrackTitleSrcHAlign halign)
{ {
self->halign = halign; self->halign = halign;
GST_LOG ("set halignment to: %d", halign); GST_LOG ("set halignment to: %d", halign);
@ -245,8 +242,8 @@ ges_track_video_title_source_set_halignment (GESTrackVideoTitleSource * self,
g_object_set (self->text_el, "halignment", halign, NULL); g_object_set (self->text_el, "halignment", halign, NULL);
} }
GESTrackVideoTitleSource * GESTrackTitleSource *
ges_track_video_title_source_new (void) ges_track_title_source_new (void)
{ {
return g_object_new (GES_TYPE_TRACK_VIDEO_TITLE_SOURCE, NULL); return g_object_new (GES_TYPE_TRACK_TITLE_SOURCE, NULL);
} }

View file

@ -18,8 +18,8 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#ifndef _GES_TRACK_VIDEO_TITLE_SOURCE #ifndef _GES_TRACK_TITLE_SOURCE
#define _GES_TRACK_VIDEO_TITLE_SOURCE #define _GES_TRACK_TITLE_SOURCE
#include <glib-object.h> #include <glib-object.h>
#include <ges/ges-types.h> #include <ges/ges-types.h>
@ -27,61 +27,61 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define GES_TYPE_TRACK_VIDEO_TITLE_SOURCE ges_track_video_title_src_get_type() #define GES_TYPE_TRACK_TITLE_SOURCE ges_track_title_src_get_type()
#define GES_TRACK_VIDEO_TITLE_SOURCE(obj) \ #define GES_TRACK_TITLE_SOURCE(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_TRACK_VIDEO_TITLE_SOURCE, GESTrackVideoTitleSource)) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_TRACK_TITLE_SOURCE, GESTrackTitleSource))
#define GES_TRACK_VIDEO_TITLE_SOURCE_CLASS(klass) \ #define GES_TRACK_TITLE_SOURCE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_TRACK_VIDEO_TITLE_SOURCE, GESTrackVideoTitleSourceClass)) (G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_TRACK_TITLE_SOURCE, GESTrackTitleSourceClass))
#define GES_IS_TRACK_VIDEO_TITLE_SOURCE(obj) \ #define GES_IS_TRACK_TITLE_SOURCE(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_TRACK_VIDEO_TITLE_SOURCE)) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_TRACK_TITLE_SOURCE))
#define GES_IS_TRACK_VIDEO_TITLE_SOURCE_CLASS(klass) \ #define GES_IS_TRACK_TITLE_SOURCE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_TRACK_VIDEO_TITLE_SOURCE)) (G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_TRACK_TITLE_SOURCE))
#define GES_TRACK_VIDEO_TITLE_SOURCE_GET_CLASS(obj) \ #define GES_TRACK_TITLE_SOURCE_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TRACK_VIDEO_TITLE_SOURCE, GESTrackVideoTitleSourceClass)) (G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TRACK_TITLE_SOURCE, GESTrackTitleSourceClass))
#define DEFAULT_FONT_DESC "serif 36" #define DEFAULT_FONT_DESC "serif 36"
#define DEFAULT_VALIGNMENT GES_TRACK_VIDEO_TITLE_SRC_VALIGN_BASELINE #define DEFAULT_VALIGNMENT GES_TRACK_TITLE_SRC_VALIGN_BASELINE
#define DEFAULT_HALIGNMENT GES_TRACK_VIDEO_TITLE_SRC_HALIGN_CENTER #define DEFAULT_HALIGNMENT GES_TRACK_TITLE_SRC_HALIGN_CENTER
/** /**
* GESTrackVideoTitleSrcVAlign: * GESTrackTitleSrcVAlign:
* @GES_TRACK_VIDEO_TITLE_SRC_VALIGN_BASELINE: draw text on the baseline * @GES_TRACK_TITLE_SRC_VALIGN_BASELINE: draw text on the baseline
* @GES_TRACK_VIDEO_TITLE_SRC_VALIGN_BOTTOM: draw text on the bottom * @GES_TRACK_TITLE_SRC_VALIGN_BOTTOM: draw text on the bottom
* @GES_TRACK_VIDEO_TITLE_SRC_VALIGN_TOP: draw test on top * @GES_TRACK_TITLE_SRC_VALIGN_TOP: draw test on top
* *
* Vertical alignment of the text. * Vertical alignment of the text.
*/ */
typedef enum { typedef enum {
GES_TRACK_VIDEO_TITLE_SRC_VALIGN_BASELINE, GES_TRACK_TITLE_SRC_VALIGN_BASELINE,
GES_TRACK_VIDEO_TITLE_SRC_VALIGN_BOTTOM, GES_TRACK_TITLE_SRC_VALIGN_BOTTOM,
GES_TRACK_VIDEO_TITLE_SRC_VALIGN_TOP GES_TRACK_TITLE_SRC_VALIGN_TOP
} GESTrackVideoTitleSrcVAlign; } GESTrackTitleSrcVAlign;
/** /**
* GESTrackVideoTitleSrcHAlign: * GESTrackTitleSrcHAlign:
* @GES_TRACK_VIDEO_TITLE_SRC_HALIGN_LEFT: align text left * @GES_TRACK_TITLE_SRC_HALIGN_LEFT: align text left
* @GES_TRACK_VIDEO_TITLE_SRC_HALIGN_CENTER: align text center * @GES_TRACK_TITLE_SRC_HALIGN_CENTER: align text center
* @GES_TRACK_VIDEO_TITLE_SRC_HALIGN_RIGHT: align text right * @GES_TRACK_TITLE_SRC_HALIGN_RIGHT: align text right
* *
* Horizontal alignment of the text. * Horizontal alignment of the text.
*/ */
typedef enum { typedef enum {
GES_TRACK_VIDEO_TITLE_SRC_HALIGN_LEFT, GES_TRACK_TITLE_SRC_HALIGN_LEFT,
GES_TRACK_VIDEO_TITLE_SRC_HALIGN_CENTER, GES_TRACK_TITLE_SRC_HALIGN_CENTER,
GES_TRACK_VIDEO_TITLE_SRC_HALIGN_RIGHT GES_TRACK_TITLE_SRC_HALIGN_RIGHT
} GESTrackVideoTitleSrcHAlign; } GESTrackTitleSrcHAlign;
/** /**
* GESTrackVideoTitleSource: * GESTrackTitleSource:
* @parent: parent * @parent: parent
* *
*/ */
struct _GESTrackVideoTitleSource { struct _GESTrackTitleSource {
GESTrackSource parent; GESTrackSource parent;
/*< private >*/ /*< private >*/
@ -94,33 +94,33 @@ struct _GESTrackVideoTitleSource {
}; };
/** /**
* GESTrackVideoTitleSourceClass: * GESTrackTitleSourceClass:
* @parent_class: parent class * @parent_class: parent class
*/ */
struct _GESTrackVideoTitleSourceClass { struct _GESTrackTitleSourceClass {
GESTrackSourceClass parent_class; GESTrackSourceClass parent_class;
/*< private >*/ /*< private >*/
}; };
GType ges_track_video_title_src_get_type (void); GType ges_track_title_src_get_type (void);
void ges_track_video_title_source_set_text(GESTrackVideoTitleSource *self, const void ges_track_title_source_set_text(GESTrackTitleSource *self, const
gchar *text); gchar *text);
void ges_track_video_title_source_set_font_desc(GESTrackVideoTitleSource *self, void ges_track_title_source_set_font_desc(GESTrackTitleSource *self,
const gchar *font_desc); const gchar *font_desc);
void ges_track_video_title_source_set_halignment(GESTrackVideoTitleSource void ges_track_title_source_set_halignment(GESTrackTitleSource
*self, GESTrackVideoTitleSrcHAlign halgn); *self, GESTrackTitleSrcHAlign halgn);
void ges_track_video_title_source_set_valignment(GESTrackVideoTitleSource void ges_track_title_source_set_valignment(GESTrackTitleSource
*self, GESTrackVideoTitleSrcVAlign valign); *self, GESTrackTitleSrcVAlign valign);
GESTrackVideoTitleSource* ges_track_video_title_source_new (void); GESTrackTitleSource* ges_track_title_source_new (void);
G_END_DECLS G_END_DECLS
#endif /* _GES_TRACK_VIDEO_TITLE_SOURCE */ #endif /* _GES_TRACK_TITLE_SOURCE */

View file

@ -206,13 +206,13 @@ ges_track_video_overlay_set_font_desc (GESTrackVideoOverlay * self,
/** /**
* ges_track_video_overlay_valignment: * ges_track_video_overlay_valignment:
* @self: the #GESTrackVideoOverlay* to set text on * @self: the #GESTrackVideoOverlay* to set text on
* @valign: #GESTrackVideoTitleSrcVAlign * @valign: #GESTrackTitleSrcVAlign
* *
* Sets the vertical aligment of the text. * Sets the vertical aligment of the text.
*/ */
void void
ges_track_video_overlay_set_valignment (GESTrackVideoOverlay * self, ges_track_video_overlay_set_valignment (GESTrackVideoOverlay * self,
GESTrackVideoTitleSrcVAlign valign) GESTrackTitleSrcVAlign valign)
{ {
self->valign = valign; self->valign = valign;
GST_LOG ("set valignment to: %d", valign); GST_LOG ("set valignment to: %d", valign);
@ -223,13 +223,13 @@ ges_track_video_overlay_set_valignment (GESTrackVideoOverlay * self,
/** /**
* ges_track_video_overlay_halignment: * ges_track_video_overlay_halignment:
* @self: the #GESTrackVideoOverlay* to set text on * @self: the #GESTrackVideoOverlay* to set text on
* @halign: #GESTrackVideoTitleSrcHAlign * @halign: #GESTrackTitleSrcHAlign
* *
* Sets the vertical aligment of the text. * Sets the vertical aligment of the text.
*/ */
void void
ges_track_video_overlay_set_halignment (GESTrackVideoOverlay * self, ges_track_video_overlay_set_halignment (GESTrackVideoOverlay * self,
GESTrackVideoTitleSrcHAlign halign) GESTrackTitleSrcHAlign halign)
{ {
self->halign = halign; self->halign = halign;
GST_LOG ("set halignment to: %d", halign); GST_LOG ("set halignment to: %d", halign);

View file

@ -81,10 +81,10 @@ void ges_track_video_overlay_set_font_desc(GESTrackVideoOverlay *self,
const gchar *font_desc); const gchar *font_desc);
void ges_track_video_overlay_set_halignment(GESTrackVideoOverlay void ges_track_video_overlay_set_halignment(GESTrackVideoOverlay
*self, GESTrackVideoTitleSrcHAlign halgn); *self, GESTrackTitleSrcHAlign halgn);
void ges_track_video_overlay_set_valignment(GESTrackVideoOverlay void ges_track_video_overlay_set_valignment(GESTrackVideoOverlay
*self, GESTrackVideoTitleSrcVAlign valign); *self, GESTrackTitleSrcVAlign valign);
GESTrackVideoOverlay* ges_track_video_overlay_new (void); GESTrackVideoOverlay* ges_track_video_overlay_new (void);

View file

@ -88,9 +88,9 @@ typedef struct _GESTrackAudioBackgroundSource GESTrackAudioBackgroundSource;
typedef struct _GESTrackAudioBackgroundSourceClass typedef struct _GESTrackAudioBackgroundSourceClass
GESTrackAudioBackgroundSourceClass; GESTrackAudioBackgroundSourceClass;
typedef struct _GESTrackVideoTitleSource GESTrackVideoTitleSource; typedef struct _GESTrackTitleSource GESTrackTitleSource;
typedef struct _GESTrackVideoTitleSourceClass typedef struct _GESTrackTitleSourceClass
GESTrackVideoTitleSourceClass; GESTrackTitleSourceClass;
typedef struct _GESTrackOverlay GESTrackOverlay; typedef struct _GESTrackOverlay GESTrackOverlay;
typedef struct _GESTrackOverlayClass typedef struct _GESTrackOverlayClass

View file

@ -156,16 +156,16 @@ GST_START_TEST (test_overlay_in_layer)
/* test halign and valign */ /* test halign and valign */
g_object_set (source, "halignment", (gint) g_object_set (source, "halignment", (gint)
GES_TRACK_VIDEO_TITLE_SRC_HALIGN_LEFT, GES_TRACK_TITLE_SRC_HALIGN_LEFT,
"valignment", (gint) GES_TRACK_VIDEO_TITLE_SRC_VALIGN_TOP, NULL); "valignment", (gint) GES_TRACK_TITLE_SRC_VALIGN_TOP, NULL);
g_object_get (source, "halignment", &halign, "valignment", &valign, NULL); g_object_get (source, "halignment", &halign, "valignment", &valign, NULL);
assert_equals_int (halign, GES_TRACK_VIDEO_TITLE_SRC_HALIGN_LEFT); assert_equals_int (halign, GES_TRACK_TITLE_SRC_HALIGN_LEFT);
assert_equals_int (valign, GES_TRACK_VIDEO_TITLE_SRC_VALIGN_TOP); assert_equals_int (valign, GES_TRACK_TITLE_SRC_VALIGN_TOP);
halign = ((GESTrackVideoOverlay *) trobj)->halign; halign = ((GESTrackVideoOverlay *) trobj)->halign;
valign = ((GESTrackVideoOverlay *) trobj)->valign; valign = ((GESTrackVideoOverlay *) trobj)->valign;
assert_equals_int (halign, GES_TRACK_VIDEO_TITLE_SRC_HALIGN_LEFT); assert_equals_int (halign, GES_TRACK_TITLE_SRC_HALIGN_LEFT);
assert_equals_int (valign, GES_TRACK_VIDEO_TITLE_SRC_VALIGN_TOP); assert_equals_int (valign, GES_TRACK_TITLE_SRC_VALIGN_TOP);
GST_DEBUG ("removing the source"); GST_DEBUG ("removing the source");

View file

@ -151,21 +151,21 @@ GST_START_TEST (test_title_source_in_layer)
assert_equals_string ("sans 72", text); assert_equals_string ("sans 72", text);
g_free (text); g_free (text);
text = ((GESTrackVideoTitleSource *) trobj)->font_desc; text = ((GESTrackTitleSource *) trobj)->font_desc;
assert_equals_string ("sans 72", text); assert_equals_string ("sans 72", text);
/* test halign and valign */ /* test halign and valign */
g_object_set (source, "halignment", (gint) g_object_set (source, "halignment", (gint)
GES_TRACK_VIDEO_TITLE_SRC_HALIGN_LEFT, GES_TRACK_TITLE_SRC_HALIGN_LEFT,
"valignment", (gint) GES_TRACK_VIDEO_TITLE_SRC_VALIGN_TOP, NULL); "valignment", (gint) GES_TRACK_TITLE_SRC_VALIGN_TOP, NULL);
g_object_get (source, "halignment", &halign, "valignment", &valign, NULL); g_object_get (source, "halignment", &halign, "valignment", &valign, NULL);
assert_equals_int (halign, GES_TRACK_VIDEO_TITLE_SRC_HALIGN_LEFT); assert_equals_int (halign, GES_TRACK_TITLE_SRC_HALIGN_LEFT);
assert_equals_int (valign, GES_TRACK_VIDEO_TITLE_SRC_VALIGN_TOP); assert_equals_int (valign, GES_TRACK_TITLE_SRC_VALIGN_TOP);
halign = ((GESTrackVideoTitleSource *) trobj)->halign; halign = ((GESTrackTitleSource *) trobj)->halign;
valign = ((GESTrackVideoTitleSource *) trobj)->valign; valign = ((GESTrackTitleSource *) trobj)->valign;
assert_equals_int (halign, GES_TRACK_VIDEO_TITLE_SRC_HALIGN_LEFT); assert_equals_int (halign, GES_TRACK_TITLE_SRC_HALIGN_LEFT);
assert_equals_int (valign, GES_TRACK_VIDEO_TITLE_SRC_VALIGN_TOP); assert_equals_int (valign, GES_TRACK_TITLE_SRC_VALIGN_TOP);
GST_DEBUG ("removing the source"); GST_DEBUG ("removing the source");