mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
Rename GESTimelineTextOverlay to GESTextOverlayClip
This commit is contained in:
parent
fd5c3e512a
commit
a2f670448e
12 changed files with 251 additions and 259 deletions
|
@ -24,7 +24,7 @@ LOCAL_SRC_FILES := \
|
|||
ges-timeline-test-source.c \
|
||||
ges-timeline-title-source.c \
|
||||
ges-overlay-clip.c \
|
||||
ges-timeline-text-overlay.c \
|
||||
ges-text-overlay-clip.c \
|
||||
ges-track.c \
|
||||
ges-track-object.c \
|
||||
ges-track-source.c \
|
||||
|
|
|
@ -56,7 +56,7 @@ platform as well as Windows. It is released under the GNU Library General Public
|
|||
<xi:include href="xml/ges-timeline-filesource.xml"/>
|
||||
<xi:include href="xml/ges-timeline-title-source.xml"/>
|
||||
<xi:include href="xml/ges-timeline-test-source.xml"/>
|
||||
<xi:include href="xml/ges-timeline-text-overlay.xml"/>
|
||||
<xi:include href="xml/ges-text-overlay-clip.xml"/>
|
||||
<xi:include href="xml/ges-standard-transition-clip.xml"/>
|
||||
<xi:include href="xml/ges-standard-effect-clip.xml"/>
|
||||
</chapter>
|
||||
|
|
|
@ -664,34 +664,34 @@ GES_TIMELINE_TITLE_SOURCE_GET_CLASS
|
|||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>ges-timeline-text-overlay</FILE>
|
||||
<TITLE>GESTimelineTextOverlay</TITLE>
|
||||
GESTimelineTextOverlay
|
||||
ges_timeline_text_overlay_new
|
||||
ges_timeline_text_overlay_set_text
|
||||
ges_timeline_text_overlay_set_font_desc
|
||||
ges_timeline_text_overlay_set_valign
|
||||
ges_timeline_text_overlay_set_halign
|
||||
ges_timeline_text_overlay_set_color
|
||||
ges_timeline_text_overlay_set_xpos
|
||||
ges_timeline_text_overlay_set_ypos
|
||||
ges_timeline_text_overlay_get_text
|
||||
ges_timeline_text_overlay_get_font_desc
|
||||
ges_timeline_text_overlay_get_valignment
|
||||
ges_timeline_text_overlay_get_halignment
|
||||
ges_timeline_text_overlay_get_color
|
||||
ges_timeline_text_overlay_get_xpos
|
||||
ges_timeline_text_overlay_get_ypos
|
||||
<FILE>ges-text-overlay-clip</FILE>
|
||||
<TITLE>GESTextOverlayClip</TITLE>
|
||||
GESTextOverlayClip
|
||||
ges_overlay_text_clip_new
|
||||
ges_overlay_text_clip_set_text
|
||||
ges_overlay_text_clip_set_font_desc
|
||||
ges_overlay_text_clip_set_valign
|
||||
ges_overlay_text_clip_set_halign
|
||||
ges_overlay_text_clip_set_color
|
||||
ges_overlay_text_clip_set_xpos
|
||||
ges_overlay_text_clip_set_ypos
|
||||
ges_overlay_text_clip_get_text
|
||||
ges_overlay_text_clip_get_font_desc
|
||||
ges_overlay_text_clip_get_valignment
|
||||
ges_overlay_text_clip_get_halignment
|
||||
ges_overlay_text_clip_get_color
|
||||
ges_overlay_text_clip_get_xpos
|
||||
ges_overlay_text_clip_get_ypos
|
||||
<SUBSECTION Standard>
|
||||
GESTimelineTextOverlayClass
|
||||
GESTimelineTextOverlayPrivate
|
||||
ges_timeline_text_overlay_get_type
|
||||
GES_IS_TIMELINE_TEXT_OVERLAY
|
||||
GES_IS_TIMELINE_TEXT_OVERLAY_CLASS
|
||||
GES_TIMELINE_TEXT_OVERLAY
|
||||
GES_TIMELINE_TEXT_OVERLAY_CLASS
|
||||
GES_TIMELINE_TEXT_OVERLAY_GET_CLASS
|
||||
GES_TYPE_TIMELINE_TEXT_OVERLAY
|
||||
GESTextOverlayClipClass
|
||||
GESTextOverlayClipPrivate
|
||||
ges_overlay_text_clip_get_type
|
||||
GES_IS_OVERLAY_TEXT_CLIP
|
||||
GES_IS_OVERLAY_TEXT_CLIP_CLASS
|
||||
GES_OVERLAY_TEXT_CLIP
|
||||
GES_OVERLAY_TEXT_CLIP_CLASS
|
||||
GES_OVERLAY_TEXT_CLIP_GET_CLASS
|
||||
GES_TYPE_OVERLAY_TEXT_CLIP
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
|
|
|
@ -19,7 +19,7 @@ ges_standard_transition_clip_get_type
|
|||
ges_effect_clip_get_type
|
||||
ges_standard_effect_clip_get_type
|
||||
ges_uri_clip_get_type
|
||||
ges_timeline_text_overlay_get_type
|
||||
ges_overlay_text_clip_get_type
|
||||
ges_timeline_title_source_get_type
|
||||
ges_track_audio_test_source_get_type
|
||||
ges_track_audio_transition_get_type
|
||||
|
|
|
@ -28,7 +28,7 @@ libges_@GST_API_VERSION@_la_SOURCES = \
|
|||
ges-timeline-test-source.c \
|
||||
ges-timeline-title-source.c \
|
||||
ges-overlay-clip.c \
|
||||
ges-timeline-text-overlay.c \
|
||||
ges-text-overlay-clip.c \
|
||||
ges-track.c \
|
||||
ges-track-object.c \
|
||||
ges-track-source.c \
|
||||
|
@ -82,7 +82,7 @@ libges_@GST_API_VERSION@include_HEADERS = \
|
|||
ges-timeline-test-source.h \
|
||||
ges-timeline-title-source.h \
|
||||
ges-overlay-clip.h \
|
||||
ges-timeline-text-overlay.h \
|
||||
ges-text-overlay-clip.h \
|
||||
ges-track-effect.h \
|
||||
ges-track-parse-launch-effect.h \
|
||||
ges-track.h \
|
||||
|
|
|
@ -19,19 +19,19 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* SECTION:ges-timeline-text-overlay
|
||||
* SECTION:ges-text-overlay-clip
|
||||
* @short_description: Render text onto another stream in a GESTimelineLayer
|
||||
*
|
||||
* Renders text onto the next lower priority stream using textrender.
|
||||
*/
|
||||
|
||||
#include "ges-internal.h"
|
||||
#include "ges-timeline-text-overlay.h"
|
||||
#include "ges-text-overlay-clip.h"
|
||||
#include "ges-track-object.h"
|
||||
#include "ges-track-text-overlay.h"
|
||||
#include <string.h>
|
||||
|
||||
G_DEFINE_TYPE (GESTimelineTextOverlay, ges_timeline_text_overlay,
|
||||
G_DEFINE_TYPE (GESTextOverlayClip, ges_overlay_text_clip,
|
||||
GES_TYPE_OVERLAY_CLIP);
|
||||
|
||||
#define DEFAULT_PROP_TEXT ""
|
||||
|
@ -40,7 +40,7 @@ G_DEFINE_TYPE (GESTimelineTextOverlay, ges_timeline_text_overlay,
|
|||
#define DEFAULT_PROP_HALIGNMENT GES_TEXT_HALIGN_CENTER
|
||||
#
|
||||
|
||||
struct _GESTimelineTextOverlayPrivate
|
||||
struct _GESTextOverlayClipPrivate
|
||||
{
|
||||
gchar *text;
|
||||
gchar *font_desc;
|
||||
|
@ -64,15 +64,14 @@ enum
|
|||
};
|
||||
|
||||
static GESTrackObject
|
||||
* ges_timeline_text_overlay_create_track_object (GESClip * obj,
|
||||
* ges_overlay_text_clip_create_track_object (GESClip * obj,
|
||||
GESTrackType type);
|
||||
|
||||
static void
|
||||
ges_timeline_text_overlay_get_property (GObject * object, guint property_id,
|
||||
ges_overlay_text_clip_get_property (GObject * object, guint property_id,
|
||||
GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
GESTimelineTextOverlayPrivate *priv =
|
||||
GES_TIMELINE_TEXT_OVERLAY (object)->priv;
|
||||
GESTextOverlayClipPrivate *priv = GES_OVERLAY_TEXT_CLIP (object)->priv;
|
||||
|
||||
switch (property_id) {
|
||||
case PROP_TEXT:
|
||||
|
@ -102,33 +101,32 @@ ges_timeline_text_overlay_get_property (GObject * object, guint property_id,
|
|||
}
|
||||
|
||||
static void
|
||||
ges_timeline_text_overlay_set_property (GObject * object, guint property_id,
|
||||
ges_overlay_text_clip_set_property (GObject * object, guint property_id,
|
||||
const GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
GESTimelineTextOverlay *uriclip = GES_TIMELINE_TEXT_OVERLAY (object);
|
||||
GESTextOverlayClip *uriclip = GES_OVERLAY_TEXT_CLIP (object);
|
||||
|
||||
switch (property_id) {
|
||||
case PROP_TEXT:
|
||||
ges_timeline_text_overlay_set_text (uriclip, g_value_get_string (value));
|
||||
ges_overlay_text_clip_set_text (uriclip, g_value_get_string (value));
|
||||
break;
|
||||
case PROP_FONT_DESC:
|
||||
ges_timeline_text_overlay_set_font_desc (uriclip,
|
||||
g_value_get_string (value));
|
||||
ges_overlay_text_clip_set_font_desc (uriclip, g_value_get_string (value));
|
||||
break;
|
||||
case PROP_HALIGNMENT:
|
||||
ges_timeline_text_overlay_set_halign (uriclip, g_value_get_enum (value));
|
||||
ges_overlay_text_clip_set_halign (uriclip, g_value_get_enum (value));
|
||||
break;
|
||||
case PROP_VALIGNMENT:
|
||||
ges_timeline_text_overlay_set_valign (uriclip, g_value_get_enum (value));
|
||||
ges_overlay_text_clip_set_valign (uriclip, g_value_get_enum (value));
|
||||
break;
|
||||
case PROP_COLOR:
|
||||
ges_timeline_text_overlay_set_color (uriclip, g_value_get_uint (value));
|
||||
ges_overlay_text_clip_set_color (uriclip, g_value_get_uint (value));
|
||||
break;
|
||||
case PROP_XPOS:
|
||||
ges_timeline_text_overlay_set_xpos (uriclip, g_value_get_double (value));
|
||||
ges_overlay_text_clip_set_xpos (uriclip, g_value_get_double (value));
|
||||
break;
|
||||
case PROP_YPOS:
|
||||
ges_timeline_text_overlay_set_ypos (uriclip, g_value_get_double (value));
|
||||
ges_overlay_text_clip_set_ypos (uriclip, g_value_get_double (value));
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
|
@ -136,33 +134,32 @@ ges_timeline_text_overlay_set_property (GObject * object, guint property_id,
|
|||
}
|
||||
|
||||
static void
|
||||
ges_timeline_text_overlay_dispose (GObject * object)
|
||||
ges_overlay_text_clip_dispose (GObject * object)
|
||||
{
|
||||
GESTimelineTextOverlayPrivate *priv =
|
||||
GES_TIMELINE_TEXT_OVERLAY (object)->priv;
|
||||
GESTextOverlayClipPrivate *priv = GES_OVERLAY_TEXT_CLIP (object)->priv;
|
||||
|
||||
if (priv->text)
|
||||
g_free (priv->text);
|
||||
if (priv->font_desc)
|
||||
g_free (priv->font_desc);
|
||||
|
||||
G_OBJECT_CLASS (ges_timeline_text_overlay_parent_class)->dispose (object);
|
||||
G_OBJECT_CLASS (ges_overlay_text_clip_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
ges_timeline_text_overlay_class_init (GESTimelineTextOverlayClass * klass)
|
||||
ges_overlay_text_clip_class_init (GESTextOverlayClipClass * klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GESClipClass *timobj_class = GES_CLIP_CLASS (klass);
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GESTimelineTextOverlayPrivate));
|
||||
g_type_class_add_private (klass, sizeof (GESTextOverlayClipPrivate));
|
||||
|
||||
object_class->get_property = ges_timeline_text_overlay_get_property;
|
||||
object_class->set_property = ges_timeline_text_overlay_set_property;
|
||||
object_class->dispose = ges_timeline_text_overlay_dispose;
|
||||
object_class->get_property = ges_overlay_text_clip_get_property;
|
||||
object_class->set_property = ges_overlay_text_clip_set_property;
|
||||
object_class->dispose = ges_overlay_text_clip_dispose;
|
||||
|
||||
/**
|
||||
* GESTimelineTextOverlay:text:
|
||||
* GESTextOverlayClip:text:
|
||||
*
|
||||
* The text to diplay
|
||||
*/
|
||||
|
@ -172,7 +169,7 @@ ges_timeline_text_overlay_class_init (GESTimelineTextOverlayClass * klass)
|
|||
DEFAULT_PROP_TEXT, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
|
||||
|
||||
/**
|
||||
* GESTimelineTextOverlay:font-desc:
|
||||
* GESTextOverlayClip:font-desc:
|
||||
*
|
||||
* Pango font description string
|
||||
*/
|
||||
|
@ -185,7 +182,7 @@ ges_timeline_text_overlay_class_init (GESTimelineTextOverlayClass * klass)
|
|||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
/**
|
||||
* GESTimelineTextOverlay:valignment:
|
||||
* GESTextOverlayClip:valignment:
|
||||
*
|
||||
* Vertical alignent of the text
|
||||
*/
|
||||
|
@ -195,7 +192,7 @@ ges_timeline_text_overlay_class_init (GESTimelineTextOverlayClass * klass)
|
|||
DEFAULT_PROP_VALIGNMENT, G_PARAM_READWRITE | G_PARAM_CONSTRUCT |
|
||||
G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* GESTimelineTextOverlay:halignment:
|
||||
* GESTextOverlayClip:halignment:
|
||||
*
|
||||
* Horizontal alignment of the text
|
||||
*/
|
||||
|
@ -205,12 +202,11 @@ ges_timeline_text_overlay_class_init (GESTimelineTextOverlayClass * klass)
|
|||
GES_TEXT_HALIGN_TYPE, DEFAULT_PROP_HALIGNMENT,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
timobj_class->create_track_object =
|
||||
ges_timeline_text_overlay_create_track_object;
|
||||
timobj_class->create_track_object = ges_overlay_text_clip_create_track_object;
|
||||
timobj_class->need_fill_track = FALSE;
|
||||
|
||||
/**
|
||||
* GESTimelineTextOverlay:color:
|
||||
* GESTextOverlayClip:color:
|
||||
*
|
||||
* The color of the text
|
||||
*/
|
||||
|
@ -220,7 +216,7 @@ ges_timeline_text_overlay_class_init (GESTimelineTextOverlayClass * klass)
|
|||
0, G_MAXUINT32, G_MAXUINT32, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
|
||||
|
||||
/**
|
||||
* GESTimelineTextOverlay:xpos:
|
||||
* GESTextOverlayClip:xpos:
|
||||
*
|
||||
* The horizontal position of the text
|
||||
*/
|
||||
|
@ -230,7 +226,7 @@ ges_timeline_text_overlay_class_init (GESTimelineTextOverlayClass * klass)
|
|||
0, 1, 0.5, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
|
||||
|
||||
/**
|
||||
* GESTimelineTextOverlay:ypos:
|
||||
* GESTextOverlayClip:ypos:
|
||||
*
|
||||
* The vertical position of the text
|
||||
*/
|
||||
|
@ -241,10 +237,10 @@ ges_timeline_text_overlay_class_init (GESTimelineTextOverlayClass * klass)
|
|||
}
|
||||
|
||||
static void
|
||||
ges_timeline_text_overlay_init (GESTimelineTextOverlay * self)
|
||||
ges_overlay_text_clip_init (GESTextOverlayClip * self)
|
||||
{
|
||||
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
|
||||
GES_TYPE_TIMELINE_TEXT_OVERLAY, GESTimelineTextOverlayPrivate);
|
||||
GES_TYPE_OVERLAY_TEXT_CLIP, GESTextOverlayClipPrivate);
|
||||
|
||||
GES_TIMELINE_ELEMENT (self)->duration = 0;
|
||||
/* Not 100% needed since gobject contents are memzero'd when created */
|
||||
|
@ -258,8 +254,8 @@ ges_timeline_text_overlay_init (GESTimelineTextOverlay * self)
|
|||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_text_overlay_set_text:
|
||||
* @self: the #GESTimelineTextOverlay* to set text on
|
||||
* ges_overlay_text_clip_set_text:
|
||||
* @self: the #GESTextOverlayClip* to set text on
|
||||
* @text: the text to render. an internal copy of this text will be
|
||||
* made.
|
||||
*
|
||||
|
@ -267,8 +263,7 @@ ges_timeline_text_overlay_init (GESTimelineTextOverlay * self)
|
|||
*
|
||||
*/
|
||||
void
|
||||
ges_timeline_text_overlay_set_text (GESTimelineTextOverlay * self,
|
||||
const gchar * text)
|
||||
ges_overlay_text_clip_set_text (GESTextOverlayClip * self, const gchar * text)
|
||||
{
|
||||
GList *tmp, *trackobjects;
|
||||
GESClip *object = (GESClip *) self;
|
||||
|
@ -294,15 +289,15 @@ ges_timeline_text_overlay_set_text (GESTimelineTextOverlay * self,
|
|||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_text_overlay_set_font_desc:
|
||||
* @self: the #GESTimelineTextOverlay*
|
||||
* ges_overlay_text_clip_set_font_desc:
|
||||
* @self: the #GESTextOverlayClip*
|
||||
* @font_desc: the pango font description
|
||||
*
|
||||
* Sets the pango font description of the text
|
||||
*
|
||||
*/
|
||||
void
|
||||
ges_timeline_text_overlay_set_font_desc (GESTimelineTextOverlay * self,
|
||||
ges_overlay_text_clip_set_font_desc (GESTextOverlayClip * self,
|
||||
const gchar * font_desc)
|
||||
{
|
||||
GList *tmp, *trackobjects;
|
||||
|
@ -330,15 +325,15 @@ ges_timeline_text_overlay_set_font_desc (GESTimelineTextOverlay * self,
|
|||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_text_overlay_set_halign:
|
||||
* @self: the #GESTimelineTextOverlay* to set horizontal alignement of text on
|
||||
* ges_overlay_text_clip_set_halign:
|
||||
* @self: the #GESTextOverlayClip* to set horizontal alignement of text on
|
||||
* @halign: #GESTextHAlign
|
||||
*
|
||||
* Sets the horizontal aligment of the text.
|
||||
*
|
||||
*/
|
||||
void
|
||||
ges_timeline_text_overlay_set_halign (GESTimelineTextOverlay * self,
|
||||
ges_overlay_text_clip_set_halign (GESTextOverlayClip * self,
|
||||
GESTextHAlign halign)
|
||||
{
|
||||
GList *tmp, *trackobjects;
|
||||
|
@ -363,15 +358,15 @@ ges_timeline_text_overlay_set_halign (GESTimelineTextOverlay * self,
|
|||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_text_overlay_set_valign:
|
||||
* @self: the #GESTimelineTextOverlay* to set vertical alignement of text on
|
||||
* ges_overlay_text_clip_set_valign:
|
||||
* @self: the #GESTextOverlayClip* to set vertical alignement of text on
|
||||
* @valign: #GESTextVAlign
|
||||
*
|
||||
* Sets the vertical aligment of the text.
|
||||
*
|
||||
*/
|
||||
void
|
||||
ges_timeline_text_overlay_set_valign (GESTimelineTextOverlay * self,
|
||||
ges_overlay_text_clip_set_valign (GESTextOverlayClip * self,
|
||||
GESTextVAlign valign)
|
||||
{
|
||||
GList *tmp, *trackobjects;
|
||||
|
@ -396,8 +391,8 @@ ges_timeline_text_overlay_set_valign (GESTimelineTextOverlay * self,
|
|||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_text_overlay_set_color:
|
||||
* @self: the #GESTimelineTextOverlay* to set
|
||||
* ges_overlay_text_clip_set_color:
|
||||
* @self: the #GESTextOverlayClip* to set
|
||||
* @color: The color @self is being set to
|
||||
*
|
||||
* Sets the color of the text.
|
||||
|
@ -405,8 +400,7 @@ ges_timeline_text_overlay_set_valign (GESTimelineTextOverlay * self,
|
|||
* Since: 0.10.2
|
||||
*/
|
||||
void
|
||||
ges_timeline_text_overlay_set_color (GESTimelineTextOverlay * self,
|
||||
guint32 color)
|
||||
ges_overlay_text_clip_set_color (GESTextOverlayClip * self, guint32 color)
|
||||
{
|
||||
GList *tmp, *trackobjects;
|
||||
GESClip *object = (GESClip *) self;
|
||||
|
@ -429,8 +423,8 @@ ges_timeline_text_overlay_set_color (GESTimelineTextOverlay * self,
|
|||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_text_overlay_set_xpos:
|
||||
* @self: the #GESTimelineTextOverlay* to set
|
||||
* ges_overlay_text_clip_set_xpos:
|
||||
* @self: the #GESTextOverlayClip* to set
|
||||
* @position: The horizontal position @self is being set to
|
||||
*
|
||||
* Sets the horizontal position of the text.
|
||||
|
@ -438,8 +432,7 @@ ges_timeline_text_overlay_set_color (GESTimelineTextOverlay * self,
|
|||
* Since: 0.10.2
|
||||
*/
|
||||
void
|
||||
ges_timeline_text_overlay_set_xpos (GESTimelineTextOverlay * self,
|
||||
gdouble position)
|
||||
ges_overlay_text_clip_set_xpos (GESTextOverlayClip * self, gdouble position)
|
||||
{
|
||||
GList *tmp, *trackobjects;
|
||||
GESClip *object = (GESClip *) self;
|
||||
|
@ -462,8 +455,8 @@ ges_timeline_text_overlay_set_xpos (GESTimelineTextOverlay * self,
|
|||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_text_overlay_set_ypos:
|
||||
* @self: the #GESTimelineTextOverlay* to set
|
||||
* ges_overlay_text_clip_set_ypos:
|
||||
* @self: the #GESTextOverlayClip* to set
|
||||
* @position: The vertical position @self is being set to
|
||||
*
|
||||
* Sets the vertical position of the text.
|
||||
|
@ -471,8 +464,7 @@ ges_timeline_text_overlay_set_xpos (GESTimelineTextOverlay * self,
|
|||
* Since: 0.10.2
|
||||
*/
|
||||
void
|
||||
ges_timeline_text_overlay_set_ypos (GESTimelineTextOverlay * self,
|
||||
gdouble position)
|
||||
ges_overlay_text_clip_set_ypos (GESTextOverlayClip * self, gdouble position)
|
||||
{
|
||||
GList *tmp, *trackobjects;
|
||||
GESClip *object = (GESClip *) self;
|
||||
|
@ -495,8 +487,8 @@ ges_timeline_text_overlay_set_ypos (GESTimelineTextOverlay * self,
|
|||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_text_overlay_get_text:
|
||||
* @self: a #GESTimelineTextOverlay
|
||||
* ges_overlay_text_clip_get_text:
|
||||
* @self: a #GESTextOverlayClip
|
||||
*
|
||||
* Get the text currently set on @self.
|
||||
*
|
||||
|
@ -504,56 +496,56 @@ ges_timeline_text_overlay_set_ypos (GESTimelineTextOverlay * self,
|
|||
*
|
||||
*/
|
||||
const gchar *
|
||||
ges_timeline_text_overlay_get_text (GESTimelineTextOverlay * self)
|
||||
ges_overlay_text_clip_get_text (GESTextOverlayClip * self)
|
||||
{
|
||||
return self->priv->text;
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_text_overlay_get_font_desc:
|
||||
* @self: a #GESTimelineTextOverlay
|
||||
* ges_overlay_text_clip_get_font_desc:
|
||||
* @self: a #GESTextOverlayClip
|
||||
*
|
||||
* Get the pango font description used by @self.
|
||||
*
|
||||
* Returns: The pango font description used by @self.
|
||||
*/
|
||||
const char *
|
||||
ges_timeline_text_overlay_get_font_desc (GESTimelineTextOverlay * self)
|
||||
ges_overlay_text_clip_get_font_desc (GESTextOverlayClip * self)
|
||||
{
|
||||
return self->priv->font_desc;
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_text_overlay_get_halignment:
|
||||
* @self: a #GESTimelineTextOverlay
|
||||
* ges_overlay_text_clip_get_halignment:
|
||||
* @self: a #GESTextOverlayClip
|
||||
*
|
||||
* Get the horizontal aligment used by @self.
|
||||
*
|
||||
* Returns: The horizontal aligment used by @self.
|
||||
*/
|
||||
GESTextHAlign
|
||||
ges_timeline_text_overlay_get_halignment (GESTimelineTextOverlay * self)
|
||||
ges_overlay_text_clip_get_halignment (GESTextOverlayClip * self)
|
||||
{
|
||||
return self->priv->halign;
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_text_overlay_get_valignment:
|
||||
* @self: a #GESTimelineTextOverlay
|
||||
* ges_overlay_text_clip_get_valignment:
|
||||
* @self: a #GESTextOverlayClip
|
||||
*
|
||||
* Get the vertical aligment used by @self.
|
||||
*
|
||||
* Returns: The vertical aligment used by @self.
|
||||
*/
|
||||
GESTextVAlign
|
||||
ges_timeline_text_overlay_get_valignment (GESTimelineTextOverlay * self)
|
||||
ges_overlay_text_clip_get_valignment (GESTextOverlayClip * self)
|
||||
{
|
||||
return self->priv->valign;
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_text_overlay_get_color:
|
||||
* @self: a #GESTimelineTextOverlay
|
||||
* ges_overlay_text_clip_get_color:
|
||||
* @self: a #GESTextOverlayClip
|
||||
*
|
||||
* Get the color used by @source.
|
||||
*
|
||||
|
@ -563,14 +555,14 @@ ges_timeline_text_overlay_get_valignment (GESTimelineTextOverlay * self)
|
|||
*/
|
||||
|
||||
const guint32
|
||||
ges_timeline_text_overlay_get_color (GESTimelineTextOverlay * self)
|
||||
ges_overlay_text_clip_get_color (GESTextOverlayClip * self)
|
||||
{
|
||||
return self->priv->color;
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_text_overlay_get_xpos:
|
||||
* @self: a #GESTimelineTextOverlay
|
||||
* ges_overlay_text_clip_get_xpos:
|
||||
* @self: a #GESTextOverlayClip
|
||||
*
|
||||
* Get the horizontal position used by @source.
|
||||
*
|
||||
|
@ -580,14 +572,14 @@ ges_timeline_text_overlay_get_color (GESTimelineTextOverlay * self)
|
|||
*/
|
||||
|
||||
const gdouble
|
||||
ges_timeline_text_overlay_get_xpos (GESTimelineTextOverlay * self)
|
||||
ges_overlay_text_clip_get_xpos (GESTextOverlayClip * self)
|
||||
{
|
||||
return self->priv->xpos;
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_text_overlay_get_ypos:
|
||||
* @self: a #GESTimelineTextOverlay
|
||||
* ges_overlay_text_clip_get_ypos:
|
||||
* @self: a #GESTextOverlayClip
|
||||
*
|
||||
* Get the vertical position used by @source.
|
||||
*
|
||||
|
@ -597,16 +589,16 @@ ges_timeline_text_overlay_get_xpos (GESTimelineTextOverlay * self)
|
|||
*/
|
||||
|
||||
const gdouble
|
||||
ges_timeline_text_overlay_get_ypos (GESTimelineTextOverlay * self)
|
||||
ges_overlay_text_clip_get_ypos (GESTextOverlayClip * self)
|
||||
{
|
||||
return self->priv->ypos;
|
||||
}
|
||||
|
||||
static GESTrackObject *
|
||||
ges_timeline_text_overlay_create_track_object (GESClip * obj, GESTrackType type)
|
||||
ges_overlay_text_clip_create_track_object (GESClip * obj, GESTrackType type)
|
||||
{
|
||||
|
||||
GESTimelineTextOverlayPrivate *priv = GES_TIMELINE_TEXT_OVERLAY (obj)->priv;
|
||||
GESTextOverlayClipPrivate *priv = GES_OVERLAY_TEXT_CLIP (obj)->priv;
|
||||
GESTrackObject *res = NULL;
|
||||
|
||||
GST_DEBUG ("Creating a GESTrackOverlay");
|
||||
|
@ -630,16 +622,16 @@ ges_timeline_text_overlay_create_track_object (GESClip * obj, GESTrackType type)
|
|||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_text_overlay_new:
|
||||
* ges_overlay_text_clip_new:
|
||||
*
|
||||
* Creates a new #GESTimelineTextOverlay
|
||||
* Creates a new #GESTextOverlayClip
|
||||
*
|
||||
* Returns: The newly created #GESTimelineTextOverlay, or NULL if there was an
|
||||
* Returns: The newly created #GESTextOverlayClip, or NULL if there was an
|
||||
* error.
|
||||
*/
|
||||
GESTimelineTextOverlay *
|
||||
ges_timeline_text_overlay_new (void)
|
||||
GESTextOverlayClip *
|
||||
ges_overlay_text_clip_new (void)
|
||||
{
|
||||
/* FIXME : Check for validity/existence of URI */
|
||||
return g_object_new (GES_TYPE_TIMELINE_TEXT_OVERLAY, NULL);
|
||||
return g_object_new (GES_TYPE_OVERLAY_TEXT_CLIP, NULL);
|
||||
}
|
126
ges/ges-text-overlay-clip.h
Normal file
126
ges/ges-text-overlay-clip.h
Normal file
|
@ -0,0 +1,126 @@
|
|||
/* GStreamer Editing Services
|
||||
* Copyright (C) 2009 Brandon Lewis <brandon.lewis@collabora.co.uk>
|
||||
* 2009 Nokia Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef _GES_OVERLAY_TEXT_CLIP
|
||||
#define _GES_OVERLAY_TEXT_CLIP
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <ges/ges-types.h>
|
||||
#include <ges/ges-overlay-clip.h>
|
||||
#include <ges/ges-track.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
#define GES_TYPE_OVERLAY_TEXT_CLIP ges_overlay_text_clip_get_type()
|
||||
#define GES_OVERLAY_TEXT_CLIP(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_OVERLAY_TEXT_CLIP, GESTextOverlayClip))
|
||||
#define GES_OVERLAY_TEXT_CLIP_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_OVERLAY_TEXT_CLIP, GESTextOverlayClipClass))
|
||||
#define GES_IS_OVERLAY_TEXT_CLIP(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_OVERLAY_TEXT_CLIP))
|
||||
#define GES_IS_OVERLAY_TEXT_CLIP_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_OVERLAY_TEXT_CLIP))
|
||||
#define GES_OVERLAY_TEXT_CLIP_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_OVERLAY_TEXT_CLIP, GESTextOverlayClipClass))
|
||||
typedef struct _GESTextOverlayClipPrivate GESTextOverlayClipPrivate;
|
||||
|
||||
/**
|
||||
* GESTextOverlayClip:
|
||||
*
|
||||
*/
|
||||
|
||||
struct _GESTextOverlayClip
|
||||
{
|
||||
GESOverlayClip parent;
|
||||
|
||||
/*< private > */
|
||||
GESTextOverlayClipPrivate *priv;
|
||||
|
||||
/* Padding for API extension */
|
||||
gpointer _ges_reserved[GES_PADDING];
|
||||
};
|
||||
|
||||
/**
|
||||
* GESTextOverlayClipClass:
|
||||
*/
|
||||
|
||||
struct _GESTextOverlayClipClass
|
||||
{
|
||||
/*< private > */
|
||||
|
||||
GESOverlayClipClass parent_class;
|
||||
|
||||
/* Padding for API extension */
|
||||
gpointer _ges_reserved[GES_PADDING];
|
||||
};
|
||||
|
||||
GType ges_overlay_text_clip_get_type (void);
|
||||
|
||||
void
|
||||
ges_overlay_text_clip_set_text (GESTextOverlayClip * self,
|
||||
const gchar * text);
|
||||
|
||||
void
|
||||
ges_overlay_text_clip_set_font_desc (GESTextOverlayClip * self,
|
||||
const gchar * font_desc);
|
||||
|
||||
void
|
||||
ges_overlay_text_clip_set_valign (GESTextOverlayClip * self,
|
||||
GESTextVAlign valign);
|
||||
|
||||
void
|
||||
ges_overlay_text_clip_set_halign (GESTextOverlayClip * self,
|
||||
GESTextHAlign halign);
|
||||
|
||||
void
|
||||
ges_overlay_text_clip_set_color (GESTextOverlayClip * self,
|
||||
guint32 color);
|
||||
|
||||
void
|
||||
ges_overlay_text_clip_set_xpos (GESTextOverlayClip * self,
|
||||
gdouble position);
|
||||
|
||||
void
|
||||
ges_overlay_text_clip_set_ypos (GESTextOverlayClip * self,
|
||||
gdouble position);
|
||||
|
||||
const gchar *ges_overlay_text_clip_get_text (GESTextOverlayClip * self);
|
||||
|
||||
const gchar *ges_overlay_text_clip_get_font_desc (GESTextOverlayClip *
|
||||
self);
|
||||
|
||||
GESTextVAlign
|
||||
ges_overlay_text_clip_get_valignment (GESTextOverlayClip * self);
|
||||
|
||||
const guint32
|
||||
ges_overlay_text_clip_get_color (GESTextOverlayClip * self);
|
||||
|
||||
const gdouble
|
||||
ges_overlay_text_clip_get_xpos (GESTextOverlayClip * self);
|
||||
|
||||
const gdouble
|
||||
ges_overlay_text_clip_get_ypos (GESTextOverlayClip * self);
|
||||
|
||||
GESTextHAlign
|
||||
ges_overlay_text_clip_get_halignment (GESTextOverlayClip * self);
|
||||
|
||||
GESTextOverlayClip *ges_overlay_text_clip_new (void);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* _GES_TL_OVERLAY */
|
|
@ -1,126 +0,0 @@
|
|||
/* GStreamer Editing Services
|
||||
* Copyright (C) 2009 Brandon Lewis <brandon.lewis@collabora.co.uk>
|
||||
* 2009 Nokia Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef _GES_TIMELINE_TEXT_OVERLAY
|
||||
#define _GES_TIMELINE_TEXT_OVERLAY
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <ges/ges-types.h>
|
||||
#include <ges/ges-overlay-clip.h>
|
||||
#include <ges/ges-track.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
#define GES_TYPE_TIMELINE_TEXT_OVERLAY ges_timeline_text_overlay_get_type()
|
||||
#define GES_TIMELINE_TEXT_OVERLAY(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_TIMELINE_TEXT_OVERLAY, GESTimelineTextOverlay))
|
||||
#define GES_TIMELINE_TEXT_OVERLAY_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_TIMELINE_TEXT_OVERLAY, GESTimelineTextOverlayClass))
|
||||
#define GES_IS_TIMELINE_TEXT_OVERLAY(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_TIMELINE_TEXT_OVERLAY))
|
||||
#define GES_IS_TIMELINE_TEXT_OVERLAY_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_TIMELINE_TEXT_OVERLAY))
|
||||
#define GES_TIMELINE_TEXT_OVERLAY_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TIMELINE_TEXT_OVERLAY, GESTimelineTextOverlayClass))
|
||||
typedef struct _GESTimelineTextOverlayPrivate GESTimelineTextOverlayPrivate;
|
||||
|
||||
/**
|
||||
* GESTimelineTextOverlay:
|
||||
*
|
||||
*/
|
||||
|
||||
struct _GESTimelineTextOverlay
|
||||
{
|
||||
GESOverlayClip parent;
|
||||
|
||||
/*< private > */
|
||||
GESTimelineTextOverlayPrivate *priv;
|
||||
|
||||
/* Padding for API extension */
|
||||
gpointer _ges_reserved[GES_PADDING];
|
||||
};
|
||||
|
||||
/**
|
||||
* GESTimelineTextOverlayClass:
|
||||
*/
|
||||
|
||||
struct _GESTimelineTextOverlayClass
|
||||
{
|
||||
/*< private > */
|
||||
|
||||
GESOverlayClipClass parent_class;
|
||||
|
||||
/* Padding for API extension */
|
||||
gpointer _ges_reserved[GES_PADDING];
|
||||
};
|
||||
|
||||
GType ges_timeline_text_overlay_get_type (void);
|
||||
|
||||
void
|
||||
ges_timeline_text_overlay_set_text (GESTimelineTextOverlay * self,
|
||||
const gchar * text);
|
||||
|
||||
void
|
||||
ges_timeline_text_overlay_set_font_desc (GESTimelineTextOverlay * self,
|
||||
const gchar * font_desc);
|
||||
|
||||
void
|
||||
ges_timeline_text_overlay_set_valign (GESTimelineTextOverlay * self,
|
||||
GESTextVAlign valign);
|
||||
|
||||
void
|
||||
ges_timeline_text_overlay_set_halign (GESTimelineTextOverlay * self,
|
||||
GESTextHAlign halign);
|
||||
|
||||
void
|
||||
ges_timeline_text_overlay_set_color (GESTimelineTextOverlay * self,
|
||||
guint32 color);
|
||||
|
||||
void
|
||||
ges_timeline_text_overlay_set_xpos (GESTimelineTextOverlay * self,
|
||||
gdouble position);
|
||||
|
||||
void
|
||||
ges_timeline_text_overlay_set_ypos (GESTimelineTextOverlay * self,
|
||||
gdouble position);
|
||||
|
||||
const gchar *ges_timeline_text_overlay_get_text (GESTimelineTextOverlay * self);
|
||||
|
||||
const gchar *ges_timeline_text_overlay_get_font_desc (GESTimelineTextOverlay *
|
||||
self);
|
||||
|
||||
GESTextVAlign
|
||||
ges_timeline_text_overlay_get_valignment (GESTimelineTextOverlay * self);
|
||||
|
||||
const guint32
|
||||
ges_timeline_text_overlay_get_color (GESTimelineTextOverlay * self);
|
||||
|
||||
const gdouble
|
||||
ges_timeline_text_overlay_get_xpos (GESTimelineTextOverlay * self);
|
||||
|
||||
const gdouble
|
||||
ges_timeline_text_overlay_get_ypos (GESTimelineTextOverlay * self);
|
||||
|
||||
GESTextHAlign
|
||||
ges_timeline_text_overlay_get_halignment (GESTimelineTextOverlay * self);
|
||||
|
||||
GESTimelineTextOverlay *ges_timeline_text_overlay_new (void);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* _GES_TL_OVERLAY */
|
|
@ -77,8 +77,8 @@ typedef struct _GESTimelineTitleSourceClass GESTimelineTitleSourceClass;
|
|||
typedef struct _GESOverlayClip GESOverlayClip;
|
||||
typedef struct _GESOverlayClipClass GESOverlayClipClass;
|
||||
|
||||
typedef struct _GESTimelineTextOverlay GESTimelineTextOverlay;
|
||||
typedef struct _GESTimelineTextOverlayClass GESTimelineTextOverlayClass;
|
||||
typedef struct _GESTextOverlayClip GESTextOverlayClip;
|
||||
typedef struct _GESTextOverlayClipClass GESTextOverlayClipClass;
|
||||
|
||||
typedef struct _GESStandardEffectClip GESStandardEffectClip;
|
||||
typedef struct _GESStandardEffectClipClass GESStandardEffectClipClass;
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include <ges/ges-operation-clip.h>
|
||||
#include <ges/ges-effect-clip.h>
|
||||
#include <ges/ges-overlay-clip.h>
|
||||
#include <ges/ges-timeline-text-overlay.h>
|
||||
#include <ges/ges-text-overlay-clip.h>
|
||||
#include <ges/ges-transition-clip.h>
|
||||
#include <ges/ges-standard-transition-clip.h>
|
||||
#include <ges/ges-standard-effect-clip.h>
|
||||
|
|
|
@ -23,11 +23,11 @@
|
|||
|
||||
GST_START_TEST (test_overlay_basic)
|
||||
{
|
||||
GESTimelineTextOverlay *source;
|
||||
GESTextOverlayClip *source;
|
||||
|
||||
ges_init ();
|
||||
|
||||
source = ges_timeline_text_overlay_new ();
|
||||
source = ges_overlay_text_clip_new ();
|
||||
fail_unless (source != NULL);
|
||||
|
||||
g_object_unref (source);
|
||||
|
@ -47,7 +47,7 @@ GST_START_TEST (test_overlay_properties)
|
|||
fail_unless (track != NULL);
|
||||
|
||||
object = (GESClip *)
|
||||
ges_timeline_text_overlay_new ();
|
||||
ges_overlay_text_clip_new ();
|
||||
fail_unless (object != NULL);
|
||||
|
||||
/* Set some properties */
|
||||
|
@ -97,7 +97,7 @@ GST_START_TEST (test_overlay_in_layer)
|
|||
GESTimelineLayer *layer;
|
||||
GESTrack *a, *v;
|
||||
GESTrackObject *trobj;
|
||||
GESTimelineTextOverlay *source;
|
||||
GESTextOverlayClip *source;
|
||||
gchar *text;
|
||||
gint halign, valign;
|
||||
guint32 color;
|
||||
|
@ -115,7 +115,7 @@ GST_START_TEST (test_overlay_in_layer)
|
|||
ges_timeline_add_track (timeline, v);
|
||||
ges_timeline_add_layer (timeline, layer);
|
||||
|
||||
source = ges_timeline_text_overlay_new ();
|
||||
source = ges_overlay_text_clip_new ();
|
||||
|
||||
g_object_set (source, "duration", (guint64) GST_SECOND, NULL);
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ GESClip *
|
|||
make_overlay (char *text, guint64 start, guint64 duration, gint priority,
|
||||
guint32 color, gdouble xpos, gdouble ypos)
|
||||
{
|
||||
GESClip *ret = GES_CLIP (ges_timeline_text_overlay_new ());
|
||||
GESClip *ret = GES_CLIP (ges_overlay_text_clip_new ());
|
||||
|
||||
g_object_set (ret,
|
||||
"text", (gchar *) text,
|
||||
|
|
Loading…
Reference in a new issue