mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
fix bug when requesting pads by name
Original commit message from CVS: * fix bug when requesting pads by name * added api: gst_element_get_managing_bin ()
This commit is contained in:
parent
fbe0d0ba6b
commit
660621ca99
2 changed files with 18 additions and 1 deletions
|
@ -735,7 +735,7 @@ gst_element_request_pad_by_name (GstElement *element, const gchar *name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (templ == NULL)
|
if (!templ_found)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
pad = gst_element_request_pad (element, templ, req_name);
|
pad = gst_element_request_pad (element, templ, req_name);
|
||||||
|
@ -1908,3 +1908,18 @@ gst_element_install_std_props (GstElementClass * klass, const char *first_name,
|
||||||
|
|
||||||
va_end (args);
|
va_end (args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GstBin*
|
||||||
|
gst_element_get_managing_bin (GstElement *element)
|
||||||
|
{
|
||||||
|
GstBin *bin;
|
||||||
|
|
||||||
|
g_return_val_if_fail (element != NULL, NULL);
|
||||||
|
|
||||||
|
bin = GST_BIN (gst_object_get_parent (GST_OBJECT_CAST (element)));
|
||||||
|
|
||||||
|
while (bin && !GST_FLAG_IS_SET (GST_OBJECT_CAST (bin), GST_BIN_FLAG_MANAGER))
|
||||||
|
bin = GST_BIN (gst_object_get_parent (GST_OBJECT_CAST (bin)));
|
||||||
|
|
||||||
|
return bin;
|
||||||
|
}
|
||||||
|
|
|
@ -246,6 +246,8 @@ GstElementFactory* gst_element_get_factory (GstElement *element);
|
||||||
void gst_element_install_std_props (GstElementClass *klass,
|
void gst_element_install_std_props (GstElementClass *klass,
|
||||||
const char *first_name, ...);
|
const char *first_name, ...);
|
||||||
|
|
||||||
|
GstBin* gst_element_get_managing_bin (GstElement *element);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue