mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +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;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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,
|
||||
const char *first_name, ...);
|
||||
|
||||
GstBin* gst_element_get_managing_bin (GstElement *element);
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue