mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +00:00
add duration_changed virtual method to GESTrackTransition
This commit is contained in:
parent
2146e4a9af
commit
a1734962e2
2 changed files with 20 additions and 10 deletions
|
@ -123,9 +123,22 @@ static void
|
||||||
gnlobject_duration_cb (GstElement * gnlobject, GParamSpec * arg
|
gnlobject_duration_cb (GstElement * gnlobject, GParamSpec * arg
|
||||||
G_GNUC_UNUSED, GESTrackTransition * self)
|
G_GNUC_UNUSED, GESTrackTransition * self)
|
||||||
{
|
{
|
||||||
GESTrackType type = ((GESTrackObject *) self)->track->type;
|
GESTrackTransitionClass *klass;
|
||||||
|
|
||||||
|
klass = GES_TRACK_TRANSITION_GET_CLASS (self);
|
||||||
GST_LOG ("got duration changed signal");
|
GST_LOG ("got duration changed signal");
|
||||||
|
|
||||||
|
klass = GES_TRACK_TRANSITION_GET_CLASS (self);
|
||||||
|
klass->duration_changed (self, gnlobject);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
ges_track_transition_duration_changed (GESTrackTransition * self, GstElement
|
||||||
|
* gnlobject)
|
||||||
|
{
|
||||||
|
GESTrackType type;
|
||||||
|
type = ((GESTrackObject *) self)->track->type;
|
||||||
|
|
||||||
if (type == GES_TRACK_TYPE_VIDEO)
|
if (type == GES_TRACK_TYPE_VIDEO)
|
||||||
ges_track_transition_update_vcontroller (self, gnlobject);
|
ges_track_transition_update_vcontroller (self, gnlobject);
|
||||||
else if (type == GES_TRACK_TYPE_AUDIO) {
|
else if (type == GES_TRACK_TYPE_AUDIO) {
|
||||||
|
@ -328,10 +341,6 @@ create_video_bin (GESTrackTransition * self)
|
||||||
self->vcontroller = controller;
|
self->vcontroller = controller;
|
||||||
self->vcontrol_source = control_source;
|
self->vcontrol_source = control_source;
|
||||||
|
|
||||||
GST_LOG ("controller created, updating");
|
|
||||||
ges_track_transition_update_vcontroller (self,
|
|
||||||
((GESTrackObject *) self)->gnlobject);
|
|
||||||
|
|
||||||
return topbin;
|
return topbin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -410,11 +419,6 @@ create_audio_bin (GESTrackTransition * self)
|
||||||
self->a_acontrol_source = acontrol_source;
|
self->a_acontrol_source = acontrol_source;
|
||||||
self->a_bcontrol_source = bcontrol_source;
|
self->a_bcontrol_source = bcontrol_source;
|
||||||
|
|
||||||
GST_LOG ("controllers created, updating");
|
|
||||||
|
|
||||||
ges_track_transition_update_acontroller (self,
|
|
||||||
((GESTrackObject *) self)->gnlobject);
|
|
||||||
|
|
||||||
return topbin;
|
return topbin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -443,6 +447,8 @@ ges_track_transition_create_gnl_object (GESTrackObject * object)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
gst_bin_add (GST_BIN (object->gnlobject), element);
|
gst_bin_add (GST_BIN (object->gnlobject), element);
|
||||||
|
|
||||||
|
klass->duration_changed (self, object->gnlobject);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -474,6 +480,7 @@ ges_track_transition_class_init (GESTrackTransitionClass * klass)
|
||||||
|
|
||||||
track_class->create_gnl_object = ges_track_transition_create_gnl_object;
|
track_class->create_gnl_object = ges_track_transition_create_gnl_object;
|
||||||
klass->create_element = ges_track_transition_create_element;
|
klass->create_element = ges_track_transition_create_element;
|
||||||
|
klass->duration_changed = ges_track_transition_duration_changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -101,8 +101,11 @@ struct _GESTrackTransition
|
||||||
|
|
||||||
struct _GESTrackTransitionClass {
|
struct _GESTrackTransitionClass {
|
||||||
GESTrackObjectClass parent_class;
|
GESTrackObjectClass parent_class;
|
||||||
|
|
||||||
/* <public> */
|
/* <public> */
|
||||||
GstElement* (*create_element) (GESTrackTransition *self, GESTrack *track);
|
GstElement* (*create_element) (GESTrackTransition *self, GESTrack *track);
|
||||||
|
void (*duration_changed) (GESTrackTransition *self, GstElement
|
||||||
|
*gnlobj);
|
||||||
};
|
};
|
||||||
|
|
||||||
GType ges_track_transition_get_type (void);
|
GType ges_track_transition_get_type (void);
|
||||||
|
|
Loading…
Reference in a new issue