static void
-ges_track_audio_transition_duration_changed (GESTrackTransition * self,
- GstElement * gnlobj);
+ges_track_audio_transition_duration_changed (GESTrackTransition * self);
static GstElement *ges_track_audio_transition_create_element (GESTrackTransition
* self);
}
static void
-ges_track_audio_transition_duration_changed (GESTrackTransition * object,
- GstElement * gnlobj)
+ges_track_audio_transition_duration_changed (GESTrackTransition * object)
{
-
GESTrackAudioTransition *self;
- guint64 duration;
+ guint64 duration = GES_TRACK_OBJECT_DURATION (object);
+ GstElement *gnlobj = GES_TRACK_OBJECT (object)->gnlobject;
GValue zero = { 0, };
GValue one = { 0, };
GST_LOG ("updating controller: gnlobj (%p) acontroller(%p) bcontroller(%p)",
gnlobj, self->a_controller, self->b_controller);
- if (!gnlobj)
- return;
-
- if (!(self->a_controller) || !(self->b_controller))
+ if (G_UNLIKELY ((gnlobj == NULL) || !self->a_controller
+ || !self->b_controller))
return;
- GST_LOG ("getting properties");
- g_object_get (G_OBJECT (gnlobj), "duration", (guint64 *) & duration, NULL);
-
- GST_INFO ("duration: %lud\n", duration);
+ GST_INFO ("duration: %" G_GUINT64_FORMAT, duration);
g_value_init (&zero, G_TYPE_DOUBLE);
g_value_init (&one, G_TYPE_DOUBLE);
g_value_set_double (&zero, 0.0);
{
GESTrackTransitionClass *klass;
- klass = GES_TRACK_TRANSITION_GET_CLASS (self);
GST_LOG ("got duration changed signal");
klass = GES_TRACK_TRANSITION_GET_CLASS (self);
- klass->duration_changed (self, gnlobject);
+ if (klass->duration_changed)
+ klass->duration_changed (self);
}
static void
-ges_track_transition_duration_changed (GESTrackTransition * self, GstElement
- * gnlobject)
+ges_track_transition_duration_changed (GESTrackTransition * self)
{
- GESTrackType type;
- type = ((GESTrackObject *) self)->track->type;
-
GST_WARNING ("transitions don't handle this track type!");
}
gst_bin_add (GST_BIN (object->gnlobject), element);
- klass->duration_changed (self, object->gnlobject);
+ if (klass->duration_changed)
+ klass->duration_changed (self);
+
return TRUE;
}
/* <public> */
GstElement* (*create_element) (GESTrackTransition *self);
- void (*duration_changed) (GESTrackTransition *self, GstElement
- *gnlobj);
+
+ void (*duration_changed) (GESTrackTransition *self);
};
GType ges_track_transition_get_type (void);
GstElement ** smpteref);
static void
-ges_track_video_transition_duration_changed (GESTrackTransition * self,
- GstElement * gnlobj);
+ges_track_video_transition_duration_changed (GESTrackTransition * self);
static GstElement *ges_track_video_transition_create_element (GESTrackTransition
* self);
}
static void
-ges_track_video_transition_duration_changed (GESTrackTransition * object,
- GstElement * gnlobj)
+ges_track_video_transition_duration_changed (GESTrackTransition * object)
{
GValue start_value = { 0, };
GValue end_value = { 0, };
- guint64 duration;
+ guint64 duration = GES_TRACK_OBJECT_DURATION (object);
+ GstElement *gnlobj = GES_TRACK_OBJECT (object)->gnlobject;
GESTrackVideoTransition *self = GES_TRACK_VIDEO_TRANSITION (object);
GST_LOG ("updating controller");
- if (!gnlobj)
+ if (G_UNLIKELY (!gnlobj || !self->controller))
return;
- if (!(self->controller))
- return;
-
- GST_LOG ("getting properties");
- g_object_get (G_OBJECT (gnlobj), "duration", (guint64 *) & duration, NULL);
-
- GST_INFO ("duration: %d\n", duration);
+ GST_INFO ("duration: %" G_GUINT64_FORMAT, duration);
g_value_init (&start_value, G_TYPE_DOUBLE);
g_value_init (&end_value, G_TYPE_DOUBLE);
g_value_set_double (&start_value, self->start_value);