Remove GST_DEBUG_FUNCPTR where they're pointless

There's not much point in using GST_DEBUG_FUNCPTR with GObject
virtual functions such as get_property, set_propery, finalize and
dispose, since they'll never be used by anyone anyway. Saves a
few bytes and possibly a tenth of a polar bear.
This commit is contained in:
Tim-Philipp Müller 2009-10-28 00:29:30 +00:00
parent ff7d9470b7
commit daecaf0e8a
31 changed files with 71 additions and 80 deletions

View file

@ -390,8 +390,8 @@ gst_bin_class_init (GstBinClass * klass)
g_type_class_add_private (klass, sizeof (GstBinPrivate));
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_bin_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_bin_get_property);
gobject_class->set_property = gst_bin_set_property;
gobject_class->get_property = gst_bin_get_property;
/**
* GstBin:async-handling
@ -453,7 +453,7 @@ gst_bin_class_init (GstBinClass * klass)
_gst_boolean_accumulator, NULL, gst_marshal_BOOLEAN__VOID,
G_TYPE_BOOLEAN, 0, G_TYPE_NONE);
gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_bin_dispose);
gobject_class->dispose = gst_bin_dispose;
#ifndef GST_DISABLE_LOADSAVE
gstobject_class->save_thyself = GST_DEBUG_FUNCPTR (gst_bin_save_thyself);

View file

@ -141,7 +141,7 @@ gst_bus_class_init (GstBusClass * klass)
parent_class = g_type_class_peek_parent (klass);
gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_bus_dispose);
gobject_class->dispose = gst_bus_dispose;
/**
* GstBus::sync-message:

View file

@ -572,10 +572,10 @@ gst_clock_class_init (GstClockClass * klass)
gst_alloc_trace_register (GST_CLOCK_ENTRY_TRACE_NAME);
#endif
gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_clock_dispose);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_clock_finalize);
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_clock_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_clock_get_property);
gobject_class->dispose = gst_clock_dispose;
gobject_class->finalize = gst_clock_finalize;
gobject_class->set_property = gst_clock_set_property;
gobject_class->get_property = gst_clock_get_property;
g_object_class_install_property (gobject_class, PROP_STATS,
g_param_spec_boolean ("stats", "Stats",

View file

@ -223,8 +223,8 @@ gst_element_class_init (GstElementClass * klass)
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstElementClass, no_more_pads), NULL,
NULL, gst_marshal_VOID__VOID, G_TYPE_NONE, 0);
gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_element_dispose);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_element_finalize);
gobject_class->dispose = gst_element_dispose;
gobject_class->finalize = gst_element_finalize;
#ifndef GST_DISABLE_LOADSAVE
gstobject_class->save_thyself = GST_DEBUG_FUNCPTR (gst_element_save_thyself);

View file

@ -99,7 +99,7 @@ gst_element_factory_class_init (GstElementFactoryClass * klass)
parent_class = g_type_class_peek_parent (klass);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_element_factory_finalize);
gobject_class->finalize = gst_element_factory_finalize;
}
static void

View file

@ -93,8 +93,8 @@ gst_proxy_pad_class_init (GstProxyPadClass * klass)
g_type_class_add_private (klass, sizeof (GstProxyPadPrivate));
gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_proxy_pad_dispose);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_proxy_pad_finalize);
gobject_class->dispose = gst_proxy_pad_dispose;
gobject_class->finalize = gst_proxy_pad_finalize;
#ifndef GST_DISABLE_LOADSAVE
{
@ -528,7 +528,7 @@ gst_ghost_pad_class_init (GstGhostPadClass * klass)
g_type_class_add_private (klass, sizeof (GstGhostPadPrivate));
gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_ghost_pad_dispose);
gobject_class->dispose = gst_ghost_pad_dispose;
}
/* see gstghostpad design docs */

View file

@ -151,9 +151,9 @@ gst_index_class_init (GstIndexClass * klass)
G_STRUCT_OFFSET (GstIndexClass, entry_added), NULL, NULL,
gst_marshal_VOID__BOXED, G_TYPE_NONE, 1, GST_TYPE_INDEX_ENTRY);
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_index_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_index_get_property);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_index_finalize);
gobject_class->set_property = gst_index_set_property;
gobject_class->get_property = gst_index_get_property;
gobject_class->finalize = gst_index_finalize;
g_object_class_install_property (gobject_class, ARG_RESOLVER,
g_param_spec_enum ("resolver", "Resolver",

View file

@ -52,7 +52,7 @@ gst_index_factory_class_init (GstIndexFactoryClass * klass)
factory_parent_class = g_type_class_peek_parent (klass);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_index_factory_finalize);
gobject_class->finalize = gst_index_factory_finalize;
}
static void

