From 8cede4ae6a1b81ee1a240f9285806f074be65286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 26 Jun 2011 23:16:08 +0100 Subject: [PATCH] gst, sys: remove GstImplementsInterface usage --- gst/encoding/gstencodebin.c | 3 +-- gst/volume/gstvolume.c | 16 +--------------- sys/ximage/ximagesink.c | 19 ------------------- sys/xvimage/xvimagesink.c | 21 --------------------- 4 files changed, 2 insertions(+), 57 deletions(-) diff --git a/gst/encoding/gstencodebin.c b/gst/encoding/gstencodebin.c index 6c24ab7cd6..23496faf7e 100644 --- a/gst/encoding/gstencodebin.c +++ b/gst/encoding/gstencodebin.c @@ -1008,8 +1008,7 @@ _create_stream_group (GstEncodeBin * ebin, GstEncodingProfile * sprof, * If we have no muxer or * if the muxer isn't a formatter and doesn't implement the tagsetter interface */ - if (!ebin->muxer - || (!gst_element_implements_interface (ebin->muxer, GST_TYPE_TAG_SETTER) + if (!ebin->muxer || (!GST_IS_TAG_SETTER (ebin->muxer) || !_has_class (ebin->muxer, "Formatter"))) { sgroup->formatter = _get_formatter (ebin, sprof); if (sgroup->formatter) { diff --git a/gst/volume/gstvolume.c b/gst/volume/gstvolume.c index c212ff260a..b0238ca4d9 100644 --- a/gst/volume/gstvolume.c +++ b/gst/volume/gstvolume.c @@ -139,13 +139,11 @@ enum "depth = (int) 32, " \ "signed = (bool) TRUE" -static void gst_volume_interface_init (GstImplementsInterfaceClass * klass); static void gst_volume_mixer_init (GstMixerClass * iface); #define gst_volume_parent_class parent_class G_DEFINE_TYPE_WITH_CODE (GstVolume, gst_volume, - GST_TYPE_AUDIO_FILTER, G_IMPLEMENT_INTERFACE (GST_TYPE_IMPLEMENTS_INTERFACE, - gst_volume_interface_init); + GST_TYPE_AUDIO_FILTER, G_IMPLEMENT_INTERFACE (GST_TYPE_MIXER, gst_volume_mixer_init); G_IMPLEMENT_INTERFACE (GST_TYPE_STREAM_VOLUME, NULL)); @@ -320,18 +318,6 @@ volume_update_volume (GstVolume * self, gfloat volume, gboolean mute) /* Mixer interface */ -static gboolean -gst_volume_interface_supported (GstImplementsInterface * iface, GType type) -{ - return (type == GST_TYPE_MIXER || type == GST_TYPE_STREAM_VOLUME); -} - -static void -gst_volume_interface_init (GstImplementsInterfaceClass * klass) -{ - klass->supported = gst_volume_interface_supported; -} - static const GList * gst_volume_list_tracks (GstMixer * mixer) { diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c index 8186788832..80b575f13c 100644 --- a/sys/ximage/ximagesink.c +++ b/sys/ximage/ximagesink.c @@ -168,13 +168,10 @@ enum /* Object typing & Creation */ /* */ /* =========================================== */ -static void gst_ximagesink_interface_init (GstImplementsInterfaceClass * klass); static void gst_ximagesink_navigation_init (GstNavigationInterface * klass); static void gst_ximagesink_xoverlay_init (GstXOverlayClass * klass); #define gst_ximagesink_parent_class parent_class G_DEFINE_TYPE_WITH_CODE (GstXImageSink, gst_ximagesink, GST_TYPE_VIDEO_SINK, - G_IMPLEMENT_INTERFACE (GST_TYPE_IMPLEMENTS_INTERFACE, - gst_ximagesink_interface_init); G_IMPLEMENT_INTERFACE (GST_TYPE_NAVIGATION, gst_ximagesink_navigation_init); G_IMPLEMENT_INTERFACE (GST_TYPE_X_OVERLAY, gst_ximagesink_xoverlay_init)); @@ -1519,22 +1516,6 @@ config_failed: } /* Interfaces stuff */ - -static gboolean -gst_ximagesink_interface_supported (GstImplementsInterface * iface, GType type) -{ - if (type == GST_TYPE_NAVIGATION || type == GST_TYPE_X_OVERLAY) - return TRUE; - else - return FALSE; -} - -static void -gst_ximagesink_interface_init (GstImplementsInterfaceClass * klass) -{ - klass->supported = gst_ximagesink_interface_supported; -} - static void gst_ximagesink_navigation_send_event (GstNavigation * navigation, GstStructure * structure) diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index 938e349d64..f4725b069c 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -193,8 +193,6 @@ enum /* Object typing & Creation */ /* */ /* =========================================== */ -static void gst_xvimagesink_interface_init (GstImplementsInterfaceClass * - klass); static void gst_xvimagesink_navigation_init (GstNavigationInterface * iface); static void gst_xvimagesink_xoverlay_init (GstXOverlayClass * iface); static void gst_xvimagesink_colorbalance_init (GstColorBalanceClass * iface); @@ -203,8 +201,6 @@ gst_xvimagesink_property_probe_interface_init (GstPropertyProbeInterface * iface); #define gst_xvimagesink_parent_class parent_class G_DEFINE_TYPE_WITH_CODE (GstXvImageSink, gst_xvimagesink, GST_TYPE_VIDEO_SINK, - G_IMPLEMENT_INTERFACE (GST_TYPE_IMPLEMENTS_INTERFACE, - gst_xvimagesink_interface_init); G_IMPLEMENT_INTERFACE (GST_TYPE_NAVIGATION, gst_xvimagesink_navigation_init); G_IMPLEMENT_INTERFACE (GST_TYPE_X_OVERLAY, gst_xvimagesink_xoverlay_init); @@ -2034,23 +2030,6 @@ config_failed: } /* Interfaces stuff */ - -static gboolean -gst_xvimagesink_interface_supported (GstImplementsInterface * iface, GType type) -{ - if (type == GST_TYPE_NAVIGATION || type == GST_TYPE_X_OVERLAY || - type == GST_TYPE_COLOR_BALANCE || type == GST_TYPE_PROPERTY_PROBE) - return TRUE; - else - return FALSE; -} - -static void -gst_xvimagesink_interface_init (GstImplementsInterfaceClass * klass) -{ - klass->supported = gst_xvimagesink_interface_supported; -} - static void gst_xvimagesink_navigation_send_event (GstNavigation * navigation, GstStructure * structure)