From 439f9b4cc04cea1d6a4804c4dcc68a5d77af0a27 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Fri, 29 Mar 2013 18:55:27 +0100 Subject: [PATCH] layer: Simplify a bit how we handle priorities --- ges/ges-layer.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/ges/ges-layer.c b/ges/ges-layer.c index 5df7f45..c2ecbca 100644 --- a/ges/ges-layer.c +++ b/ges/ges-layer.c @@ -472,7 +472,6 @@ ges_layer_add_clip (GESLayer * layer, GESClip * clip) GESAsset *asset; GESLayerPrivate *priv; GESLayer *current_layer; - guint32 maxprio, minprio, prio; g_return_val_if_fail (GES_IS_LAYER (layer), FALSE); g_return_val_if_fail (GES_IS_CLIP (clip), FALSE); @@ -533,19 +532,15 @@ ges_layer_add_clip (GESLayer * layer, GESClip * clip) /* Inform the clip it's now in this layer */ ges_clip_set_layer (clip, layer); - GST_DEBUG ("current clip priority : %d, layer min/max : %d/%d", - _PRIORITY (clip), layer->min_gnl_priority, layer->max_gnl_priority); + GST_DEBUG ("current clip priority : %d, Height: %d", _PRIORITY (clip), + LAYER_HEIGHT); /* Set the priority. */ - maxprio = layer->max_gnl_priority; - minprio = layer->min_gnl_priority; - prio = _PRIORITY (clip); - - if (minprio + prio > (maxprio)) { + if (_PRIORITY (clip) > LAYER_HEIGHT) { GST_WARNING_OBJECT (layer, "%p is out of the layer space, setting its priority to " - "%d, setting it to the maximum priority of the layer: %d", clip, prio, - maxprio - minprio); + "%d, setting it to the maximum priority of the layer: %d", clip, + _PRIORITY (clip), LAYER_HEIGHT - 1); _set_priority0 (GES_TIMELINE_ELEMENT (clip), LAYER_HEIGHT - 1); } -- 2.7.4