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:
(gst_spider_identity_sink_loop_type_finding):
break infinite loop by just returning instead of looping
GstFormat *format, gint64 *value);
/* change the element state */
+ GstElementStateReturn (*initiate_state_change)(GstElement *element, GstElementState state);
GstElementStateReturn (*change_state) (GstElement *element);
/* request/release pads */
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);
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;
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);