ges/ges-timeline-transition.{c,h},tests/.../transition.c: type change of vtype

to gint from GEnumValue
This commit is contained in:
Brandon Lewis 2010-06-02 16:43:10 +02:00 committed by Edward Hervey
parent e69dcea71a
commit 22534176d8
3 changed files with 5 additions and 9 deletions

View file

@ -83,7 +83,7 @@ ges_timeline_transition_class_init (GESTimelineTransitionClass * klass)
static void static void
ges_timeline_transition_init (GESTimelineTransition * self) ges_timeline_transition_init (GESTimelineTransition * self)
{ {
self->vtype = NULL; self->vtype = 0;
} }
static GESTrackObject * static GESTrackObject *
@ -95,11 +95,7 @@ ges_tl_transition_create_track_object (GESTimelineObject * obj,
GST_DEBUG ("Creating a GESTrackTransition"); GST_DEBUG ("Creating a GESTrackTransition");
gint type = 0; res = GES_TRACK_OBJECT (ges_track_transition_new (transition->vtype));
if (transition->vtype)
type = transition->vtype->value;
res = GES_TRACK_OBJECT (ges_track_transition_new (type));
return res; return res;
} }
@ -110,7 +106,7 @@ ges_timeline_transition_new (GEnumValue * vtype)
GESTimelineTransition *ret = g_object_new GESTimelineTransition *ret = g_object_new
(GES_TYPE_TIMELINE_TRANSITION, NULL); (GES_TYPE_TIMELINE_TRANSITION, NULL);
ret->vtype = vtype; ret->vtype = vtype ? vtype->value : 0;
return ret; return ret;
} }

View file

@ -51,7 +51,7 @@ G_BEGIN_DECLS
struct _GESTimelineTransition { struct _GESTimelineTransition {
GESTimelineObject parent; GESTimelineObject parent;
/*< public >*/ /*< public >*/
GEnumValue *vtype; gint vtype;
}; };
/** /**

View file

@ -43,7 +43,7 @@ GST_START_TEST (test_transition_basic)
tr2 = ges_timeline_transition_new_for_nick ("bar-wipe-lr"); tr2 = ges_timeline_transition_new_for_nick ("bar-wipe-lr");
fail_unless (tr2 != 0); fail_unless (tr2 != 0);
fail_unless (tr2->vtype->value == 1); fail_unless (tr2->vtype == 1);
/* Make sure track object is created and vtype is set */ /* Make sure track object is created and vtype is set */
trackobject = trackobject =