View file

@ -173,8 +173,8 @@ gst_object_class_init (GstObjectClass * klass)
_gst_object_trace = gst_alloc_trace_register (g_type_name (GST_TYPE_OBJECT));
#endif
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_object_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_object_get_property);
gobject_class->set_property = gst_object_set_property;
gobject_class->get_property = gst_object_get_property;
g_object_class_install_property (gobject_class, ARG_NAME,
g_param_spec_string ("name", "Name", "The name of the object",

View file

@ -251,10 +251,10 @@ gst_pad_class_init (GstPadClass * klass)
parent_class = g_type_class_peek_parent (klass);
gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_pad_dispose);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_pad_finalize);
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_pad_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_pad_get_property);
gobject_class->dispose = gst_pad_dispose;
gobject_class->finalize = gst_pad_finalize;
gobject_class->set_property = gst_pad_set_property;
gobject_class->get_property = gst_pad_get_property;
/**
* GstPad::linked:

View file

@ -172,8 +172,8 @@ gst_pipeline_class_init (GstPipelineClass * klass)
g_type_class_add_private (klass, sizeof (GstPipelinePrivate));
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_pipeline_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_pipeline_get_property);
gobject_class->set_property = gst_pipeline_set_property;
gobject_class->get_property = gst_pipeline_get_property;
/**
* GstPipeline:delay
@ -205,7 +205,7 @@ gst_pipeline_class_init (GstPipelineClass * klass)
"from READY into NULL state", DEFAULT_AUTO_FLUSH_BUS,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_pipeline_dispose);
gobject_class->dispose = gst_pipeline_dispose;
gstelement_class->change_state =
GST_DEBUG_FUNCPTR (gst_pipeline_change_state);

View file

@ -147,7 +147,7 @@ gst_plugin_finalize (GObject * object)
static void
gst_plugin_class_init (GstPluginClass * klass)
{
G_OBJECT_CLASS (klass)->finalize = GST_DEBUG_FUNCPTR (gst_plugin_finalize);
G_OBJECT_CLASS (klass)->finalize = gst_plugin_finalize;
g_type_class_add_private (klass, sizeof (GstPluginPrivate));
}

View file

@ -52,8 +52,7 @@ gst_plugin_feature_class_init (GstPluginFeatureClass * klass)
{
parent_class = g_type_class_peek_parent (klass);
G_OBJECT_CLASS (klass)->finalize =
GST_DEBUG_FUNCPTR (gst_plugin_feature_finalize);
G_OBJECT_CLASS (klass)->finalize = gst_plugin_feature_finalize;
}
static void

View file

@ -212,7 +212,7 @@ gst_registry_class_init (GstRegistryClass * klass)
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRegistryClass, feature_added),
NULL, NULL, gst_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_registry_finalize);
gobject_class->finalize = gst_registry_finalize;
}
static void

View file

@ -125,7 +125,7 @@ gst_task_class_init (GstTaskClass * klass)
g_type_class_add_private (klass, sizeof (GstTaskPrivate));
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_task_finalize);
gobject_class->finalize = gst_task_finalize;
init_klass_pool (klass);
}

View file

@ -128,7 +128,7 @@ gst_task_pool_class_init (GstTaskPoolClass * klass)
gobject_class = (GObjectClass *) klass;
gsttaskpool_class = (GstTaskPoolClass *) klass;
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_task_pool_finalize);
gobject_class->finalize = gst_task_pool_finalize;
gsttaskpool_class->prepare = default_prepare;
gsttaskpool_class->cleanup = default_cleanup;

View file

@ -66,7 +66,7 @@ gst_xml_class_init (GstXMLClass * klass)
parent_class = g_type_class_peek_parent (klass);
gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_xml_dispose);
gobject_class->dispose = gst_xml_dispose;
/* FIXME G_TYPE_POINTER should be GType of xmlNodePtr
* (ensonic) can't be fixed, as libxml does not use GObject (unfortunately)

View file

@ -386,9 +386,9 @@ gst_base_sink_class_init (GstBaseSinkClass * klass)
parent_class = g_type_class_peek_parent (klass);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_base_sink_finalize);
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_base_sink_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_base_sink_get_property);
gobject_class->finalize = gst_base_sink_finalize;
gobject_class->set_property = gst_base_sink_set_property;
gobject_class->get_property = gst_base_sink_get_property;
/* FIXME, this next value should be configured using an event from the
* upstream element, ie, the BUFFER_SIZE event. */

