From 6cb527fed3ea02d1af22da75777cecbb152f21fc Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 15 Apr 2003 18:43:57 +0000 Subject: [PATCH] API change: remove gst_object_destroy and #defines to it Original commit message from CVS: API change: remove gst_object_destroy and #defines to it --- gst/gstbin.h | 1 - gst/gstelement.h | 1 - gst/gstobject.c | 24 ------------------------ gst/gstobject.h | 1 - gst/gstpad.h | 1 - gst/gstpipeline.h | 1 - gst/gstscheduler.h | 2 -- 7 files changed, 31 deletions(-) diff --git a/gst/gstbin.h b/gst/gstbin.h index 0288b7132a..87a97406a5 100644 --- a/gst/gstbin.h +++ b/gst/gstbin.h @@ -104,7 +104,6 @@ struct _GstBinClass { GType gst_bin_get_type (void); GstElement* gst_bin_new (const gchar *name); -#define gst_bin_destroy(bin) gst_object_destroy(GST_OBJECT(bin)) /* add and remove elements from the bin */ void gst_bin_add (GstBin *bin, GstElement *element); diff --git a/gst/gstelement.h b/gst/gstelement.h index ccefba251c..c51822f207 100644 --- a/gst/gstelement.h +++ b/gst/gstelement.h @@ -228,7 +228,6 @@ void gst_element_class_install_std_props (GstElementClass *kl void gst_element_default_error (GObject *object, GstObject *orig, gchar *error); GType gst_element_get_type (void); -#define gst_element_destroy(element) gst_object_destroy (GST_OBJECT (element)) void gst_element_set_loop_function (GstElement *element, GstElementLoopFunction loop); diff --git a/gst/gstobject.c b/gst/gstobject.c index ac3bab8832..f5d0973ae5 100644 --- a/gst/gstobject.c +++ b/gst/gstobject.c @@ -256,30 +256,6 @@ gst_object_replace (GstObject **oldobj, GstObject *newobj) } } -/** - * gst_object_destroy: - * @object: GstObject to destroy - * - * Destroy the object. - * - */ -void -gst_object_destroy (GstObject *object) -{ - g_return_if_fail (object != NULL); - g_return_if_fail (GST_IS_OBJECT (object)); - - GST_DEBUG (GST_CAT_REFCOUNTING, "destroy %p '%s'", object, GST_OBJECT_NAME (object)); - - if (!GST_OBJECT_DESTROYED (object)) - { - /* need to hold a reference count around all class method - * invocations. - */ - g_object_run_dispose (G_OBJECT (object)); - } -} - static void gst_object_dispose (GObject *object) { diff --git a/gst/gstobject.h b/gst/gstobject.h index f66994f800..9e99346997 100644 --- a/gst/gstobject.h +++ b/gst/gstobject.h @@ -147,7 +147,6 @@ void gst_object_restore_thyself (GstObject *object, xmlNodePtr self); GstObject * gst_object_ref (GstObject *object); void gst_object_unref (GstObject *object); void gst_object_sink (GstObject *object); -void gst_object_destroy (GstObject *object); /* replace object pointer */ void gst_object_replace (GstObject **oldobj, GstObject *newobj); diff --git a/gst/gstpad.h b/gst/gstpad.h index df2b749aaa..307597ec1e 100644 --- a/gst/gstpad.h +++ b/gst/gstpad.h @@ -383,7 +383,6 @@ GType gst_ghost_pad_get_type (void); /* creating pads */ GstPad* gst_pad_new (const gchar *name, GstPadDirection direction); -#define gst_pad_destroy(pad) gst_object_destroy (GST_OBJECT (pad)) GstPad* gst_pad_new_from_template (GstPadTemplate *templ, const gchar *name); GstPad* gst_pad_custom_new (GType type, const gchar *name, GstPadDirection direction); GstPad* gst_pad_custom_new_from_template (GType type, GstPadTemplate *templ, const gchar *name); diff --git a/gst/gstpipeline.h b/gst/gstpipeline.h index 31c6f9cf74..986cee12f3 100644 --- a/gst/gstpipeline.h +++ b/gst/gstpipeline.h @@ -54,7 +54,6 @@ struct _GstPipelineClass { GType gst_pipeline_get_type (void); GstElement* gst_pipeline_new (const gchar *name); -#define gst_pipeline_destroy(pipeline) gst_object_destroy(GST_OBJECT(pipeline)) G_END_DECLS diff --git a/gst/gstscheduler.h b/gst/gstscheduler.h index 792e9b2569..7ab80accef 100644 --- a/gst/gstscheduler.h +++ b/gst/gstscheduler.h @@ -110,8 +110,6 @@ struct _GstSchedulerClass { GType gst_scheduler_get_type (void); -#define gst_scheduler_destroy(sched) gst_object_destroy(GST_OBJECT(sched)) - void gst_scheduler_setup (GstScheduler *sched); void gst_scheduler_reset (GstScheduler *sched);