mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
gst/gstelement.*: Deprecated gst_element_get_pad() as it can't be used sanely. It's not clear of the reference to the...
Original commit message from CVS: * gst/gstelement.c: * gst/gstelement.h: Deprecated gst_element_get_pad() as it can't be used sanely. It's not clear of the reference to the resulting pad must be released later or not, resulting in possible leaks. Fixes bug #533865.
This commit is contained in:
parent
dc902554fa
commit
3edb63d2ed
3 changed files with 15 additions and 2 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2008-05-29 Sebastian Dröge <slomo@circular-chaos.org>
|
||||||
|
|
||||||
|
* gst/gstelement.c:
|
||||||
|
* gst/gstelement.h:
|
||||||
|
Deprecated gst_element_get_pad() as it can't be used sanely. It's not
|
||||||
|
clear of the reference to the resulting pad must be released later
|
||||||
|
or not, resulting in possible leaks. Fixes bug #533865.
|
||||||
|
|
||||||
2008-05-28 Wim Taymans <wim.taymans@collabora.co.uk>
|
2008-05-28 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||||
|
|
||||||
Patch by: José Alburquerque <jaalburqu at svn dot gnome dot org>
|
Patch by: José Alburquerque <jaalburqu at svn dot gnome dot org>
|
||||||
|
|
|
@ -1003,13 +1003,15 @@ gst_element_get_request_pad (GstElement * element, const gchar * name)
|
||||||
* Retrieves a pad from @element by name. Tries gst_element_get_static_pad()
|
* Retrieves a pad from @element by name. Tries gst_element_get_static_pad()
|
||||||
* first, then gst_element_get_request_pad().
|
* first, then gst_element_get_request_pad().
|
||||||
*
|
*
|
||||||
* <note>Usage of this function is not recommended as it is unclear if the reference
|
* Deprecated: This function is deprecated as it's unclear if the reference
|
||||||
* to the result pad should be released with gst_object_unref() in case of a static pad
|
* to the result pad should be released with gst_object_unref() in case of a static pad
|
||||||
* or gst_element_release_request_pad() in case of a request pad.</note>
|
* or gst_element_release_request_pad() in case of a request pad.
|
||||||
|
* Use gst_element_get_static_pad() or gst_element_get_request_pad() instead.
|
||||||
*
|
*
|
||||||
* Returns: the #GstPad if found, otherwise %NULL. Unref or Release after usage,
|
* Returns: the #GstPad if found, otherwise %NULL. Unref or Release after usage,
|
||||||
* depending on the type of the pad.
|
* depending on the type of the pad.
|
||||||
*/
|
*/
|
||||||
|
#ifndef GST_REMOVE_DEPRECATED
|
||||||
GstPad *
|
GstPad *
|
||||||
gst_element_get_pad (GstElement * element, const gchar * name)
|
gst_element_get_pad (GstElement * element, const gchar * name)
|
||||||
{
|
{
|
||||||
|
@ -1024,6 +1026,7 @@ gst_element_get_pad (GstElement * element, const gchar * name)
|
||||||
|
|
||||||
return pad;
|
return pad;
|
||||||
}
|
}
|
||||||
|
#endif /* GST_REMOVE_DEPRECATED */
|
||||||
|
|
||||||
static GstIteratorItem
|
static GstIteratorItem
|
||||||
iterate_pad (GstIterator * it, GstPad * pad)
|
iterate_pad (GstIterator * it, GstPad * pad)
|
||||||
|
|
|
@ -601,7 +601,9 @@ gboolean gst_element_add_pad (GstElement *element, GstPad *pad);
|
||||||
gboolean gst_element_remove_pad (GstElement *element, GstPad *pad);
|
gboolean gst_element_remove_pad (GstElement *element, GstPad *pad);
|
||||||
void gst_element_no_more_pads (GstElement *element);
|
void gst_element_no_more_pads (GstElement *element);
|
||||||
|
|
||||||
|
#ifndef GST_DISABLE_DEPRECATED
|
||||||
GstPad* gst_element_get_pad (GstElement *element, const gchar *name);
|
GstPad* gst_element_get_pad (GstElement *element, const gchar *name);
|
||||||
|
#endif /* GST_DISABLE_DEPRECATED */
|
||||||
GstPad* gst_element_get_static_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);
|
GstPad* gst_element_get_request_pad (GstElement *element, const gchar *name);
|
||||||
void gst_element_release_request_pad (GstElement *element, GstPad *pad);
|
void gst_element_release_request_pad (GstElement *element, GstPad *pad);
|
||||||
|
|
Loading…
Reference in a new issue