mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 05:31:15 +00:00
layer: Simplify a bit how we handle priorities
This commit is contained in:
parent
b57f55121b
commit
439f9b4cc0
1 changed files with 5 additions and 10 deletions
|
@ -472,7 +472,6 @@ ges_layer_add_clip (GESLayer * layer, GESClip * clip)
|
||||||
GESAsset *asset;
|
GESAsset *asset;
|
||||||
GESLayerPrivate *priv;
|
GESLayerPrivate *priv;
|
||||||
GESLayer *current_layer;
|
GESLayer *current_layer;
|
||||||
guint32 maxprio, minprio, prio;
|
|
||||||
|
|
||||||
g_return_val_if_fail (GES_IS_LAYER (layer), FALSE);
|
g_return_val_if_fail (GES_IS_LAYER (layer), FALSE);
|
||||||
g_return_val_if_fail (GES_IS_CLIP (clip), 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 */
|
/* Inform the clip it's now in this layer */
|
||||||
ges_clip_set_layer (clip, layer);
|
ges_clip_set_layer (clip, layer);
|
||||||
|
|
||||||
GST_DEBUG ("current clip priority : %d, layer min/max : %d/%d",
|
GST_DEBUG ("current clip priority : %d, Height: %d", _PRIORITY (clip),
|
||||||
_PRIORITY (clip), layer->min_gnl_priority, layer->max_gnl_priority);
|
LAYER_HEIGHT);
|
||||||
|
|
||||||
/* Set the priority. */
|
/* Set the priority. */
|
||||||
maxprio = layer->max_gnl_priority;
|
if (_PRIORITY (clip) > LAYER_HEIGHT) {
|
||||||
minprio = layer->min_gnl_priority;
|
|
||||||
prio = _PRIORITY (clip);
|
|
||||||
|
|
||||||
if (minprio + prio > (maxprio)) {
|
|
||||||
GST_WARNING_OBJECT (layer,
|
GST_WARNING_OBJECT (layer,
|
||||||
"%p is out of the layer space, setting its priority to "
|
"%p is out of the layer space, setting its priority to "
|
||||||
"%d, setting it to the maximum priority of the layer: %d", clip, prio,
|
"%d, setting it to the maximum priority of the layer: %d", clip,
|
||||||
maxprio - minprio);
|
_PRIORITY (clip), LAYER_HEIGHT - 1);
|
||||||
_set_priority0 (GES_TIMELINE_ELEMENT (clip), LAYER_HEIGHT - 1);
|
_set_priority0 (GES_TIMELINE_ELEMENT (clip), LAYER_HEIGHT - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue