mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
replace existing text position enums
This commit is contained in:
parent
2bb344635b
commit
e588daf078
5 changed files with 18 additions and 55 deletions
|
@ -447,9 +447,6 @@ GESTrackAudioTestSource
|
|||
GESTrackAudioTestSourceClass
|
||||
ges_track_audio_test_source_new
|
||||
ges_track_audio_test_source_get_type
|
||||
DEFAULT_FONT_DESC
|
||||
DEFAULT_HALIGNMENT
|
||||
DEFAULT_VALIGNMENT
|
||||
<SUBSECTION Standard>
|
||||
GES_TRACK_AUDIO_TEST_SOURCE
|
||||
GES_TRACK_AUDIO_TEST_SOURCE_CLASS
|
||||
|
@ -464,8 +461,6 @@ GES_IS_TRACK_AUDIO_TEST_SOURCE_CLASS
|
|||
<TITLE>GESTrackTitleSource</TITLE>
|
||||
GESTrackTitleSource
|
||||
GESTrackTitleSourceClass
|
||||
GESTrackTitleSrcHAlign
|
||||
GESTrackTitleSrcVAlign
|
||||
ges_tl_title_src_get_type
|
||||
ges_track_title_source_set_text
|
||||
ges_track_title_source_set_font_desc
|
||||
|
|
|
@ -72,7 +72,7 @@ static void
|
|||
ges_track_text_overlay_init (GESTrackTextOverlay * self)
|
||||
{
|
||||
self->text = NULL;
|
||||
self->font_desc = g_strdup (DEFAULT_FONT_DESC);
|
||||
self->font_desc = NULL;
|
||||
self->text_el = NULL;
|
||||
self->halign = DEFAULT_HALIGNMENT;
|
||||
self->valign = DEFAULT_VALIGNMENT;
|
||||
|
@ -207,13 +207,13 @@ ges_track_text_overlay_set_font_desc (GESTrackTextOverlay * self,
|
|||
/**
|
||||
* ges_track_text_overlay_valignment:
|
||||
* @self: the #GESTrackTextOverlay* to set text on
|
||||
* @valign: #GESTrackTitleSrcVAlign
|
||||
* @valign: #GESTextVAlign
|
||||
*
|
||||
* Sets the vertical aligment of the text.
|
||||
*/
|
||||
void
|
||||
ges_track_text_overlay_set_valignment (GESTrackTextOverlay * self,
|
||||
GESTrackTitleSrcVAlign valign)
|
||||
GESTextVAlign valign)
|
||||
{
|
||||
self->valign = valign;
|
||||
GST_LOG ("set valignment to: %d", valign);
|
||||
|
@ -224,13 +224,13 @@ ges_track_text_overlay_set_valignment (GESTrackTextOverlay * self,
|
|||
/**
|
||||
* ges_track_text_overlay_halignment:
|
||||
* @self: the #GESTrackTextOverlay* to set text on
|
||||
* @halign: #GESTrackTitleSrcHAlign
|
||||
* @halign: #GESTextHAlign
|
||||
*
|
||||
* Sets the vertical aligment of the text.
|
||||
*/
|
||||
void
|
||||
ges_track_text_overlay_set_halignment (GESTrackTextOverlay * self,
|
||||
GESTrackTitleSrcHAlign halign)
|
||||
GESTextHAlign halign)
|
||||
{
|
||||
self->halign = halign;
|
||||
GST_LOG ("set halignment to: %d", halign);
|
||||
|
|
|
@ -56,8 +56,8 @@ struct _GESTrackTextOverlay {
|
|||
/*< private >*/
|
||||
gchar *text;
|
||||
gchar *font_desc;
|
||||
gint halign;
|
||||
gint valign;
|
||||
GESTextHAlign halign;
|
||||
GESTextVAlign valign;
|
||||
GstElement *text_el;
|
||||
};
|
||||
|
||||
|
@ -81,10 +81,10 @@ void ges_track_text_overlay_set_font_desc(GESTrackTextOverlay *self,
|
|||
const gchar *font_desc);
|
||||
|
||||
void ges_track_text_overlay_set_halignment(GESTrackTextOverlay
|
||||
*self, GESTrackTitleSrcHAlign halgn);
|
||||
*self, GESTextHAlign halgn);
|
||||
|
||||
void ges_track_text_overlay_set_valignment(GESTrackTextOverlay
|
||||
*self, GESTrackTitleSrcVAlign valign);
|
||||
*self, GESTextVAlign valign);
|
||||
|
||||
GESTrackTextOverlay* ges_track_text_overlay_new (void);
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ static void
|
|||
ges_track_title_src_init (GESTrackTitleSource * self)
|
||||
{
|
||||
self->text = NULL;
|
||||
self->font_desc = g_strdup (DEFAULT_FONT_DESC);
|
||||
self->font_desc = NULL;
|
||||
self->text_el = NULL;
|
||||
self->halign = DEFAULT_HALIGNMENT;
|
||||
self->valign = DEFAULT_VALIGNMENT;
|
||||
|
@ -212,13 +212,13 @@ ges_track_title_source_set_font_desc (GESTrackTitleSource * self,
|
|||
/**
|
||||
* ges_track_title_source_valignment:
|
||||
* @self: the #GESTrackTitleSource* to set text on
|
||||
* @valign: #GESTrackTitleSrcVAlign
|
||||
* @valign: #GESTextVAlign
|
||||
*
|
||||
* Sets the vertical aligment of the text.
|
||||
*/
|
||||
void
|
||||
ges_track_title_source_set_valignment (GESTrackTitleSource * self,
|
||||
GESTrackTitleSrcVAlign valign)
|
||||
GESTextVAlign valign)
|
||||
{
|
||||
self->valign = valign;
|
||||
GST_LOG ("set valignment to: %d", valign);
|
||||
|
@ -229,13 +229,13 @@ ges_track_title_source_set_valignment (GESTrackTitleSource * self,
|
|||
/**
|
||||
* ges_track_title_source_halignment:
|
||||
* @self: the #GESTrackTitleSource* to set text on
|
||||
* @halign: #GESTrackTitleSrcHAlign
|
||||
* @halign: #GESTextHAlign
|
||||
*
|
||||
* Sets the vertical aligment of the text.
|
||||
*/
|
||||
void
|
||||
ges_track_title_source_set_halignment (GESTrackTitleSource * self,
|
||||
GESTrackTitleSrcHAlign halign)
|
||||
GESTextHAlign halign)
|
||||
{
|
||||
self->halign = halign;
|
||||
GST_LOG ("set halignment to: %d", halign);
|
||||
|
|
|
@ -44,38 +44,6 @@ G_BEGIN_DECLS
|
|||
#define GES_TRACK_TITLE_SOURCE_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TRACK_TITLE_SOURCE, GESTrackTitleSourceClass))
|
||||
|
||||
#define DEFAULT_FONT_DESC "serif 36"
|
||||
#define DEFAULT_VALIGNMENT GES_TRACK_TITLE_SRC_VALIGN_BASELINE
|
||||
#define DEFAULT_HALIGNMENT GES_TRACK_TITLE_SRC_HALIGN_CENTER
|
||||
|
||||
/**
|
||||
* GESTrackTitleSrcVAlign:
|
||||
* @GES_TRACK_TITLE_SRC_VALIGN_BASELINE: draw text on the baseline
|
||||
* @GES_TRACK_TITLE_SRC_VALIGN_BOTTOM: draw text on the bottom
|
||||
* @GES_TRACK_TITLE_SRC_VALIGN_TOP: draw test on top
|
||||
*
|
||||
* Vertical alignment of the text.
|
||||
*/
|
||||
typedef enum {
|
||||
GES_TRACK_TITLE_SRC_VALIGN_BASELINE,
|
||||
GES_TRACK_TITLE_SRC_VALIGN_BOTTOM,
|
||||
GES_TRACK_TITLE_SRC_VALIGN_TOP
|
||||
} GESTrackTitleSrcVAlign;
|
||||
|
||||
/**
|
||||
* GESTrackTitleSrcHAlign:
|
||||
* @GES_TRACK_TITLE_SRC_HALIGN_LEFT: align text left
|
||||
* @GES_TRACK_TITLE_SRC_HALIGN_CENTER: align text center
|
||||
* @GES_TRACK_TITLE_SRC_HALIGN_RIGHT: align text right
|
||||
*
|
||||
* Horizontal alignment of the text.
|
||||
*/
|
||||
typedef enum {
|
||||
GES_TRACK_TITLE_SRC_HALIGN_LEFT,
|
||||
GES_TRACK_TITLE_SRC_HALIGN_CENTER,
|
||||
GES_TRACK_TITLE_SRC_HALIGN_RIGHT
|
||||
} GESTrackTitleSrcHAlign;
|
||||
|
||||
/**
|
||||
* GESTrackTitleSource:
|
||||
* @parent: parent
|
||||
|
@ -87,8 +55,8 @@ struct _GESTrackTitleSource {
|
|||
/*< private >*/
|
||||
gchar *text;
|
||||
gchar *font_desc;
|
||||
gint halign;
|
||||
gint valign;
|
||||
GESTextHAlign halign;
|
||||
GESTextVAlign valign;
|
||||
GstElement *text_el;
|
||||
GstElement *background_el;
|
||||
};
|
||||
|
@ -113,10 +81,10 @@ void ges_track_title_source_set_font_desc(GESTrackTitleSource *self,
|
|||
const gchar *font_desc);
|
||||
|
||||
void ges_track_title_source_set_halignment(GESTrackTitleSource
|
||||
*self, GESTrackTitleSrcHAlign halgn);
|
||||
*self, GESTextHAlign halgn);
|
||||
|
||||
void ges_track_title_source_set_valignment(GESTrackTitleSource
|
||||
*self, GESTrackTitleSrcVAlign valign);
|
||||
*self, GESTextVAlign valign);
|
||||
|
||||
GESTrackTitleSource* ges_track_title_source_new (void);
|
||||
|
||||
|
|
Loading…
Reference in a new issue