mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-02 14:20:06 +00:00
ges/ges-timeline-transition.c: can't set enums by nick
This commit is contained in:
parent
221df1b880
commit
0608930b19
1 changed files with 15 additions and 6 deletions
|
@ -125,7 +125,7 @@ ges_timeline_transition_class_init (GESTimelineTransitionClass * klass)
|
|||
g_param_spec_enum ("vtype", "VType",
|
||||
"The SMPTE video wipe to use, or 0 for crossfade",
|
||||
GES_TYPE_TIMELINE_TRANSITION_VTYPE_TYPE, VTYPE_CROSSFADE,
|
||||
G_PARAM_READWRITE));
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
|
||||
|
||||
|
||||
timobj_class->create_track_object = ges_tl_transition_create_track_object;
|
||||
|
@ -440,8 +440,6 @@ static GEnumValue transition_types[] = {
|
|||
{0, NULL, NULL}
|
||||
};
|
||||
|
||||
/* how many types could GType type if GType could type types? */
|
||||
|
||||
static GType
|
||||
ges_type_timeline_transition_vtype_get_type (void)
|
||||
{
|
||||
|
@ -466,6 +464,7 @@ ges_timeline_transition_new (gint vtype)
|
|||
|
||||
ret = g_object_new (GES_TYPE_TIMELINE_TRANSITION, "vtype", (gint) vtype,
|
||||
NULL);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -473,8 +472,18 @@ GESTimelineTransition *
|
|||
ges_timeline_transition_new_for_nick (gchar * nick)
|
||||
{
|
||||
GESTimelineTransition *ret;
|
||||
ret = g_object_new (GES_TYPE_TIMELINE_TRANSITION, NULL);
|
||||
g_object_set (ret, "vtype", (gchar *) nick, NULL);
|
||||
GEnumValue *value;
|
||||
int i;
|
||||
|
||||
return ret;
|
||||
for (i = 0, value = &transition_types[i]; value->value;
|
||||
value = &transition_types[i++]) {
|
||||
if (!strcmp (nick, value->value_nick)) {
|
||||
ret = g_object_new (GES_TYPE_TIMELINE_TRANSITION, "vtype",
|
||||
(gint) value->value, NULL);
|
||||
return ret;
|
||||
}
|
||||
value++;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue