mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
layer: Add a method to check if a layer is empty or not
API: ges_timeline_layer_is_empty
This commit is contained in:
parent
4c26b89e3c
commit
4a881a43d9
4 changed files with 27 additions and 0 deletions
|
@ -956,6 +956,12 @@
|
|||
(return-type "GList*")
|
||||
)
|
||||
|
||||
(define-method is_empty
|
||||
(of-object "GESTimelineLayer")
|
||||
(c-name "ges_timeline_layer_is_empty")
|
||||
(return-type "gboolean")
|
||||
)
|
||||
|
||||
|
||||
|
||||
;; From ges-timeline-object.h
|
||||
|
|
|
@ -285,6 +285,7 @@ ges_timeline_layer_get_objects
|
|||
ges_timeline_layer_get_timeline
|
||||
ges_timeline_layer_get_auto_transition
|
||||
ges_timeline_layer_set_auto_transition
|
||||
ges_timeline_layer_is_empty
|
||||
<SUBSECTION Standard>
|
||||
GESTimelineLayerPrivate
|
||||
ges_timeline_layer_set_timeline
|
||||
|
|
|
@ -994,3 +994,21 @@ ges_timeline_layer_get_objects (GESTimelineLayer * layer)
|
|||
ret = g_list_reverse (ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_layer_is_empty:
|
||||
* @layer: The #GESTimelineLayer to check
|
||||
*
|
||||
* Convenience method to check if @layer is empty (doesn't contain any object),
|
||||
* or not.
|
||||
*
|
||||
* Returns: %TRUE if @layer is empty, %FALSE if it already contains at least
|
||||
* one #GESTimelineObject
|
||||
*/
|
||||
gboolean
|
||||
ges_timeline_layer_is_empty (GESTimelineLayer * layer)
|
||||
{
|
||||
g_return_val_if_fail (GES_IS_TIMELINE_LAYER (layer), FALSE);
|
||||
|
||||
return (layer->priv->objects_start == NULL);
|
||||
}
|
||||
|
|
|
@ -108,6 +108,8 @@ gboolean ges_timeline_layer_remove_object (GESTimelineLayer * layer,
|
|||
void ges_timeline_layer_set_priority (GESTimelineLayer * layer,
|
||||
guint priority);
|
||||
|
||||
gboolean ges_timeline_layer_is_empty (GESTimelineLayer * layer);
|
||||
|
||||
guint ges_timeline_layer_get_priority (GESTimelineLayer * layer);
|
||||
|
||||
gboolean ges_timeline_layer_get_auto_transition (GESTimelineLayer * layer);
|
||||
|
|
Loading…
Reference in a new issue