make sure to set properties on new track objects

This commit is contained in:
Brandon Lewis 2010-07-02 12:26:42 +02:00 committed by Edward Hervey
parent e588daf078
commit ec803b0815
2 changed files with 19 additions and 6 deletions

View file

@ -175,7 +175,7 @@ ges_tl_text_overlay_class_init (GESTimelineTextOverlayClass * klass)
"Pango font description of font to be used for rendering. "
"See documentation of pango_font_description_from_string "
"for syntax.", DEFAULT_PROP_FONT_DESC,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
/**
* GESTimelineTextOverlay:valignment
@ -184,8 +184,9 @@ ges_tl_text_overlay_class_init (GESTimelineTextOverlayClass * klass)
*/
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_VALIGNMENT,
g_param_spec_enum ("valignment", "vertical alignment",
"Vertical alignment of the text", GES_TIMELINE_TITLE_SRC_VALIGN_TYPE,
DEFAULT_PROP_VALIGNMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
"Vertical alignment of the text", GES_TEXT_VALIGN_TYPE,
DEFAULT_PROP_VALIGNMENT, G_PARAM_READWRITE | G_PARAM_CONSTRUCT |
G_PARAM_STATIC_STRINGS));
/**
* GESTimelineTextOverlay:halignment
*
@ -341,6 +342,12 @@ ges_tl_text_overlay_create_track_object (GESTimelineObject * obj,
res = (GESTrackObject *) ges_track_text_overlay_new ();
GST_DEBUG ("Setting text property");
ges_track_text_overlay_set_text ((GESTrackTextOverlay *) res, tfs->text);
ges_track_text_overlay_set_font_desc ((GESTrackTextOverlay *) res,
tfs->font_desc);
ges_track_text_overlay_set_halignment ((GESTrackTextOverlay *) res,
tfs->halign);
ges_track_text_overlay_set_valignment ((GESTrackTextOverlay *) res,
tfs->valign);
}
else {

View file

@ -166,7 +166,7 @@ ges_tl_title_src_class_init (GESTimelineTitleSourceClass * klass)
g_object_class_install_property (object_class, PROP_TEXT,
g_param_spec_string ("text", "Text", "The text to display",
DEFAULT_PROP_TEXT, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
DEFAULT_TEXT, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
/**
* GESTimelineTitleSource:font-dec
@ -178,8 +178,8 @@ ges_tl_title_src_class_init (GESTimelineTitleSourceClass * klass)
g_param_spec_string ("font-desc", "font description",
"Pango font description of font to be used for rendering. "
"See documentation of pango_font_description_from_string "
"for syntax.", DEFAULT_PROP_FONT_DESC,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
"for syntax.", DEFAULT_FONT_DESC,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
/**
* GESTimelineTitleSource:valignment
@ -341,6 +341,12 @@ ges_tl_title_src_create_track_object (GESTimelineObject * obj, GESTrack * track)
res = (GESTrackObject *) ges_track_title_source_new ();
GST_DEBUG ("Setting text property");
ges_track_title_source_set_text ((GESTrackTitleSource *) res, tfs->text);
ges_track_title_source_set_font_desc ((GESTrackTitleSource *) res,
tfs->font_desc);
ges_track_title_source_set_halignment ((GESTrackTitleSource *) res,
tfs->halign);
ges_track_title_source_set_valignment ((GESTrackTitleSource *) res,
tfs->valign);
}
else if (track->type == GES_TRACK_TYPE_AUDIO) {