mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 03:01:03 +00:00
pad: add no-reconfigure link check
Enable it to prevent sending reconfigure when linking elements. Useful for autoplugging when we know caps or bufferpools shouldn't change to save doing caps renegotiation to end up with the same final scenario. The no-reconfigure is not a proper check, it is a flag. It is implemented as a GstPadLinkCheck to avoid creating another gst_pad_link variant. https://bugzilla.gnome.org/show_bug.cgi?id=757653
This commit is contained in:
parent
c570df71e5
commit
83cac0f7b6
2 changed files with 9 additions and 1 deletions
|
@ -2520,7 +2520,8 @@ gst_pad_link_full (GstPad * srcpad, GstPad * sinkpad, GstPadLinkCheck flags)
|
|||
GST_CAT_INFO (GST_CAT_PADS, "linked %s:%s and %s:%s, successful",
|
||||
GST_DEBUG_PAD_NAME (srcpad), GST_DEBUG_PAD_NAME (sinkpad));
|
||||
|
||||
gst_pad_send_event (srcpad, gst_event_new_reconfigure ());
|
||||
if (!(flags & GST_PAD_LINK_CHECK_NO_RECONFIGURE))
|
||||
gst_pad_send_event (srcpad, gst_event_new_reconfigure ());
|
||||
|
||||
done:
|
||||
if (G_LIKELY (parent)) {
|
||||
|
|
|
@ -196,6 +196,8 @@ const gchar* gst_pad_link_get_name (GstPadLinkReturn ret);
|
|||
* would be unsafe e.g. if one pad has %GST_CAPS_ANY.
|
||||
* @GST_PAD_LINK_CHECK_CAPS: Check if the pads are compatible by comparing the
|
||||
* caps returned by gst_pad_query_caps().
|
||||
* @GST_PAD_LINK_CHECK_NO_RECONFIGURE: Disables pushing a reconfigure event when pads are
|
||||
* linked.
|
||||
* @GST_PAD_LINK_CHECK_DEFAULT: The default checks done when linking
|
||||
* pads (i.e. the ones used by gst_pad_link()).
|
||||
*
|
||||
|
@ -217,6 +219,11 @@ typedef enum {
|
|||
GST_PAD_LINK_CHECK_TEMPLATE_CAPS = 1 << 1,
|
||||
GST_PAD_LINK_CHECK_CAPS = 1 << 2,
|
||||
|
||||
|
||||
/* Not really checks, more like flags
|
||||
* Added here to avoid creating a new gst_pad_link_variant */
|
||||
GST_PAD_LINK_CHECK_NO_RECONFIGURE = 1 << 3,
|
||||
|
||||
GST_PAD_LINK_CHECK_DEFAULT = GST_PAD_LINK_CHECK_HIERARCHY | GST_PAD_LINK_CHECK_CAPS
|
||||
} GstPadLinkCheck;
|
||||
|
||||
|
|
Loading…
Reference in a new issue