Commit e81fbd61 authored by Benjamin Otte's avatar Benjamin Otte

gst/gstpad.*: implement gst_pad_is_linked

Original commit message from CVS:
2004-01-15  Benjamin Otte  <in7y118@public.uni-hamburg.de>

* gst/gstpad.c: (gst_pad_is_linked):
* gst/gstpad.h:
implement gst_pad_is_linked
* gst/gstelement.h:
reserve space for initiate_state_change
parent 5e8a2fb8
2004-01-15 Benjamin Otte <in7y118@public.uni-hamburg.de>
* gst/gstpad.c: (gst_pad_is_linked):
* gst/gstpad.h:
implement gst_pad_is_linked
* gst/gstelement.h:
reserve space for initiate_state_change
2004-01-15 Benjamin Otte <in7y118@public.uni-hamburg.de>
* gst/autoplug/gstspideridentity.c:
......
......@@ -218,6 +218,7 @@ struct _GstElementClass {
GstFormat *format, gint64 *value);
/* change the element state */
GstElementStateReturn (*initiate_state_change)(GstElement *element, GstElementState state);
GstElementStateReturn (*change_state) (GstElement *element);
/* request/release pads */
......@@ -232,7 +233,7 @@ struct _GstElementClass {
GstIndex* (*get_index) (GstElement *element);
void (*set_index) (GstElement *element, GstIndex *index);
gpointer _gst_reserved[GST_PADDING];
gpointer _gst_reserved[GST_PADDING - 1];
};
void gst_element_class_add_pad_template (GstElementClass *klass, GstPadTemplate *templ);
......
......@@ -953,6 +953,22 @@ gst_pad_unlink (GstPad *srcpad,
gst_object_unref (GST_OBJECT (realsink));
}
/**
* gst_pad_is_linked:
* @pad: pad to check
*
* Checks if a given pad is linked to another pad or not.
*
* Returns: TRUE if the pad is linked.
*/
gboolean
gst_pad_is_linked (GstPad *pad)
{
g_return_val_if_fail (GST_IS_PAD (pad), FALSE);
return GST_PAD_PEER (pad) != NULL;
}
struct _GstPadLink {
GType type;
......
......@@ -400,6 +400,7 @@ void gst_pad_set_unlink_function (GstPad *pad, GstPadUnlinkFunction unlink);
gboolean gst_pad_link (GstPad *srcpad, GstPad *sinkpad);
gboolean gst_pad_link_filtered (GstPad *srcpad, GstPad *sinkpad, const GstCaps *filtercaps);
void gst_pad_unlink (GstPad *srcpad, GstPad *sinkpad);
gboolean gst_pad_is_linked (GstPad *pad);
GstPad* gst_pad_get_peer (GstPad *pad);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment