mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 07:08:23 +00:00
video-source: Make sure to set framepositionner zorder when creating it
And fix a computation bug where we would be having mixing order reversed between layers. And make sure that the positionner does not mix up Transition handling of the zorder
This commit is contained in:
parent
ab25464876
commit
8c0a6402f6
4 changed files with 9 additions and 7 deletions
|
@ -101,13 +101,13 @@ parse_metadata (GstPad * mixer_pad, GstPadProbeInfo * info,
|
|||
return GST_PAD_PROBE_OK;
|
||||
}
|
||||
|
||||
if (!self->no_alpha) {
|
||||
g_object_set (mixer_pad, "alpha", meta->alpha, NULL);
|
||||
if (!self->disable_zorder_alpha) {
|
||||
g_object_set (mixer_pad, "alpha", meta->alpha,
|
||||
"zorder", meta->zorder, NULL);
|
||||
}
|
||||
|
||||
g_object_set (mixer_pad, "xpos", meta->posx, "ypos",
|
||||
meta->posy, "zorder", meta->zorder, "width", meta->width,
|
||||
"height", meta->height, NULL);
|
||||
meta->posy, "width", meta->width, "height", meta->height, NULL);
|
||||
|
||||
return GST_PAD_PROBE_OK;
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ struct _GESSmartMixer
|
|||
GMutex lock;
|
||||
|
||||
GstCaps *caps;
|
||||
gboolean no_alpha;
|
||||
gboolean disable_zorder_alpha;
|
||||
|
||||
gpointer _ges_reserved[GES_PADDING];
|
||||
};
|
||||
|
|
|
@ -99,7 +99,7 @@ _set_priority (GESTimelineElement * element, guint32 priority)
|
|||
|
||||
if (res && self->priv->positionner)
|
||||
g_object_set (self->priv->positionner, "zorder",
|
||||
GES_TIMELINE_ELEMENT_PRIORITY (self), NULL);
|
||||
G_MAXUINT - GES_TIMELINE_ELEMENT_PRIORITY (self), NULL);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
@ -136,6 +136,8 @@ ges_video_source_create_element (GESTrackElement * trksrc)
|
|||
/* That positionner will add metadata to buffers according to its
|
||||
properties, acting like a proxy for our smart-mixer dynamic pads. */
|
||||
positionner = gst_element_factory_make ("framepositionner", "frame_tagger");
|
||||
g_object_set (positionner, "zorder",
|
||||
G_MAXUINT - GES_TIMELINE_ELEMENT_PRIORITY (self), NULL);
|
||||
|
||||
videoscale =
|
||||
gst_element_factory_make ("videoscale", "track-element-videoscale");
|
||||
|
|
|
@ -314,7 +314,7 @@ ges_video_transition_create_element (GESTrackElement * object)
|
|||
|
||||
mixer = ges_smart_mixer_new (NULL);
|
||||
g_assert (mixer);
|
||||
GES_SMART_MIXER (mixer)->no_alpha = TRUE;
|
||||
GES_SMART_MIXER (mixer)->disable_zorder_alpha = TRUE;
|
||||
gst_bin_add (GST_BIN (topbin), mixer);
|
||||
|
||||
priv->mixer_sinka =
|
||||
|
|
Loading…
Reference in a new issue