diff options
author | Thibault Saunier <thibault.saunier@collabora.com> | 2013-06-13 18:51:15 -0400 |
---|---|---|
committer | Thibault Saunier <thibault.saunier@collabora.com> | 2013-06-23 16:56:37 -0400 |
commit | 43fe6ac3c0f4e9ccd6c0ff8ffc5c7cffdcf3076e (patch) | |
tree | 3cede15be2d615a42d8b35facc5be517deb5f86b | |
parent | c99cc0ef17d5040105958bfc6085fe298cba2096 (diff) |
gnl: Setting priority == MAXUINT32 does not mean "default object"
This was how expandables worked prior to the expandable property.
Using MAXUINT32 has some limitation and which are fully covered by the
expandable property. Drop this support, as we will plan on implementing
an automatic way of filling gaps.
https://bugzilla.gnome.org/show_bug.cgi?id=701287
-rw-r--r-- | gnl/gnlcomposition.c | 12 | ||||
-rw-r--r-- | gnl/gnlobject.c | 9 |
2 files changed, 5 insertions, 16 deletions
diff --git a/gnl/gnlcomposition.c b/gnl/gnlcomposition.c index d8e1fa0..4d6371e 100644 --- a/gnl/gnlcomposition.c +++ b/gnl/gnlcomposition.c @@ -2839,8 +2839,7 @@ gnl_composition_add_object (GstBin * bin, GstElement * element) COMP_OBJECTS_LOCK (comp); - if (((GNL_OBJECT_PRIORITY (element) == G_MAXUINT32) || - GNL_OBJECT_IS_EXPANDABLE (element)) && + if ((GNL_OBJECT_IS_EXPANDABLE (element)) && g_list_find (priv->expandables, element)) { GST_WARNING_OBJECT (comp, "We already have an expandable, remove it before adding new one"); @@ -2867,8 +2866,7 @@ gnl_composition_add_object (GstBin * bin, GstElement * element) entry = g_slice_new0 (GnlCompositionEntry); entry->object = (GnlObject *) element; - if (G_LIKELY ((GNL_OBJECT_PRIORITY (element) == G_MAXUINT32) || - GNL_OBJECT_IS_EXPANDABLE (element))) { + if (GNL_OBJECT_IS_EXPANDABLE (element)) { /* Only react on non-default objects properties */ g_object_set (element, "start", (GstClockTime) 0, @@ -2892,8 +2890,7 @@ gnl_composition_add_object (GstBin * bin, GstElement * element) gnl_object_set_caps ((GnlObject *) element, ((GnlObject *) comp)->caps); /* Special case for default source. */ - if ((GNL_OBJECT_PRIORITY (element) == G_MAXUINT32) || - GNL_OBJECT_IS_EXPANDABLE (element)) { + if (GNL_OBJECT_IS_EXPANDABLE (element)) { /* It doesn't get added to objects_start and objects_stop. */ priv->expandables = g_list_prepend (priv->expandables, element); goto beach; @@ -2959,8 +2956,7 @@ gnl_composition_remove_object (GstBin * bin, GstElement * element) gst_element_set_locked_state (element, FALSE); /* handle default source */ - if ((GNL_OBJECT_PRIORITY (element) == G_MAXUINT32) || - GNL_OBJECT_IS_EXPANDABLE (element)) { + if (GNL_OBJECT_IS_EXPANDABLE (element)) { /* Find it in the list */ priv->expandables = g_list_remove (priv->expandables, element); } else { diff --git a/gnl/gnlobject.c b/gnl/gnlobject.c index 60b4a10..0b749cd 100644 --- a/gnl/gnlobject.c +++ b/gnl/gnlobject.c @@ -495,14 +495,7 @@ gnl_object_set_property (GObject * object, guint prop_id, SET_PENDING_VALUE (inpoint, "inpoint", uint64, G_GUINT64_FORMAT); break; case PROP_PRIORITY: - if (g_value_get_uint (value) == G_MAXUINT32) { - GST_DEBUG_OBJECT (object, "Setting priority to G_MAXUINT32, which means" - "'Default object', commiting right now"); - /* This is not the cleanast thing to do but we anyway plan to remove - * that behaviour soon. */ - gnlobject->pending_priority = gnlobject->priority = G_MAXUINT32; - } else - SET_PENDING_VALUE (priority, "priority", uint, G_GUINT32_FORMAT); + SET_PENDING_VALUE (priority, "priority", uint, G_GUINT32_FORMAT); break; case PROP_ACTIVE: SET_PENDING_VALUE (active, "active", boolean, G_GUINT32_FORMAT); |