Commit 7000e885 authored by Wim Taymans's avatar Wim Taymans

Added method for releasing request pads.

Original commit message from CVS:
Added method for releasing request pads.
Fix state changes.
parent 1b968677
......@@ -205,6 +205,19 @@ gst_element_request_pad (GstElement *element, GstPadTemplate *templ, const gchar
return newpad;
}
void
gst_element_release_request_pad (GstElement *element, GstPad *pad)
{
GstElementClass *oclass;
g_return_if_fail (GST_IS_ELEMENT (element));
g_return_if_fail (GST_IS_PAD (pad));
oclass = CLASS (element);
if (oclass->release_pad)
(oclass->release_pad) (element, pad);
}
/**
* gst_element_set_name:
......@@ -1329,10 +1342,10 @@ gst_element_set_state (GstElement *element, GstElementState state)
switch (return_val) {
case GST_STATE_FAILURE:
GST_DEBUG_ELEMENT (GST_CAT_STATES, element, "have failed change_state return");
break;
goto exit;
case GST_STATE_ASYNC:
GST_DEBUG_ELEMENT (GST_CAT_STATES, element, "element will change state async");
break;
goto exit;
case GST_STATE_SUCCESS:
/* Last thing we do is verify that a successful state change really
* did change the state... */
......@@ -1350,6 +1363,7 @@ gst_element_set_state (GstElement *element, GstElementState state)
g_assert_not_reached ();
}
}
exit:
return return_val;
}
......
......@@ -170,6 +170,7 @@ struct _GstElementClass {
GstElementStateReturn (*change_state) (GstElement *element);
/* request a new pad */
GstPad* (*request_new_pad) (GstElement *element, GstPadTemplate *templ, const gchar* name);
void (*release_pad) (GstElement *element, GstPad *pad);
};
void gst_element_class_add_pad_template (GstElementClass *klass, GstPadTemplate *templ);
......@@ -203,6 +204,7 @@ void gst_element_remove_ghost_pad (GstElement *element, GstPad *pad);
GstPad* gst_element_get_pad (GstElement *element, const gchar *name);
GstPad* gst_element_get_static_pad (GstElement *element, const gchar *name);
GstPad* gst_element_get_request_pad (GstElement *element, const gchar *name);
void gst_element_release_request_pad (GstElement *element, GstPad *pad);
GList* gst_element_get_pad_list (GstElement *element);
GstPad* gst_element_get_compatible_pad (GstElement *element, 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