mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
ges/ges-track-transition.{c,h}, tests/check/ges/transition.c: change vtype
from GEnumValue to simple gint;
This commit is contained in:
parent
cfe079fc94
commit
b3ec2bad19
3 changed files with 14 additions and 13 deletions
|
@ -198,11 +198,11 @@ link_element_to_mixer (GstElement * element, GstElement * mixer)
|
|||
|
||||
static GObject *
|
||||
link_element_to_mixer_with_smpte (GstBin * bin, GstElement * element,
|
||||
GstElement * mixer, GEnumValue * type)
|
||||
GstElement * mixer, gint type)
|
||||
{
|
||||
GstElement *smptealpha = gst_element_factory_make ("smptealpha", NULL);
|
||||
g_object_set (G_OBJECT (smptealpha),
|
||||
"type", (gint) type->value, "invert", (gboolean) TRUE, NULL);
|
||||
"type", (gint) type, "invert", (gboolean) TRUE, NULL);
|
||||
gst_bin_add (bin, smptealpha);
|
||||
|
||||
gst_element_link_many (element, smptealpha, mixer, NULL);
|
||||
|
@ -426,7 +426,7 @@ ges_track_transition_init (GESTrackTransition * self)
|
|||
{
|
||||
self->vcontroller = NULL;
|
||||
self->vcontrol_source = NULL;
|
||||
self->vtype = NULL;
|
||||
self->vtype = 0;
|
||||
self->vstart_value = 0.0;
|
||||
self->vend_value = 0.0;
|
||||
|
||||
|
@ -441,7 +441,8 @@ GESTrackTransition *
|
|||
ges_track_transition_new (GEnumValue * type)
|
||||
{
|
||||
GESTrackTransition *ret = g_object_new (GES_TYPE_TRACK_TRANSITION, NULL);
|
||||
ret->vtype = type;
|
||||
if (type)
|
||||
ret->vtype = type->value;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ struct _GESTrackTransition
|
|||
|
||||
/*< public >*/
|
||||
/* given to to smpte alpha element */
|
||||
GEnumValue *vtype;
|
||||
gint vtype;
|
||||
|
||||
/*< private >*/
|
||||
|
||||
|
|
|
@ -35,23 +35,23 @@ GST_START_TEST (test_transition_basic)
|
|||
ges_init ();
|
||||
|
||||
track = ges_track_video_raw_new ();
|
||||
fail_unless (track != NULL);
|
||||
fail_unless (track != 0);
|
||||
|
||||
tr1 = ges_timeline_transition_new (NULL);
|
||||
fail_unless (tr1 != NULL);
|
||||
fail_unless (tr1->vtype == NULL);
|
||||
fail_unless (tr1 != 0);
|
||||
fail_unless (tr1->vtype == 0);
|
||||
|
||||
tr2 = ges_timeline_transition_new_for_nick ("bar-wipe-lr");
|
||||
fail_unless (tr2 != NULL);
|
||||
fail_unless (tr2->vtype && tr2->vtype->value == 1);
|
||||
fail_unless (tr2 != 0);
|
||||
fail_unless (tr2->vtype->value == 1);
|
||||
|
||||
/* Make sure track object is created and vtype is set */
|
||||
trackobject =
|
||||
ges_timeline_object_create_track_object (GES_TIMELINE_OBJECT (tr2),
|
||||
track);
|
||||
|
||||
fail_unless (trackobject != NULL);
|
||||
fail_unless (GES_TRACK_TRANSITION (trackobject)->vtype->value == 1);
|
||||
fail_unless (trackobject != 0);
|
||||
fail_unless (GES_TRACK_TRANSITION (trackobject)->vtype == 1);
|
||||
|
||||
g_object_unref (trackobject);
|
||||
g_object_unref (track);
|
||||
|
|
Loading…
Reference in a new issue