View file

@ -331,9 +331,9 @@ gst_base_src_class_init (GstBaseSrcClass * klass)
parent_class = g_type_class_peek_parent (klass);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_base_src_finalize);
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_base_src_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_base_src_get_property);
gobject_class->finalize = gst_base_src_finalize;
gobject_class->set_property = gst_base_src_set_property;
gobject_class->get_property = gst_base_src_get_property;
g_object_class_install_property (gobject_class, PROP_BLOCKSIZE,
g_param_spec_ulong ("blocksize", "Block size",

View file

@ -352,16 +352,14 @@ gst_base_transform_class_init (GstBaseTransformClass * klass)
parent_class = g_type_class_peek_parent (klass);
gobject_class->set_property =
GST_DEBUG_FUNCPTR (gst_base_transform_set_property);
gobject_class->get_property =
GST_DEBUG_FUNCPTR (gst_base_transform_get_property);
gobject_class->set_property = gst_base_transform_set_property;
gobject_class->get_property = gst_base_transform_get_property;
g_object_class_install_property (gobject_class, PROP_QOS,
g_param_spec_boolean ("qos", "QoS", "Handle Quality-of-Service events",
DEFAULT_PROP_QOS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_base_transform_finalize);
gobject_class->finalize = gst_base_transform_finalize;
klass->passthrough_on_same_caps = FALSE;
klass->event = GST_DEBUG_FUNCPTR (gst_base_transform_sink_eventfunc);

View file

@ -104,7 +104,7 @@ gst_collect_pads_class_init (GstCollectPadsClass * klass)
GST_DEBUG_CATEGORY_INIT (collect_pads_debug, "collectpads", 0,
"GstCollectPads");
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_collect_pads_finalize);
gobject_class->finalize = gst_collect_pads_finalize;
}
static void

View file

@ -115,8 +115,8 @@ gst_data_queue_class_init (GstDataQueueClass * klass)
parent_class = g_type_class_peek_parent (klass);
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_data_queue_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_data_queue_get_property);
gobject_class->set_property = gst_data_queue_set_property;
gobject_class->get_property = gst_data_queue_get_property;
/* signals */
/**
@ -162,9 +162,7 @@ gst_data_queue_class_init (GstDataQueueClass * klass)
"Current amount of data in the queue (in ns)", 0, G_MAXUINT64, 0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/* set several parent class virtual functions */
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_data_queue_finalize);
gobject_class->finalize = gst_data_queue_finalize;
}
static void

View file

@ -181,8 +181,8 @@ gst_fake_sink_class_init (GstFakeSinkClass * klass)
gstelement_class = GST_ELEMENT_CLASS (klass);
gstbase_sink_class = GST_BASE_SINK_CLASS (klass);
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_fake_sink_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_fake_sink_get_property);
gobject_class->set_property = gst_fake_sink_set_property;
gobject_class->get_property = gst_fake_sink_get_property;
gobject_class->finalize = gst_fake_sink_finalize;
g_object_class_install_property (gobject_class, PROP_STATE_ERROR,

View file

@ -277,10 +277,10 @@ gst_fake_src_class_init (GstFakeSrcClass * klass)
gobject_class = G_OBJECT_CLASS (klass);
gstbase_src_class = GST_BASE_SRC_CLASS (klass);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_fake_src_finalize);
gobject_class->finalize = gst_fake_src_finalize;
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_fake_src_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_fake_src_get_property);
gobject_class->set_property = gst_fake_src_set_property;
gobject_class->get_property = gst_fake_src_get_property;
/*
FIXME: this is not implemented; would make sense once basesrc and fakesrc

View file

@ -291,7 +291,7 @@ gst_file_src_class_init (GstFileSrcClass * klass)
DEFAULT_SEQUENTIAL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
GST_PARAM_MUTABLE_PLAYING));
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_file_src_finalize);
gobject_class->finalize = gst_file_src_finalize;
gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_file_src_start);
gstbasesrc_class->stop = GST_DEBUG_FUNCPTR (gst_file_src_stop);

View file

@ -179,8 +179,8 @@ gst_identity_class_init (GstIdentityClass * klass)
gobject_class = G_OBJECT_CLASS (klass);
gstbasetrans_class = GST_BASE_TRANSFORM_CLASS (klass);
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_identity_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_identity_get_property);
gobject_class->set_property = gst_identity_set_property;
gobject_class->get_property = gst_identity_get_property;
g_object_class_install_property (gobject_class, PROP_SLEEP_TIME,
g_param_spec_uint ("sleep-time", "Sleep time",
@ -263,7 +263,7 @@ gst_identity_class_init (GstIdentityClass * klass)
G_STRUCT_OFFSET (GstIdentityClass, handoff), NULL, NULL,
marshal_VOID__MINIOBJECT, G_TYPE_NONE, 1, GST_TYPE_BUFFER);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_identity_finalize);
gobject_class->finalize = gst_identity_finalize;
gstbasetrans_class->event = GST_DEBUG_FUNCPTR (gst_identity_event);
gstbasetrans_class->transform_ip =

View file

@ -284,10 +284,8 @@ gst_multi_queue_class_init (GstMultiQueueClass * klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
gobject_class->set_property =
GST_DEBUG_FUNCPTR (gst_multi_queue_set_property);
gobject_class->get_property =
GST_DEBUG_FUNCPTR (gst_multi_queue_get_property);
gobject_class->set_property = gst_multi_queue_set_property;
gobject_class->get_property = gst_multi_queue_get_property;
/* SIGNALS */
@ -393,7 +391,7 @@ gst_multi_queue_class_init (GstMultiQueueClass * klass)
DEFAULT_HIGH_PERCENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_multi_queue_finalize);
gobject_class->finalize = gst_multi_queue_finalize;
gstelement_class->request_new_pad =
GST_DEBUG_FUNCPTR (gst_multi_queue_request_new_pad);

