mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
utils: Add gst_pad_link_maybe_ghosting() for consistency
We already had a _full() version, but having that alone seems inconsistent. Add a non-full version that mirrors the behaviour of gst_pad_link() vs gst_pad_link_full().
This commit is contained in:
parent
ea395c2498
commit
1dbb27f3a7
4 changed files with 31 additions and 0 deletions
|
@ -1831,6 +1831,7 @@ gst_pad_get_pad_template
|
|||
|
||||
gst_pad_link
|
||||
gst_pad_link_full
|
||||
gst_pad_link_maybe_ghosting
|
||||
gst_pad_link_maybe_ghosting_full
|
||||
gst_pad_unlink
|
||||
gst_pad_is_linked
|
||||
|
|
|
@ -1552,6 +1552,33 @@ gst_pad_link_maybe_ghosting_full (GstPad * src, GstPad * sink,
|
|||
return pad_link_maybe_ghosting (src, sink, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_pad_link_maybe_ghosting:
|
||||
* @src: a #GstPad
|
||||
* @sink: a #GstPad
|
||||
*
|
||||
* Links @src to @sink, creating any #GstGhostPad's in between as necessary.
|
||||
*
|
||||
* This is a convenience function to save having to create and add intermediate
|
||||
* #GstGhostPad's as required for linking across #GstBin boundaries.
|
||||
*
|
||||
* If @src or @sink pads don't have parent elements or do not share a common
|
||||
* ancestor, the link will fail.
|
||||
*
|
||||
* Returns: whether the link succeeded.
|
||||
*
|
||||
* Since: 1.10
|
||||
*/
|
||||
gboolean
|
||||
gst_pad_link_maybe_ghosting (GstPad * src, GstPad * sink)
|
||||
{
|
||||
g_return_val_if_fail (GST_IS_PAD (src), FALSE);
|
||||
g_return_val_if_fail (GST_IS_PAD (sink), FALSE);
|
||||
|
||||
return gst_pad_link_maybe_ghosting_full (src, sink,
|
||||
GST_PAD_LINK_CHECK_DEFAULT);
|
||||
}
|
||||
|
||||
static void
|
||||
release_and_unref_pad (GstElement * element, GstPad * pad, gboolean requestpad)
|
||||
{
|
||||
|
|
|
@ -924,6 +924,8 @@ gboolean gst_pad_query_convert (GstPad *pad, GstFormat
|
|||
GstCaps * gst_pad_query_caps (GstPad *pad, GstCaps *filter);
|
||||
gboolean gst_pad_query_accept_caps (GstPad *pad, GstCaps *caps);
|
||||
|
||||
gboolean gst_pad_link_maybe_ghosting (GstPad *src,
|
||||
GstPad *sink);
|
||||
gboolean gst_pad_link_maybe_ghosting_full (GstPad *src,
|
||||
GstPad *sink,
|
||||
GstPadLinkCheck flags);
|
||||
|
|
|
@ -863,6 +863,7 @@ EXPORTS
|
|||
gst_pad_link_check_get_type
|
||||
gst_pad_link_full
|
||||
gst_pad_link_get_name
|
||||
gst_pad_link_maybe_ghosting
|
||||
gst_pad_link_maybe_ghosting_full
|
||||
gst_pad_link_return_get_type
|
||||
gst_pad_mark_reconfigure
|
||||
|
|
Loading…
Reference in a new issue