gst, sys: remove GstImplementsInterface usage

This commit is contained in:
Tim-Philipp Müller 2011-06-26 23:16:08 +01:00
parent c16e7321b9
commit 8cede4ae6a
4 changed files with 2 additions and 57 deletions

View File

@ -1008,8 +1008,7 @@ _create_stream_group (GstEncodeBin * ebin, GstEncodingProfile * sprof,
* If we have no muxer or * If we have no muxer or
* if the muxer isn't a formatter and doesn't implement the tagsetter interface * if the muxer isn't a formatter and doesn't implement the tagsetter interface
*/ */
if (!ebin->muxer if (!ebin->muxer || (!GST_IS_TAG_SETTER (ebin->muxer)
|| (!gst_element_implements_interface (ebin->muxer, GST_TYPE_TAG_SETTER)
|| !_has_class (ebin->muxer, "Formatter"))) { || !_has_class (ebin->muxer, "Formatter"))) {
sgroup->formatter = _get_formatter (ebin, sprof); sgroup->formatter = _get_formatter (ebin, sprof);
if (sgroup->formatter) { if (sgroup->formatter) {

View File

@ -139,13 +139,11 @@ enum
"depth = (int) 32, " \ "depth = (int) 32, " \
"signed = (bool) TRUE" "signed = (bool) TRUE"
static void gst_volume_interface_init (GstImplementsInterfaceClass * klass);
static void gst_volume_mixer_init (GstMixerClass * iface); static void gst_volume_mixer_init (GstMixerClass * iface);
#define gst_volume_parent_class parent_class #define gst_volume_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstVolume, gst_volume, G_DEFINE_TYPE_WITH_CODE (GstVolume, gst_volume,
GST_TYPE_AUDIO_FILTER, G_IMPLEMENT_INTERFACE (GST_TYPE_IMPLEMENTS_INTERFACE, GST_TYPE_AUDIO_FILTER,
gst_volume_interface_init);
G_IMPLEMENT_INTERFACE (GST_TYPE_MIXER, gst_volume_mixer_init); G_IMPLEMENT_INTERFACE (GST_TYPE_MIXER, gst_volume_mixer_init);
G_IMPLEMENT_INTERFACE (GST_TYPE_STREAM_VOLUME, NULL)); G_IMPLEMENT_INTERFACE (GST_TYPE_STREAM_VOLUME, NULL));
@ -320,18 +318,6 @@ volume_update_volume (GstVolume * self, gfloat volume, gboolean mute)
/* Mixer interface */ /* 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 * static const GList *
gst_volume_list_tracks (GstMixer * mixer) gst_volume_list_tracks (GstMixer * mixer)
{ {

View File

@ -168,13 +168,10 @@ enum
/* Object typing & Creation */ /* Object typing & Creation */
/* */ /* */
/* =========================================== */ /* =========================================== */
static void gst_ximagesink_interface_init (GstImplementsInterfaceClass * klass);
static void gst_ximagesink_navigation_init (GstNavigationInterface * klass); static void gst_ximagesink_navigation_init (GstNavigationInterface * klass);
static void gst_ximagesink_xoverlay_init (GstXOverlayClass * klass); static void gst_ximagesink_xoverlay_init (GstXOverlayClass * klass);
#define gst_ximagesink_parent_class parent_class #define gst_ximagesink_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstXImageSink, gst_ximagesink, GST_TYPE_VIDEO_SINK, 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_NAVIGATION, gst_ximagesink_navigation_init);
G_IMPLEMENT_INTERFACE (GST_TYPE_X_OVERLAY, gst_ximagesink_xoverlay_init)); G_IMPLEMENT_INTERFACE (GST_TYPE_X_OVERLAY, gst_ximagesink_xoverlay_init));
@ -1519,22 +1516,6 @@ config_failed:
} }
/* Interfaces stuff */ /* 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 static void
gst_ximagesink_navigation_send_event (GstNavigation * navigation, gst_ximagesink_navigation_send_event (GstNavigation * navigation,
GstStructure * structure) GstStructure * structure)

View File

@ -193,8 +193,6 @@ enum
/* Object typing & Creation */ /* Object typing & Creation */
/* */ /* */
/* =========================================== */ /* =========================================== */
static void gst_xvimagesink_interface_init (GstImplementsInterfaceClass *
klass);
static void gst_xvimagesink_navigation_init (GstNavigationInterface * iface); static void gst_xvimagesink_navigation_init (GstNavigationInterface * iface);
static void gst_xvimagesink_xoverlay_init (GstXOverlayClass * iface); static void gst_xvimagesink_xoverlay_init (GstXOverlayClass * iface);
static void gst_xvimagesink_colorbalance_init (GstColorBalanceClass * iface); static void gst_xvimagesink_colorbalance_init (GstColorBalanceClass * iface);
@ -203,8 +201,6 @@ gst_xvimagesink_property_probe_interface_init (GstPropertyProbeInterface *
iface); iface);
#define gst_xvimagesink_parent_class parent_class #define gst_xvimagesink_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstXvImageSink, gst_xvimagesink, GST_TYPE_VIDEO_SINK, 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, G_IMPLEMENT_INTERFACE (GST_TYPE_NAVIGATION,
gst_xvimagesink_navigation_init); gst_xvimagesink_navigation_init);
G_IMPLEMENT_INTERFACE (GST_TYPE_X_OVERLAY, gst_xvimagesink_xoverlay_init); G_IMPLEMENT_INTERFACE (GST_TYPE_X_OVERLAY, gst_xvimagesink_xoverlay_init);
@ -2034,23 +2030,6 @@ config_failed:
} }
/* Interfaces stuff */ /* 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 static void
gst_xvimagesink_navigation_send_event (GstNavigation * navigation, gst_xvimagesink_navigation_send_event (GstNavigation * navigation,
GstStructure * structure) GstStructure * structure)