View file

@ -249,8 +249,8 @@ gst_queue_class_init (GstQueueClass * klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_queue_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_queue_get_property);
gobject_class->set_property = gst_queue_set_property;
gobject_class->get_property = gst_queue_get_property;
/* signals */
/**
@ -351,8 +351,7 @@ gst_queue_class_init (GstQueueClass * klass)
GST_TYPE_QUEUE_LEAKY, GST_QUEUE_NO_LEAK,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/* set several parent class virtual functions */
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_queue_finalize);
gobject_class->finalize = gst_queue_finalize;
}
static void

View file

@ -168,9 +168,9 @@ gst_tee_class_init (GstTeeClass * klass)
gobject_class = G_OBJECT_CLASS (klass);
gstelement_class = GST_ELEMENT_CLASS (klass);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_tee_finalize);
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_tee_set_property);
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_tee_get_property);
gobject_class->finalize = gst_tee_finalize;
gobject_class->set_property = gst_tee_set_property;
gobject_class->get_property = gst_tee_get_property;
g_object_class_install_property (gobject_class, PROP_NUM_SRC_PADS,
g_param_spec_int ("num-src-pads", "Num Src Pads",

View file

@ -192,13 +192,9 @@ gst_type_find_element_class_init (GstTypeFindElementClass * typefind_class)
GObjectClass *gobject_class = G_OBJECT_CLASS (typefind_class);
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (typefind_class);
gobject_class->set_property =
GST_DEBUG_FUNCPTR (gst_type_find_element_set_property);
gobject_class->get_property =
GST_DEBUG_FUNCPTR (gst_type_find_element_get_property);
gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_type_find_element_dispose);
typefind_class->have_type = gst_type_find_element_have_type;
gobject_class->set_property = gst_type_find_element_set_property;
gobject_class->get_property = gst_type_find_element_get_property;
gobject_class->dispose = gst_type_find_element_dispose;
g_object_class_install_property (gobject_class, PROP_CAPS,
g_param_spec_boxed ("caps", _("caps"),
@ -233,6 +229,9 @@ gst_type_find_element_class_init (GstTypeFindElementClass * typefind_class)
gst_marshal_VOID__UINT_BOXED, G_TYPE_NONE, 2,
G_TYPE_UINT, GST_TYPE_CAPS | G_SIGNAL_TYPE_STATIC_SCOPE);
typefind_class->have_type =
GST_DEBUG_FUNCPTR (gst_type_find_element_have_type);
gstelement_class->change_state =
GST_DEBUG_FUNCPTR (gst_type_find_element_change_state);
}

View file

@ -157,7 +157,7 @@ gst_mem_index_class_init (GstMemIndexClass * klass)
parent_class = g_type_class_peek_parent (klass);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_mem_index_finalize);
gobject_class->finalize = gst_mem_index_finalize;
gstindex_class->add_entry = GST_DEBUG_FUNCPTR (gst_mem_index_add_entry);
gstindex_class->get_assoc_entry =