mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-13 12:51:16 +00:00
GESSimpleTimelineLayer: override get_objects () virtual method
This commit is contained in:
parent
06695545e0
commit
0ced93c4ed
1 changed files with 19 additions and 0 deletions
|
@ -52,6 +52,8 @@ static void
|
|||
timeline_object_height_changed_cb (GESTimelineObject * object G_GNUC_UNUSED,
|
||||
GParamSpec * arg G_GNUC_UNUSED, GESSimpleTimelineLayer * layer);
|
||||
|
||||
static GList *get_objects (GESTimelineLayer * layer);
|
||||
|
||||
G_DEFINE_TYPE (GESSimpleTimelineLayer, ges_simple_timeline_layer,
|
||||
GES_TYPE_TIMELINE_LAYER);
|
||||
|
||||
|
@ -122,6 +124,7 @@ ges_simple_timeline_layer_class_init (GESSimpleTimelineLayerClass * klass)
|
|||
/* Be informed when objects are being added/removed from elsewhere */
|
||||
layer_class->object_removed = ges_simple_timeline_layer_object_removed;
|
||||
layer_class->object_added = ges_simple_timeline_layer_object_added;
|
||||
layer_class->get_objects = get_objects;
|
||||
|
||||
/**
|
||||
* GESSimpleTimelineLayer:valid:
|
||||
|
@ -448,3 +451,19 @@ timeline_object_height_changed_cb (GESTimelineObject * object,
|
|||
GST_LOG ("layer %p: notify height changed %p", layer, object);
|
||||
gstl_recalculate (layer);
|
||||
}
|
||||
|
||||
static GList *
|
||||
get_objects (GESTimelineLayer * l)
|
||||
{
|
||||
GList *ret;
|
||||
GList *tmp;
|
||||
GESSimpleTimelineLayer *layer = (GESSimpleTimelineLayer *) l;
|
||||
|
||||
ret = g_list_copy (layer->objects);
|
||||
|
||||
for (tmp = ret; tmp; tmp = tmp->next) {
|
||||
g_object_ref (tmp->data);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue