mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 18:50:48 +00:00
gst/gstelement.c: Make gst_element_get_request_pad() create request pads only for request pad templates and not for, ...
Original commit message from CVS: * gst/gstelement.c: (gst_element_get_request_pad), (gst_element_class_get_request_pad_template): Make gst_element_get_request_pad() create request pads only for request pad templates and not for, say, sometimes pad templates.
This commit is contained in:
parent
df19b21c56
commit
799bc90b1f
2 changed files with 26 additions and 2 deletions
|
@ -1,10 +1,17 @@
|
|||
2007-03-28 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* gst/gstelement.c: (gst_element_get_request_pad),
|
||||
(gst_element_class_get_request_pad_template):
|
||||
Make gst_element_get_request_pad() create request pads only for
|
||||
request pad templates and not for, say, sometimes pad templates.
|
||||
|
||||
2007-03-28 Stefan Kost <ensonic@users.sf.net>
|
||||
|
||||
* docs/design/draft-klass.txt:
|
||||
Add example that needs more thinking.
|
||||
|
||||
* docs/design/draft-missing-plugins.txt:
|
||||
More thoughts about wtrapper plugins.
|
||||
More thoughts about wrapper plugins.
|
||||
|
||||
* docs/random/ensonic/embedded.txt:
|
||||
* docs/random/ensonic/profiling.txt:
|
||||
|
|
|
@ -132,6 +132,10 @@ static gboolean gst_element_default_send_event (GstElement * element,
|
|||
static gboolean gst_element_default_query (GstElement * element,
|
||||
GstQuery * query);
|
||||
|
||||
static GstPadTemplate
|
||||
* gst_element_class_get_request_pad_template (GstElementClass *
|
||||
element_class, const gchar * name);
|
||||
|
||||
#ifndef GST_DISABLE_LOADSAVE
|
||||
static xmlNodePtr gst_element_save_thyself (GstObject * object,
|
||||
xmlNodePtr parent);
|
||||
|
@ -922,7 +926,7 @@ gst_element_get_request_pad (GstElement * element, const gchar * name)
|
|||
class = GST_ELEMENT_GET_CLASS (element);
|
||||
|
||||
if (strstr (name, "%")) {
|
||||
templ = gst_element_class_get_pad_template (class, name);
|
||||
templ = gst_element_class_get_request_pad_template (class, name);
|
||||
req_name = NULL;
|
||||
if (templ)
|
||||
templ_found = TRUE;
|
||||
|
@ -1180,6 +1184,19 @@ gst_element_class_get_pad_template (GstElementClass * element_class,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static GstPadTemplate *
|
||||
gst_element_class_get_request_pad_template (GstElementClass * element_class,
|
||||
const gchar * name)
|
||||
{
|
||||
GstPadTemplate *tmpl;
|
||||
|
||||
tmpl = gst_element_class_get_pad_template (element_class, name);
|
||||
if (tmpl != NULL && tmpl->presence == GST_PAD_REQUEST)
|
||||
return tmpl;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* get a random pad on element of the given direction.
|
||||
* The pad is random in a sense that it is the first pad that is (optionaly) linked.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue