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 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) {

View file

@ -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)
{

View file

@ -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)

View file

@ -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)