mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
API: add gst_bin_find_unlinked_pad()
Original commit message from CVS: * docs/gst/gstreamer-sections.txt: * gst/gstutils.c: (element_find_unlinked_pad), (gst_bin_find_unlinked_pad), (gst_bin_find_unconnected_pad), * gst/gstutils.h: API: add gst_bin_find_unlinked_pad() API: deprecate gst_bin_find_unconnected_pad() (#401456)
This commit is contained in:
parent
ef258c2290
commit
b05a18fcfc
4 changed files with 43 additions and 5 deletions
|
@ -1,3 +1,12 @@
|
|||
2008-05-27 Tim-Philipp Müller <tim.muller at collabora co uk>
|
||||
|
||||
* docs/gst/gstreamer-sections.txt:
|
||||
* gst/gstutils.c: (element_find_unlinked_pad),
|
||||
(gst_bin_find_unlinked_pad), (gst_bin_find_unconnected_pad),
|
||||
* gst/gstutils.h:
|
||||
API: add gst_bin_find_unlinked_pad()
|
||||
API: deprecate gst_bin_find_unconnected_pad() (#401456)
|
||||
|
||||
2008-05-26 Peter Kjellerstedt <pkj@axis.com>
|
||||
|
||||
* gst/gstclock.c:
|
||||
|
|
|
@ -59,6 +59,7 @@ gst_bin_iterate_all_by_interface
|
|||
<SUBSECTION>
|
||||
gst_bin_add_many
|
||||
gst_bin_remove_many
|
||||
gst_bin_find_unlinked_pad
|
||||
gst_bin_find_unconnected_pad
|
||||
|
||||
<SUBSECTION>
|
||||
|
|
|
@ -3260,7 +3260,7 @@ element_find_unlinked_pad (GstElement * element, GstPadDirection direction)
|
|||
}
|
||||
|
||||
/**
|
||||
* gst_bin_find_unconnected_pad:
|
||||
* gst_bin_find_unlinked_pad:
|
||||
* @bin: bin in which to look for elements with unlinked pads
|
||||
* @direction: whether to look for an unlinked source or sink pad
|
||||
*
|
||||
|
@ -3272,10 +3272,10 @@ element_find_unlinked_pad (GstElement * element, GstPadDirection direction)
|
|||
*
|
||||
* Returns: unlinked pad of the given direction, or NULL.
|
||||
*
|
||||
* Since: 0.10.3
|
||||
* Since: 0.10.20
|
||||
*/
|
||||
GstPad *
|
||||
gst_bin_find_unconnected_pad (GstBin * bin, GstPadDirection direction)
|
||||
gst_bin_find_unlinked_pad (GstBin * bin, GstPadDirection direction)
|
||||
{
|
||||
GstIterator *iter;
|
||||
gboolean done;
|
||||
|
@ -3313,6 +3313,31 @@ gst_bin_find_unconnected_pad (GstBin * bin, GstPadDirection direction)
|
|||
return pad;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_bin_find_unconnected_pad:
|
||||
* @bin: bin in which to look for elements with unlinked pads
|
||||
* @direction: whether to look for an unlinked source or sink pad
|
||||
*
|
||||
* Recursively looks for elements with an unlinked pad of the given
|
||||
* direction within the specified bin and returns an unlinked pad
|
||||
* if one is found, or NULL otherwise. If a pad is found, the caller
|
||||
* owns a reference to it and should use gst_object_unref() on the
|
||||
* pad when it is not needed any longer.
|
||||
*
|
||||
* Returns: unlinked pad of the given direction, or NULL.
|
||||
*
|
||||
* Since: 0.10.3
|
||||
*
|
||||
* Deprecated: use gst_bin_find_unlinked_pad() instead.
|
||||
*/
|
||||
#ifndef GST_REMOVE_DEPRECATED
|
||||
GstPad *
|
||||
gst_bin_find_unconnected_pad (GstBin * bin, GstPadDirection direction)
|
||||
{
|
||||
return gst_bin_find_unlinked_pad (bin, direction);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* gst_parse_bin_from_description:
|
||||
* @bin_description: command line describing the bin
|
||||
|
@ -3393,11 +3418,11 @@ gst_parse_bin_from_description_full (const gchar * bin_description,
|
|||
|
||||
/* find pads and ghost them if necessary */
|
||||
if (ghost_unlinked_pads) {
|
||||
if ((pad = gst_bin_find_unconnected_pad (bin, GST_PAD_SRC))) {
|
||||
if ((pad = gst_bin_find_unlinked_pad (bin, GST_PAD_SRC))) {
|
||||
gst_element_add_pad (GST_ELEMENT (bin), gst_ghost_pad_new ("src", pad));
|
||||
gst_object_unref (pad);
|
||||
}
|
||||
if ((pad = gst_bin_find_unconnected_pad (bin, GST_PAD_SINK))) {
|
||||
if ((pad = gst_bin_find_unlinked_pad (bin, GST_PAD_SINK))) {
|
||||
gst_element_add_pad (GST_ELEMENT (bin), gst_ghost_pad_new ("sink", pad));
|
||||
gst_object_unref (pad);
|
||||
}
|
||||
|
|
|
@ -667,7 +667,10 @@ gboolean gst_pad_query_peer_convert (GstPad *pad, GstFormat
|
|||
/* bin functions */
|
||||
void gst_bin_add_many (GstBin *bin, GstElement *element_1, ...) G_GNUC_NULL_TERMINATED;
|
||||
void gst_bin_remove_many (GstBin *bin, GstElement *element_1, ...) G_GNUC_NULL_TERMINATED;
|
||||
GstPad * gst_bin_find_unlinked_pad (GstBin *bin, GstPadDirection direction);
|
||||
#ifndef GST_DISABLE_DEPRECATED
|
||||
GstPad * gst_bin_find_unconnected_pad (GstBin *bin, GstPadDirection direction);
|
||||
#endif
|
||||
|
||||
/* buffer functions */
|
||||
GstBuffer * gst_buffer_merge (GstBuffer * buf1, GstBuffer * buf2);
|
||||
|
|
Loading…
Reference in a new issue