text-overlay: added text properties as child-properties

This commit is contained in:
Lazar Claudiu 2014-07-24 13:23:36 +03:00 committed by Thibault Saunier
parent ea2b814fba
commit b850f3042e

View file

@ -145,6 +145,10 @@ ges_text_overlay_create_element (GESTrackElement * track_element)
GstPad *src_target, *sink_target;
GstPad *src, *sink;
GESTextOverlay *self = GES_TEXT_OVERLAY (track_element);
const gchar *child_props[] =
{ "xpos", "ypos", "deltax", "deltay", "auto-resize", "outline-color",
NULL
};
text = gst_element_factory_make ("textoverlay", NULL);
iconv = gst_element_factory_make ("videoconvert", NULL);
@ -163,6 +167,9 @@ ges_text_overlay_create_element (GESTrackElement * track_element)
g_object_set (text, "xpos", (gdouble) self->priv->xpos, NULL);
g_object_set (text, "ypos", (gdouble) self->priv->ypos, NULL);
ges_track_element_add_children_props (track_element, text, NULL, NULL,
child_props);
ret = gst_bin_new ("overlay-bin");
gst_bin_add_many (GST_BIN (ret), text, iconv, oconv, NULL);
gst_element_link_many (iconv, text, oconv, NULL);