From 6f4c1ac58341ee189225d313ddfe9ae24a65c88c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 28 Oct 2009 00:59:35 +0000 Subject: [PATCH] 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 sixteenth of a polar bear. --- ext/alsa/gstalsasink.c | 7 ++++--- ext/alsa/gstalsasrc.c | 6 +++--- gst-libs/gst/audio/gstaudiosink.c | 4 ++-- gst-libs/gst/audio/gstaudiosrc.c | 4 ++-- gst-libs/gst/audio/gstbaseaudiosink.c | 8 +++----- gst-libs/gst/audio/gstbaseaudiosrc.c | 8 +++----- gst-libs/gst/audio/gstringbuffer.c | 4 ++-- gst-libs/gst/rtp/gstbasertpaudiopayload.c | 3 +-- gst/adder/gstadder.c | 6 +++--- gst/ffmpegcolorspace/gstffmpegcolorspace.c | 2 +- gst/gdp/gstgdpdepay.c | 2 +- gst/gdp/gstgdppay.c | 6 +++--- gst/playback/gstdecodebin.c | 8 ++++---- gst/playback/gstdecodebin2.c | 8 ++++---- gst/playback/gstinputselector.c | 12 ++++-------- gst/playback/gstplaybasebin.c | 4 ++-- gst/playback/gstplaybin.c | 2 +- gst/playback/gstplaybin2.c | 2 +- gst/playback/gstplaysink.c | 8 ++++---- gst/playback/gstqueue2.c | 6 +++--- gst/playback/gststreaminfo.c | 2 +- gst/playback/gststreamselector.c | 9 +++------ gst/subparse/gstssaparse.c | 2 +- 23 files changed, 56 insertions(+), 67 deletions(-) diff --git a/ext/alsa/gstalsasink.c b/ext/alsa/gstalsasink.c index 1ca0f9738e..bc75ca6bb5 100644 --- a/ext/alsa/gstalsasink.c +++ b/ext/alsa/gstalsasink.c @@ -177,6 +177,7 @@ gst_alsasink_base_init (gpointer g_class) gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&alsasink_sink_factory)); } + static void gst_alsasink_class_init (GstAlsaSinkClass * klass) { @@ -190,9 +191,9 @@ gst_alsasink_class_init (GstAlsaSinkClass * klass) parent_class = g_type_class_peek_parent (klass); - gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_alsasink_finalise); - gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_alsasink_get_property); - gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_alsasink_set_property); + gobject_class->finalize = gst_alsasink_finalise; + gobject_class->get_property = gst_alsasink_get_property; + gobject_class->set_property = gst_alsasink_set_property; gstbasesink_class->get_caps = GST_DEBUG_FUNCPTR (gst_alsasink_getcaps); diff --git a/ext/alsa/gstalsasrc.c b/ext/alsa/gstalsasrc.c index f97b43155b..db9c3a60d0 100644 --- a/ext/alsa/gstalsasrc.c +++ b/ext/alsa/gstalsasrc.c @@ -208,9 +208,9 @@ gst_alsasrc_class_init (GstAlsaSrcClass * klass) gstbasesrc_class = (GstBaseSrcClass *) klass; gstaudiosrc_class = (GstAudioSrcClass *) klass; - gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_alsasrc_finalize); - gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_alsasrc_get_property); - gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_alsasrc_set_property); + gobject_class->finalize = gst_alsasrc_finalize; + gobject_class->get_property = gst_alsasrc_get_property; + gobject_class->set_property = gst_alsasrc_set_property; gstbasesrc_class->get_caps = GST_DEBUG_FUNCPTR (gst_alsasrc_getcaps); diff --git a/gst-libs/gst/audio/gstaudiosink.c b/gst-libs/gst/audio/gstaudiosink.c index 8542d7a8da..ce919af5c3 100644 --- a/gst-libs/gst/audio/gstaudiosink.c +++ b/gst-libs/gst/audio/gstaudiosink.c @@ -170,8 +170,8 @@ gst_audioringbuffer_class_init (GstAudioRingBufferClass * klass) ring_parent_class = g_type_class_peek_parent (klass); - gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_audioringbuffer_dispose); - gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_audioringbuffer_finalize); + gobject_class->dispose = gst_audioringbuffer_dispose; + gobject_class->finalize = gst_audioringbuffer_finalize; gstringbuffer_class->open_device = GST_DEBUG_FUNCPTR (gst_audioringbuffer_open_device); diff --git a/gst-libs/gst/audio/gstaudiosrc.c b/gst-libs/gst/audio/gstaudiosrc.c index db4a52ce3a..80cb6b3967 100644 --- a/gst-libs/gst/audio/gstaudiosrc.c +++ b/gst-libs/gst/audio/gstaudiosrc.c @@ -165,8 +165,8 @@ gst_audioringbuffer_class_init (GstAudioRingBufferClass * klass) ring_parent_class = g_type_class_peek_parent (klass); - gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_audioringbuffer_dispose); - gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_audioringbuffer_finalize); + gobject_class->dispose = gst_audioringbuffer_dispose; + gobject_class->finalize = gst_audioringbuffer_finalize; gstringbuffer_class->open_device = GST_DEBUG_FUNCPTR (gst_audioringbuffer_open_device); diff --git a/gst-libs/gst/audio/gstbaseaudiosink.c b/gst-libs/gst/audio/gstbaseaudiosink.c index 23fde25867..3b0ce56354 100644 --- a/gst-libs/gst/audio/gstbaseaudiosink.c +++ b/gst-libs/gst/audio/gstbaseaudiosink.c @@ -177,11 +177,9 @@ gst_base_audio_sink_class_init (GstBaseAudioSinkClass * klass) g_type_class_add_private (klass, sizeof (GstBaseAudioSinkPrivate)); - gobject_class->set_property = - GST_DEBUG_FUNCPTR (gst_base_audio_sink_set_property); - gobject_class->get_property = - GST_DEBUG_FUNCPTR (gst_base_audio_sink_get_property); - gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_base_audio_sink_dispose); + gobject_class->set_property = gst_base_audio_sink_set_property; + gobject_class->get_property = gst_base_audio_sink_get_property; + gobject_class->dispose = gst_base_audio_sink_dispose; g_object_class_install_property (gobject_class, PROP_BUFFER_TIME, g_param_spec_int64 ("buffer-time", "Buffer Time", diff --git a/gst-libs/gst/audio/gstbaseaudiosrc.c b/gst-libs/gst/audio/gstbaseaudiosrc.c index 963afc9f81..abf07ca86e 100644 --- a/gst-libs/gst/audio/gstbaseaudiosrc.c +++ b/gst-libs/gst/audio/gstbaseaudiosrc.c @@ -162,11 +162,9 @@ gst_base_audio_src_class_init (GstBaseAudioSrcClass * klass) g_type_class_add_private (klass, sizeof (GstBaseAudioSrcPrivate)); - gobject_class->set_property = - GST_DEBUG_FUNCPTR (gst_base_audio_src_set_property); - gobject_class->get_property = - GST_DEBUG_FUNCPTR (gst_base_audio_src_get_property); - gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_base_audio_src_dispose); + gobject_class->set_property = gst_base_audio_src_set_property; + gobject_class->get_property = gst_base_audio_src_get_property; + gobject_class->dispose = gst_base_audio_src_dispose; g_object_class_install_property (gobject_class, PROP_BUFFER_TIME, g_param_spec_int64 ("buffer-time", "Buffer Time", diff --git a/gst-libs/gst/audio/gstringbuffer.c b/gst-libs/gst/audio/gstringbuffer.c index 7adeee340a..de74bcd9c2 100644 --- a/gst-libs/gst/audio/gstringbuffer.c +++ b/gst-libs/gst/audio/gstringbuffer.c @@ -98,8 +98,8 @@ gst_ring_buffer_class_init (GstRingBufferClass * klass) parent_class = g_type_class_peek_parent (klass); - gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_ring_buffer_dispose); - gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_ring_buffer_finalize); + gobject_class->dispose = gst_ring_buffer_dispose; + gobject_class->finalize = gst_ring_buffer_finalize; gstringbuffer_class->clear_all = GST_DEBUG_FUNCPTR (default_clear_all); gstringbuffer_class->commit = GST_DEBUG_FUNCPTR (default_commit); diff --git a/gst-libs/gst/rtp/gstbasertpaudiopayload.c b/gst-libs/gst/rtp/gstbasertpaudiopayload.c index 0ee2476f94..966d93d74b 100644 --- a/gst-libs/gst/rtp/gstbasertpaudiopayload.c +++ b/gst-libs/gst/rtp/gstbasertpaudiopayload.c @@ -163,8 +163,7 @@ gst_base_rtp_audio_payload_class_init (GstBaseRTPAudioPayloadClass * klass) gstelement_class = (GstElementClass *) klass; gstbasertppayload_class = (GstBaseRTPPayloadClass *) klass; - gobject_class->finalize = - GST_DEBUG_FUNCPTR (gst_base_rtp_audio_payload_finalize); + gobject_class->finalize = gst_base_rtp_audio_payload_finalize; gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_base_rtp_payload_audio_change_state); diff --git a/gst/adder/gstadder.c b/gst/adder/gstadder.c index 36846245ac..97420d3ca6 100644 --- a/gst/adder/gstadder.c +++ b/gst/adder/gstadder.c @@ -820,9 +820,9 @@ gst_adder_class_init (GstAdderClass * klass) GObjectClass *gobject_class = (GObjectClass *) klass; GstElementClass *gstelement_class = (GstElementClass *) klass; - gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_adder_set_property); - gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_adder_get_property); - gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_adder_dispose); + gobject_class->set_property = gst_adder_set_property; + gobject_class->get_property = gst_adder_get_property; + gobject_class->dispose = gst_adder_dispose; gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&gst_adder_src_template)); diff --git a/gst/ffmpegcolorspace/gstffmpegcolorspace.c b/gst/ffmpegcolorspace/gstffmpegcolorspace.c index 7045f29684..f0e0b021f5 100644 --- a/gst/ffmpegcolorspace/gstffmpegcolorspace.c +++ b/gst/ffmpegcolorspace/gstffmpegcolorspace.c @@ -346,7 +346,7 @@ gst_ffmpegcsp_class_init (GstFFMpegCspClass * klass) parent_class = g_type_class_peek_parent (klass); - gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_ffmpegcsp_finalize); + gobject_class->finalize = gst_ffmpegcsp_finalize; gstbasetransform_class->transform_caps = GST_DEBUG_FUNCPTR (gst_ffmpegcsp_transform_caps); diff --git a/gst/gdp/gstgdpdepay.c b/gst/gdp/gstgdpdepay.c index 2669967d16..88ea6c0cf8 100644 --- a/gst/gdp/gstgdpdepay.c +++ b/gst/gdp/gstgdpdepay.c @@ -110,7 +110,7 @@ gst_gdp_depay_class_init (GstGDPDepayClass * klass) gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_gdp_depay_change_state); - gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_gdp_depay_finalize); + gobject_class->finalize = gst_gdp_depay_finalize; } static void diff --git a/gst/gdp/gstgdppay.c b/gst/gdp/gstgdppay.c index f447deec83..584e2ea512 100644 --- a/gst/gdp/gstgdppay.c +++ b/gst/gdp/gstgdppay.c @@ -122,9 +122,9 @@ gst_gdp_pay_class_init (GstGDPPayClass * klass) gobject_class = (GObjectClass *) klass; gstelement_class = (GstElementClass *) klass; - gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_gdp_pay_set_property); - gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_gdp_pay_get_property); - gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_gdp_pay_finalize); + gobject_class->set_property = gst_gdp_pay_set_property; + gobject_class->get_property = gst_gdp_pay_get_property; + gobject_class->finalize = gst_gdp_pay_finalize; g_object_class_install_property (gobject_class, PROP_CRC_HEADER, g_param_spec_boolean ("crc-header", "CRC Header", diff --git a/gst/playback/gstdecodebin.c b/gst/playback/gstdecodebin.c index a59c0848b9..13c136fa82 100644 --- a/gst/playback/gstdecodebin.c +++ b/gst/playback/gstdecodebin.c @@ -232,10 +232,10 @@ gst_decode_bin_class_init (GstDecodeBinClass * klass) parent_class = g_type_class_peek_parent (klass); - gobject_klass->set_property = GST_DEBUG_FUNCPTR (gst_decode_bin_set_property); - gobject_klass->get_property = GST_DEBUG_FUNCPTR (gst_decode_bin_get_property); - gobject_klass->dispose = GST_DEBUG_FUNCPTR (gst_decode_bin_dispose); - gobject_klass->finalize = GST_DEBUG_FUNCPTR (gst_decode_bin_finalize); + gobject_klass->set_property = gst_decode_bin_set_property; + gobject_klass->get_property = gst_decode_bin_get_property; + gobject_klass->dispose = gst_decode_bin_dispose; + gobject_klass->finalize = gst_decode_bin_finalize; /** * GstDecodeBin::new-decoded-pad: diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index 7529b541f2..405ddbc687 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -526,10 +526,10 @@ gst_decode_bin_class_init (GstDecodeBinClass * klass) parent_class = g_type_class_peek_parent (klass); - gobject_klass->dispose = GST_DEBUG_FUNCPTR (gst_decode_bin_dispose); - gobject_klass->finalize = GST_DEBUG_FUNCPTR (gst_decode_bin_finalize); - gobject_klass->set_property = GST_DEBUG_FUNCPTR (gst_decode_bin_set_property); - gobject_klass->get_property = GST_DEBUG_FUNCPTR (gst_decode_bin_get_property); + gobject_klass->dispose = gst_decode_bin_dispose; + gobject_klass->finalize = gst_decode_bin_finalize; + gobject_klass->set_property = gst_decode_bin_set_property; + gobject_klass->get_property = gst_decode_bin_get_property; /** * GstDecodeBin2::new-decoded-pad: diff --git a/gst/playback/gstinputselector.c b/gst/playback/gstinputselector.c index c0b96aa4e2..8951aaad75 100644 --- a/gst/playback/gstinputselector.c +++ b/gst/playback/gstinputselector.c @@ -190,10 +190,8 @@ gst_selector_pad_class_init (GstSelectorPadClass * klass) gobject_class->finalize = gst_selector_pad_finalize; - gobject_class->get_property = - GST_DEBUG_FUNCPTR (gst_selector_pad_get_property); - gobject_class->set_property = - GST_DEBUG_FUNCPTR (gst_selector_pad_set_property); + gobject_class->get_property = gst_selector_pad_get_property; + gobject_class->set_property = gst_selector_pad_set_property; g_object_class_install_property (gobject_class, PROP_PAD_RUNNING_TIME, g_param_spec_int64 ("running-time", "Running time", @@ -765,10 +763,8 @@ gst_input_selector_class_init (GstInputSelectorClass * klass) gobject_class->dispose = gst_input_selector_dispose; - gobject_class->set_property = - GST_DEBUG_FUNCPTR (gst_input_selector_set_property); - gobject_class->get_property = - GST_DEBUG_FUNCPTR (gst_input_selector_get_property); + gobject_class->set_property = gst_input_selector_set_property; + gobject_class->get_property = gst_input_selector_get_property; g_object_class_install_property (gobject_class, PROP_N_PADS, g_param_spec_uint ("n-pads", "Number of Pads", diff --git a/gst/playback/gstplaybasebin.c b/gst/playback/gstplaybasebin.c index 77ba97c380..d7dbf2b731 100644 --- a/gst/playback/gstplaybasebin.c +++ b/gst/playback/gstplaybasebin.c @@ -219,8 +219,8 @@ gst_play_base_bin_class_init (GstPlayBaseBinClass * klass) GST_DEBUG_CATEGORY_INIT (gst_play_base_bin_debug, "playbasebin", 0, "playbasebin"); - gobject_klass->dispose = GST_DEBUG_FUNCPTR (gst_play_base_bin_dispose); - gobject_klass->finalize = GST_DEBUG_FUNCPTR (gst_play_base_bin_finalize); + gobject_klass->dispose = gst_play_base_bin_dispose; + gobject_klass->finalize = gst_play_base_bin_finalize; gstbin_klass->handle_message = GST_DEBUG_FUNCPTR (gst_play_base_bin_handle_message_func); diff --git a/gst/playback/gstplaybin.c b/gst/playback/gstplaybin.c index 298f9e5548..a505aa0301 100644 --- a/gst/playback/gstplaybin.c +++ b/gst/playback/gstplaybin.c @@ -414,7 +414,7 @@ gst_play_bin_class_init (GstPlayBinClass * klass) "Pango font description of font " "to be used for subtitle rendering", NULL, G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS)); - gobject_klass->dispose = GST_DEBUG_FUNCPTR (gst_play_bin_dispose); + gobject_klass->dispose = gst_play_bin_dispose; gst_element_class_set_details (gstelement_klass, &gst_play_bin_details); diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c index a405c78bb9..1387a80207 100644 --- a/gst/playback/gstplaybin2.c +++ b/gst/playback/gstplaybin2.c @@ -622,7 +622,7 @@ gst_play_bin_class_init (GstPlayBinClass * klass) gobject_klass->set_property = gst_play_bin_set_property; gobject_klass->get_property = gst_play_bin_get_property; - gobject_klass->finalize = GST_DEBUG_FUNCPTR (gst_play_bin_finalize); + gobject_klass->finalize = gst_play_bin_finalize; /** * GstPlayBin2:uri diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c index 5bed9a6990..85f7abd379 100644 --- a/gst/playback/gstplaysink.c +++ b/gst/playback/gstplaysink.c @@ -267,10 +267,10 @@ gst_play_sink_class_init (GstPlaySinkClass * klass) gstelement_klass = (GstElementClass *) klass; gstbin_klass = (GstBinClass *) klass; - gobject_klass->dispose = GST_DEBUG_FUNCPTR (gst_play_sink_dispose); - gobject_klass->finalize = GST_DEBUG_FUNCPTR (gst_play_sink_finalize); - gobject_klass->set_property = GST_DEBUG_FUNCPTR (gst_play_sink_set_property); - gobject_klass->get_property = GST_DEBUG_FUNCPTR (gst_play_sink_get_property); + gobject_klass->dispose = gst_play_sink_dispose; + gobject_klass->finalize = gst_play_sink_finalize; + gobject_klass->set_property = gst_play_sink_set_property; + gobject_klass->get_property = gst_play_sink_get_property; /** diff --git a/gst/playback/gstqueue2.c b/gst/playback/gstqueue2.c index 1fe9a22d79..0dcc0598c2 100644 --- a/gst/playback/gstqueue2.c +++ b/gst/playback/gstqueue2.c @@ -378,8 +378,8 @@ gst_queue_class_init (GstQueueClass * klass) parent_class = g_type_class_peek_parent (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; /* properties */ g_object_class_install_property (gobject_class, PROP_CUR_LEVEL_BYTES, @@ -448,7 +448,7 @@ gst_queue_class_init (GstQueueClass * klass) gst_element_class_set_details (gstelement_class, &gst_queue_details); /* set several parent class virtual functions */ - gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_queue_finalize); + gobject_class->finalize = gst_queue_finalize; gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_queue_change_state); } diff --git a/gst/playback/gststreaminfo.c b/gst/playback/gststreaminfo.c index 1ee5abf1e2..86ec58a3ec 100644 --- a/gst/playback/gststreaminfo.c +++ b/gst/playback/gststreaminfo.c @@ -157,7 +157,7 @@ gst_stream_info_class_init (GstStreamInfoClass * klass) G_STRUCT_OFFSET (GstStreamInfoClass, muted), NULL, NULL, gst_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN); - gobject_klass->dispose = GST_DEBUG_FUNCPTR (gst_stream_info_dispose); + gobject_klass->dispose = gst_stream_info_dispose; GST_DEBUG_CATEGORY_INIT (gst_streaminfo_debug, "streaminfo", 0, "Playbin Stream Info"); diff --git a/gst/playback/gststreamselector.c b/gst/playback/gststreamselector.c index 0fb4f4c82f..b77da1e59c 100644 --- a/gst/playback/gststreamselector.c +++ b/gst/playback/gststreamselector.c @@ -157,8 +157,7 @@ gst_selector_pad_class_init (GstSelectorPadClass * klass) selector_pad_parent_class = g_type_class_peek_parent (klass); gobject_class->finalize = gst_selector_pad_finalize; - gobject_class->get_property = - GST_DEBUG_FUNCPTR (gst_selector_pad_get_property); + gobject_class->get_property = gst_selector_pad_get_property; g_object_class_install_property (gobject_class, PROP_PAD_TAGS, g_param_spec_boxed ("tags", "Tags", @@ -486,10 +485,8 @@ gst_stream_selector_class_init (GstStreamSelectorClass * klass) gobject_class->dispose = gst_stream_selector_dispose; - gobject_class->set_property = - GST_DEBUG_FUNCPTR (gst_stream_selector_set_property); - gobject_class->get_property = - GST_DEBUG_FUNCPTR (gst_stream_selector_get_property); + gobject_class->set_property = gst_stream_selector_set_property; + gobject_class->get_property = gst_stream_selector_get_property; g_object_class_install_property (gobject_class, PROP_N_PADS, g_param_spec_uint ("n-pads", "Number of Pads", diff --git a/gst/subparse/gstssaparse.c b/gst/subparse/gstssaparse.c index 622671c489..d400077063 100644 --- a/gst/subparse/gstssaparse.c +++ b/gst/subparse/gstssaparse.c @@ -116,7 +116,7 @@ gst_ssa_parse_class_init (GstSsaParseClass * klass) GObjectClass *object_class = G_OBJECT_CLASS (klass); GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - object_class->dispose = GST_DEBUG_FUNCPTR (gst_ssa_parse_dispose); + object_class->dispose = gst_ssa_parse_dispose; element_class->change_state = GST_DEBUG_FUNCPTR (gst_ssa_parse_change_state); }