(oclass->release_pad) (element, pad);
}
-
-/**
- * gst_element_set_name:
- * @element: a #GstElement to set the name of.
- * @name: the new name of the element.
- *
- * Sets the name of the element, getting rid of the old name if there was
- * one.
- */
-void
-gst_element_set_name (GstElement *element, const gchar *name)
-{
- g_return_if_fail (element != NULL);
- g_return_if_fail (GST_IS_ELEMENT (element));
-
- gst_object_set_name (GST_OBJECT (element), name);
-}
-
-/**
- * gst_element_get_name:
- * @element: a #GstElement to get the name of.
- *
- * Gets the name of the element.
- *
- * Returns: the name of the element.
- */
-const gchar*
-gst_element_get_name (GstElement *element)
-{
- g_return_val_if_fail (element != NULL, NULL);
- g_return_val_if_fail (GST_IS_ELEMENT (element), NULL);
-
- return GST_OBJECT_NAME (element);
-}
-
-/**
- * gst_element_set_parent:
- * @element: a #GstElement to set parent of.
- * @parent: the new #GstObject parent of the object.
- *
- * Sets the parent of the element.
- */
-void
-gst_element_set_parent (GstElement *element, GstObject *parent)
-{
- g_return_if_fail (element != NULL);
- g_return_if_fail (GST_IS_ELEMENT (element));
- g_return_if_fail (GST_OBJECT_PARENT (element) == NULL);
- g_return_if_fail (parent != NULL);
- g_return_if_fail (GST_IS_OBJECT (parent));
- g_return_if_fail ((gpointer)element != (gpointer)parent);
-
- gst_object_set_parent (GST_OBJECT (element), parent);
-}
-
-/**
- * gst_element_get_parent:
- * @element: a #GstElement to get the parent of.
- *
- * Gets the parent of the element.
- *
- * Returns: the #GstObject parent of the element.
- */
-GstObject*
-gst_element_get_parent (GstElement *element)
-{
- g_return_val_if_fail (element != NULL, NULL);
- g_return_val_if_fail (GST_IS_ELEMENT (element), NULL);
-
- return GST_OBJECT_PARENT (element);
-}
-
/**
* gst_element_requires_clock:
* @element: a #GstElement to query
void gst_element_set_loop_function (GstElement *element,
GstElementLoopFunction loop);
+#define gst_element_get_name(elem) gst_object_get_name(GST_OBJECT(elem))
+#define gst_element_set_name(element,name) gst_object_set_name(GST_OBJECT(elem),name)
+#define gst_element_get_parent(elem) gst_object_get_parent(GST_OBJECT(elem))
+#define gst_element_set_parent(element,parent) gst_object_set_parent(GST_OBJECT(elem),parent)
+
/* threadsafe versions of their g_object_* counterparts */
void gst_element_set (GstElement *element, const gchar *first_property_name, ...);
void gst_element_get (GstElement *element, const gchar *first_property_name, ...);
void gst_element_disable_threadsafe_properties (GstElement *element);
void gst_element_set_pending_properties (GstElement *element);
-void gst_element_set_name (GstElement *element, const gchar *name);
-const gchar* gst_element_get_name (GstElement *element);
-
-void gst_element_set_parent (GstElement *element, GstObject *parent);
-GstObject* gst_element_get_parent (GstElement *element);
-
/* clocking */
gboolean gst_element_requires_clock (GstElement *element);
gboolean gst_element_provides_clock (GstElement *element);