mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-05 06:58:49 +00:00
Fixed long standing mem-leak
Original commit message from CVS: * docs/gst/tmpl/gstplugin.sgml: * gst/gstelement.c: (gst_element_class_init), (gst_element_link_pads_filtered), (gst_element_save_thyself): * tools/gst-compprep.c: (main): * tools/gst-inspect.c: (print_element_properties_info): * tools/gst-xmlinspect.c: (print_element_properties): Fixed long standing mem-leak
This commit is contained in:
parent
0fa6095bc2
commit
14a1597707
7 changed files with 46 additions and 50 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2005-08-24 Stefan Kost <ensonic@users.sf.net>
|
||||
|
||||
* docs/gst/tmpl/gstplugin.sgml:
|
||||
* gst/gstelement.c: (gst_element_class_init),
|
||||
(gst_element_link_pads_filtered), (gst_element_save_thyself):
|
||||
* tools/gst-compprep.c: (main):
|
||||
* tools/gst-inspect.c: (print_element_properties_info):
|
||||
* tools/gst-xmlinspect.c: (print_element_properties):
|
||||
Fixed long standing mem-leak
|
||||
|
||||
2005-08-18 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||
|
||||
* docs/manual/basics-helloworld.xml:
|
||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
|||
Subproject commit 8ff526a316f9b576e727b8e32cba0a53cdec07a6
|
||||
Subproject commit aa2a757c587d91069a230d8e656481c3c364ccc6
|
|
@ -17,7 +17,7 @@ and will create a new #GstPlugin. It will then call the #GstPluginInitFunc funct
|
|||
that was provided in the plugin_desc.
|
||||
</para>
|
||||
<para>
|
||||
Once you have a handle to a #GstPlugin (e.g. from the #GstRegistryPool), you can
|
||||
Once you have a handle to a #GstPlugin (e.g. from the #GstRegistryPool ), you can
|
||||
add any object that subclasses #GstPluginFeature.
|
||||
</para>
|
||||
<para>
|
||||
|
|
|
@ -125,82 +125,82 @@ gst_element_class_init (GstElementClass * klass)
|
|||
parent_class = g_type_class_ref (GST_TYPE_OBJECT);
|
||||
|
||||
/**
|
||||
* GstElement::state-change:
|
||||
* GstElement::state-change:
|
||||
* @gstelement: the object which received the signal
|
||||
* @int:
|
||||
* @int:
|
||||
*
|
||||
* the #GstElementState of the element has been changed
|
||||
*/
|
||||
*
|
||||
* the #GstElementState of the element has been changed
|
||||
*/
|
||||
gst_element_signals[STATE_CHANGE] =
|
||||
g_signal_new ("state-change", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstElementClass, state_change), NULL,
|
||||
NULL, gst_marshal_VOID__INT_INT, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
|
||||
/**
|
||||
* GstElement::new-pad:
|
||||
* GstElement::new-pad:
|
||||
* @gstelement: the object which received the signal
|
||||
* @object:
|
||||
*
|
||||
* a new #GstPad has been added to the element
|
||||
*/
|
||||
*
|
||||
* a new #GstPad has been added to the element
|
||||
*/
|
||||
gst_element_signals[NEW_PAD] =
|
||||
g_signal_new ("new-pad", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstElementClass, new_pad), NULL, NULL,
|
||||
gst_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT);
|
||||
/**
|
||||
* GstElement::pad-removed:
|
||||
* GstElement::pad-removed:
|
||||
* @gstelement: the object which received the signal
|
||||
* @object:
|
||||
*
|
||||
* a #GstPad has been removed from the element
|
||||
*/
|
||||
*
|
||||
* a #GstPad has been removed from the element
|
||||
*/
|
||||
gst_element_signals[PAD_REMOVED] =
|
||||
g_signal_new ("pad-removed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstElementClass, pad_removed), NULL, NULL,
|
||||
gst_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT);
|
||||
/**
|
||||
* GstElement::error:
|
||||
* GstElement::error:
|
||||
* @gstelement: the object which received the signal
|
||||
* @element:
|
||||
* @error:
|
||||
* @message:
|
||||
*
|
||||
* a #GstError has occured during data processing
|
||||
*/
|
||||
*
|
||||
* a #GstError has occured during data processing
|
||||
*/
|
||||
gst_element_signals[ERROR] =
|
||||
g_signal_new ("error", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstElementClass, error), NULL, NULL,
|
||||
gst_marshal_VOID__OBJECT_BOXED_STRING, G_TYPE_NONE, 3, GST_TYPE_ELEMENT,
|
||||
GST_TYPE_G_ERROR, G_TYPE_STRING);
|
||||
/**
|
||||
* GstElement::eos:
|
||||
* GstElement::eos:
|
||||
* @gstelement: the object which received the signal
|
||||
*
|
||||
* the end of the stream has been reached
|
||||
*/
|
||||
*
|
||||
* the end of the stream has been reached
|
||||
*/
|
||||
gst_element_signals[EOS] =
|
||||
g_signal_new ("eos", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstElementClass, eos), NULL, NULL,
|
||||
gst_marshal_VOID__VOID, G_TYPE_NONE, 0);
|
||||
/**
|
||||
* GstElement::found-tag:
|
||||
* GstElement::found-tag:
|
||||
* @gstelement: the object which received the signal
|
||||
* @element:
|
||||
* @tags:
|
||||
*
|
||||
* tags for the incomming stream have been received
|
||||
*/
|
||||
*
|
||||
* tags for the incomming stream have been received
|
||||
*/
|
||||
gst_element_signals[FOUND_TAG] =
|
||||
g_signal_new ("found-tag", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstElementClass, found_tag), NULL, NULL,
|
||||
gst_marshal_VOID__OBJECT_BOXED, G_TYPE_NONE, 2, GST_TYPE_ELEMENT,
|
||||
GST_TYPE_TAG_LIST);
|
||||
/**
|
||||
* GstElement::no-more-pads:
|
||||
* GstElement::no-more-pads:
|
||||
* @gstelement: the object which received the signal
|
||||
*
|
||||
* ?
|
||||
*/
|
||||
*
|
||||
* ?
|
||||
*/
|
||||
gst_element_signals[NO_MORE_PADS] =
|
||||
g_signal_new ("no-more-pads", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstElementClass, no_more_pads), NULL,
|
||||
|
@ -1239,10 +1239,7 @@ gst_element_add_ghost_pad (GstElement * element, GstPad * pad,
|
|||
* @pad: the #GstPad to remove from the element.
|
||||
*
|
||||
* Removes @pad from @element. @pad will be destroyed if it has not been
|
||||
* referenced elsewhere. Normally, only elements remove pads. The only
|
||||
* exception to this are ghost pads which were created by the application
|
||||
* and request pads, which applications can remove using
|
||||
* gst_element_release_request_pad().
|
||||
* referenced elsewhere.
|
||||
*/
|
||||
void
|
||||
gst_element_remove_pad (GstElement * element, GstPad * pad)
|
||||
|
@ -1965,14 +1962,7 @@ gst_element_link_pads_filtered (GstElement * src, const gchar * srcpadname,
|
|||
GST_CAT_DEBUG (GST_CAT_ELEMENT_PADS, "linked pad %s:%s to pad %s:%s",
|
||||
GST_DEBUG_PAD_NAME (srcpad), GST_DEBUG_PAD_NAME (temp));
|
||||
return TRUE;
|
||||
} else {
|
||||
GST_CAT_DEBUG (GST_CAT_ELEMENT_PADS,
|
||||
"no temp %p or link failed", temp);
|
||||
}
|
||||
} else {
|
||||
GST_CAT_DEBUG (GST_CAT_ELEMENT_PADS,
|
||||
"invalid source pad dir=%d, peer=%p", GST_PAD_DIRECTION (srcpad),
|
||||
GST_PAD_PEER (srcpad));
|
||||
}
|
||||
/* find a better way for this mess */
|
||||
if (srcpads) {
|
||||
|
@ -2001,14 +1991,7 @@ gst_element_link_pads_filtered (GstElement * src, const gchar * srcpadname,
|
|||
GST_CAT_DEBUG (GST_CAT_ELEMENT_PADS, "linked pad %s:%s to pad %s:%s",
|
||||
GST_DEBUG_PAD_NAME (temp), GST_DEBUG_PAD_NAME (destpad));
|
||||
return TRUE;
|
||||
} else {
|
||||
GST_CAT_DEBUG (GST_CAT_ELEMENT_PADS,
|
||||
"no temp %p or link failed", temp);
|
||||
}
|
||||
} else {
|
||||
GST_CAT_DEBUG (GST_CAT_ELEMENT_PADS,
|
||||
"invalid destination pad dir=%d, peer=%p",
|
||||
GST_PAD_DIRECTION (destpad), GST_PAD_PEER (destpad));
|
||||
}
|
||||
if (destpads) {
|
||||
destpads = g_list_next (destpads);
|
||||
|
@ -2091,8 +2074,6 @@ gst_element_link_filtered (GstElement * src, GstElement * dest,
|
|||
* @...: the NULL-terminated list of elements to link in order.
|
||||
*
|
||||
* Chain together a series of elements. Uses gst_element_link().
|
||||
* Does not unlink partially linked elements in the case of an error
|
||||
* (use gst_element_link_many() ).
|
||||
*
|
||||
* Returns: TRUE on success, FALSE otherwise.
|
||||
*/
|
||||
|
@ -3223,6 +3204,8 @@ gst_element_save_thyself (GstObject * object, xmlNodePtr parent)
|
|||
}
|
||||
}
|
||||
|
||||
g_free (specs);
|
||||
|
||||
pads = GST_ELEMENT_PADS (element);
|
||||
|
||||
while (pads) {
|
||||
|
|
|
@ -137,6 +137,7 @@ main (int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
}
|
||||
g_free (property_specs);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -479,6 +479,7 @@ print_element_properties_info (GstElement * element)
|
|||
}
|
||||
if (num_properties == 0)
|
||||
n_print (" none\n");
|
||||
g_free (property_specs);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -346,6 +346,7 @@ print_element_properties (GstElement * element, gint pfx)
|
|||
PUT_END_TAG (pfx + 1, "element-property");
|
||||
}
|
||||
PUT_END_TAG (pfx, "element-properties");
|
||||
g_free (property_specs);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue