interfaces: clean up the use of iface and class/klass
authorStefan Sauer <ensonic@users.sf.net>
Fri, 21 Oct 2011 12:51:23 +0000 (14:51 +0200)
committerStefan Sauer <ensonic@users.sf.net>
Fri, 21 Oct 2011 12:58:41 +0000 (14:58 +0200)
15 files changed:
ext/pulse/pulsemixerctrl.h
gst/videofilter/gstvideobalance.c
sys/directsound/gstdirectsoundsink.c
sys/oss/gstossmixer.h
sys/oss4/oss4-mixer.c
sys/oss4/oss4-source.c
sys/osxaudio/gstosxaudioelement.c
sys/sunaudio/gstsunaudiomixerctrl.h
sys/v4l2/gstv4l2colorbalance.h
sys/v4l2/gstv4l2radio.c
sys/v4l2/gstv4l2tuner.h
sys/v4l2/gstv4l2videooverlay.c
sys/v4l2/gstv4l2videooverlay.h
sys/v4l2/gstv4l2vidorient.c
sys/v4l2/gstv4l2vidorient.h

index c1d1e85..58e4f0a 100644 (file)
@@ -158,16 +158,16 @@ interface_as_function ## _get_mixer_flags (GstMixer * mixer)
   return gst_pulsemixer_ctrl_get_mixer_flags (this->mixer);                          \
 } \
 static void                                                                     \
-interface_as_function ## _mixer_interface_init (GstMixerClass * klass)          \
+interface_as_function ## _mixer_interface_init (GstMixerInterface * iface)          \
 {                                                                               \
-  GST_MIXER_TYPE (klass) = GST_MIXER_HARDWARE;                                  \
+  GST_MIXER_TYPE (iface) = GST_MIXER_HARDWARE;                                  \
                                                                                 \
-  klass->list_tracks = interface_as_function ## _list_tracks;                   \
-  klass->set_volume  = interface_as_function ## _set_volume;                    \
-  klass->get_volume  = interface_as_function ## _get_volume;                    \
-  klass->set_mute    = interface_as_function ## _set_mute;                      \
-  klass->set_record  = interface_as_function ## _set_record;                    \
-  klass->get_mixer_flags = interface_as_function ## _get_mixer_flags; \
+  iface->list_tracks = interface_as_function ## _list_tracks;                   \
+  iface->set_volume  = interface_as_function ## _set_volume;                    \
+  iface->get_volume  = interface_as_function ## _get_volume;                    \
+  iface->set_mute    = interface_as_function ## _set_mute;                      \
+  iface->set_record  = interface_as_function ## _set_record;                    \
+  iface->get_mixer_flags = interface_as_function ## _get_mixer_flags; \
 }
 
 G_END_DECLS
index 0c3eeb6..5289c8f 100644 (file)
@@ -90,7 +90,8 @@ GST_STATIC_PAD_TEMPLATE ("sink",
             "I420, YV12, IYUV, Y41B }"))
     );
 
-static void gst_video_balance_colorbalance_init (GstColorBalanceClass * iface);
+static void gst_video_balance_colorbalance_init (GstColorBalanceInterface *
+    iface);
 
 static void gst_video_balance_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * pspec);
@@ -660,7 +661,7 @@ gst_video_balance_colorbalance_get_value (GstColorBalance * balance,
 }
 
 static void
-gst_video_balance_colorbalance_init (GstColorBalanceClass * iface)
+gst_video_balance_colorbalance_init (GstColorBalanceInterface * iface)
 {
   GST_COLOR_BALANCE_TYPE (iface) = GST_COLOR_BALANCE_SOFTWARE;
   iface->list_channels = gst_video_balance_colorbalance_list_channels;
index 4dba4b3..fc766e5 100644 (file)
@@ -92,7 +92,8 @@ static void gst_directsound_sink_interfaces_init (GType type);
 static void
 gst_directsound_sink_implements_interface_init (GstImplementsInterfaceClass *
     iface);
-static void gst_directsound_sink_mixer_interface_init (GstMixerClass * iface);
+static void gst_directsound_sink_mixer_interface_init (GstMixerInterface *
+    iface);
 
 static GstStaticPadTemplate directsoundsink_sink_factory =
     GST_STATIC_PAD_TEMPLATE ("sink",
@@ -223,7 +224,7 @@ gst_directsound_sink_mixer_get_volume (GstMixer * mixer,
 }
 
 static void
-gst_directsound_sink_mixer_interface_init (GstMixerClass * iface)
+gst_directsound_sink_mixer_interface_init (GstMixerInterface * iface)
 {
   /* the mixer interface requires a definition of the mixer type:
    * hardware or software? */
index d2e06fe..4ae888a 100644 (file)
@@ -152,16 +152,16 @@ interface_as_function ## _set_mute (GstMixer * mixer, GstMixerTrack * track,
 }                                                                               \
                                                                                 \
 static void                                                                     \
-interface_as_function ## _interface_init (GstMixerClass * klass)                \
+interface_as_function ## _interface_init (GstMixerInterface * iface)                \
 {                                                                               \
-  GST_MIXER_TYPE (klass) = GST_MIXER_HARDWARE;                                  \
+  GST_MIXER_TYPE (iface) = GST_MIXER_HARDWARE;                                  \
                                                                                 \
   /* set up the interface hooks */                                              \
-  klass->list_tracks = interface_as_function ## _list_tracks;                   \
-  klass->set_volume = interface_as_function ## _set_volume;                     \
-  klass->get_volume = interface_as_function ## _get_volume;                     \
-  klass->set_mute = interface_as_function ## _set_mute;                         \
-  klass->set_record = interface_as_function ## _set_record;                     \
+  iface->list_tracks = interface_as_function ## _list_tracks;                   \
+  iface->set_volume = interface_as_function ## _set_volume;                     \
+  iface->get_volume = interface_as_function ## _get_volume;                     \
+  iface->set_mute = interface_as_function ## _set_mute;                         \
+  iface->set_record = interface_as_function ## _set_record;                     \
 }
 
 
index fa81ecc..e190987 100644 (file)
@@ -1800,18 +1800,18 @@ gst_oss4_mixer_get_mixer_flags (GstMixer * mixer)
 }
 
 static void
-gst_oss4_mixer_interface_init (GstMixerClass * klass)
+gst_oss4_mixer_interface_init (GstMixerInterface * iface)
 {
-  GST_MIXER_TYPE (klass) = GST_MIXER_HARDWARE;
-
-  klass->list_tracks = gst_oss4_mixer_list_tracks;
-  klass->set_volume = gst_oss4_mixer_set_volume;
-  klass->get_volume = gst_oss4_mixer_get_volume;
-  klass->set_mute = gst_oss4_mixer_set_mute;
-  klass->set_record = gst_oss4_mixer_set_record;
-  klass->set_option = gst_oss4_mixer_set_option;
-  klass->get_option = gst_oss4_mixer_get_option;
-  klass->get_mixer_flags = gst_oss4_mixer_get_mixer_flags;
+  GST_MIXER_TYPE (iface) = GST_MIXER_HARDWARE;
+
+  iface->list_tracks = gst_oss4_mixer_list_tracks;
+  iface->set_volume = gst_oss4_mixer_set_volume;
+  iface->get_volume = gst_oss4_mixer_get_volume;
+  iface->set_mute = gst_oss4_mixer_set_mute;
+  iface->set_record = gst_oss4_mixer_set_record;
+  iface->set_option = gst_oss4_mixer_set_option;
+  iface->get_option = gst_oss4_mixer_get_option;
+  iface->get_mixer_flags = gst_oss4_mixer_get_mixer_flags;
 }
 
 /* Implement the horror that is GstImplementsInterface */
index 9331f80..41e1f85 100644 (file)
@@ -935,15 +935,15 @@ gst_oss4_source_mixer_set_mute (GstMixer * mixer, GstMixerTrack * track,
 }
 
 static void
-gst_oss4_source_mixer_interface_init (GstMixerClass * klass)
+gst_oss4_source_mixer_interface_init (GstMixerInterface * iface)
 {
-  GST_MIXER_TYPE (klass) = GST_MIXER_HARDWARE;
+  GST_MIXER_TYPE (iface) = GST_MIXER_HARDWARE;
 
-  klass->list_tracks = gst_oss4_source_mixer_list_tracks;
-  klass->set_volume = gst_oss4_source_mixer_set_volume;
-  klass->get_volume = gst_oss4_source_mixer_get_volume;
-  klass->set_mute = gst_oss4_source_mixer_set_mute;
-  klass->set_record = gst_oss4_source_mixer_set_record;
+  iface->list_tracks = gst_oss4_source_mixer_list_tracks;
+  iface->set_volume = gst_oss4_source_mixer_set_volume;
+  iface->get_volume = gst_oss4_source_mixer_get_volume;
+  iface->set_mute = gst_oss4_source_mixer_set_mute;
+  iface->set_record = gst_oss4_source_mixer_set_record;
 }
 
 /* Implement the horror that is GstImplementsInterface */
index a41f4b8..16cee0f 100644 (file)
@@ -50,7 +50,7 @@
 #include "gstosxaudioelement.h"
 
 static void
-gst_osx_audio_element_class_init (GstOsxAudioElementInterface * klass);
+gst_osx_audio_element_interface_init (GstOsxAudioElementInterface * iface);
 
 GType
 gst_osx_audio_element_get_type (void)
@@ -60,7 +60,7 @@ gst_osx_audio_element_get_type (void)
   if (!gst_osxaudioelement_type) {
     static const GTypeInfo gst_osxaudioelement_info = {
       sizeof (GstOsxAudioElementInterface),
-      (GBaseInitFunc) gst_osx_audio_element_class_init,
+      (GBaseInitFunc) gst_osx_audio_element_interface_init,
       NULL,
       NULL,
       NULL,
@@ -79,7 +79,7 @@ gst_osx_audio_element_get_type (void)
 }
 
 static void
-gst_osx_audio_element_class_init (GstOsxAudioElementInterface * klass)
+gst_osx_audio_element_interface_init (GstOsxAudioElementInterface * iface)
 {
   static gboolean initialized = FALSE;
 
@@ -88,5 +88,5 @@ gst_osx_audio_element_class_init (GstOsxAudioElementInterface * klass)
   }
 
   /* default virtual functions */
-  klass->io_proc = NULL;
+  iface->io_proc = NULL;
 }
index d38f02f..2ca17f0 100644 (file)
@@ -169,19 +169,19 @@ interface_as_function ## _get_mixer_flags (GstMixer * mixer)
 }                                                                               \
                                                                                \
 static void                                                                     \
-interface_as_function ## _interface_init (GstMixerClass * klass)                \
+interface_as_function ## _interface_init (GstMixerInterface * iface)                \
 {                                                                               \
-  GST_MIXER_TYPE (klass) = GST_MIXER_HARDWARE;                                  \
+  GST_MIXER_TYPE (iface) = GST_MIXER_HARDWARE;                                  \
                                                                                 \
   /* set up the interface hooks */                                              \
-  klass->list_tracks = interface_as_function ## _list_tracks;                   \
-  klass->set_volume  = interface_as_function ## _set_volume;                    \
-  klass->get_volume  = interface_as_function ## _get_volume;                    \
-  klass->set_mute    = interface_as_function ## _set_mute;                      \
-  klass->set_record  = interface_as_function ## _set_record;                    \
-  klass->get_option  = interface_as_function ## _get_option;                   \
-  klass->set_option  = interface_as_function ## _set_option;                   \
-  klass->get_mixer_flags   = interface_as_function ## _get_mixer_flags;                \
+  iface->list_tracks = interface_as_function ## _list_tracks;                   \
+  iface->set_volume  = interface_as_function ## _set_volume;                    \
+  iface->get_volume  = interface_as_function ## _get_volume;                    \
+  iface->set_mute    = interface_as_function ## _set_mute;                      \
+  iface->set_record  = interface_as_function ## _set_record;                    \
+  iface->get_option  = interface_as_function ## _get_option;                   \
+  iface->set_option  = interface_as_function ## _set_option;                   \
+  iface->get_mixer_flags   = interface_as_function ## _get_mixer_flags;                \
 }
 
 G_END_DECLS
index 9e183f0..4b872d0 100644 (file)
@@ -91,14 +91,14 @@ interface_as_function ## _color_balance_get_value (GstColorBalance * balance,
 }                                                                                     \
                                                                                       \
 static void                                                                           \
-interface_as_function ## _color_balance_interface_init (GstColorBalanceClass * klass) \
+interface_as_function ## _color_balance_interface_init (GstColorBalanceInterface * iface) \
 {                                                                                     \
-  GST_COLOR_BALANCE_TYPE (klass) = GST_COLOR_BALANCE_HARDWARE;                        \
+  GST_COLOR_BALANCE_TYPE (iface) = GST_COLOR_BALANCE_HARDWARE;                        \
                                                                                       \
   /* default virtual functions */                                                     \
-  klass->list_channels = interface_as_function ## _color_balance_list_channels;       \
-  klass->set_value = interface_as_function ## _color_balance_set_value;               \
-  klass->get_value = interface_as_function ## _color_balance_get_value;               \
+  iface->list_channels = interface_as_function ## _color_balance_list_channels;       \
+  iface->set_value = interface_as_function ## _color_balance_set_value;               \
+  iface->get_value = interface_as_function ## _color_balance_get_value;               \
 }                                                                                     \
 
 #endif /* __GST_V4L2_COLOR_BALANCE_H__ */
index 66aa043..3571710 100644 (file)
@@ -258,7 +258,7 @@ static void gst_v4l2radio_uri_handler_init (gpointer g_iface,
     gpointer iface_data);
 
 static void
-gst_v4l2radio_tuner_interface_reinit (GstTunerClass * iface)
+gst_v4l2radio_tuner_interface_reinit (GstTunerInterface * iface)
 {
   gst_v4l2radio_tuner_interface_init (iface);
 }
index 699ca87..75d4559 100644 (file)
@@ -179,20 +179,20 @@ interface_as_function ## _tuner_signal_strength (GstTuner * mixer,
 }                                                                                     \
                                                                                       \
 static void                                                                           \
-interface_as_function ## _tuner_interface_init (GstTunerClass * klass)                \
+interface_as_function ## _tuner_interface_init (GstTunerInterface * iface)                \
 {                                                                                     \
   /* default virtual functions */                                                     \
-  klass->list_channels = interface_as_function ## _tuner_list_channels;               \
-  klass->set_channel = interface_as_function ## _tuner_set_channel;                   \
-  klass->get_channel = interface_as_function ## _tuner_get_channel;                   \
+  iface->list_channels = interface_as_function ## _tuner_list_channels;               \
+  iface->set_channel = interface_as_function ## _tuner_set_channel;                   \
+  iface->get_channel = interface_as_function ## _tuner_get_channel;                   \
                                                                                       \
-  klass->list_norms = interface_as_function ## _tuner_list_norms;                     \
-  klass->set_norm = interface_as_function ## _tuner_set_norm_and_notify;              \
-  klass->get_norm = interface_as_function ## _tuner_get_norm;                         \
+  iface->list_norms = interface_as_function ## _tuner_list_norms;                     \
+  iface->set_norm = interface_as_function ## _tuner_set_norm_and_notify;              \
+  iface->get_norm = interface_as_function ## _tuner_get_norm;                         \
                                                                                       \
-  klass->set_frequency = interface_as_function ## _tuner_set_frequency_and_notify;    \
-  klass->get_frequency = interface_as_function ## _tuner_get_frequency;               \
-  klass->signal_strength = interface_as_function ## _tuner_signal_strength;           \
+  iface->set_frequency = interface_as_function ## _tuner_set_frequency_and_notify;    \
+  iface->get_frequency = interface_as_function ## _tuner_get_frequency;               \
+  iface->signal_strength = interface_as_function ## _tuner_signal_strength;           \
 }                                                                                     \
 
 #endif /* __GST_V4L2_TUNER_H__ */
index 6c2fd68..3f28fdc 100644 (file)
@@ -51,7 +51,7 @@ GST_DEBUG_CATEGORY_STATIC (v4l2xv_debug);
 #define GST_CAT_DEFAULT v4l2xv_debug
 
 void
-gst_v4l2_video_overlay_interface_init (GstVideoOverlayIface * klass)
+gst_v4l2_video_overlay_interface_init (GstVideoOverlayInterface * iface)
 {
   GST_DEBUG_CATEGORY_INIT (v4l2xv_debug, "v4l2xv", 0,
       "V4L2 GstVideoOverlay interface debugging");
index 6013666..958ade5 100644 (file)
@@ -39,7 +39,7 @@ void gst_v4l2_video_overlay_stop  (GstV4l2Object  *v4l2object);
 gboolean gst_v4l2_video_overlay_get_render_rect (GstV4l2Object *v4l2object,
     GstVideoRectangle *rect);
 
-void gst_v4l2_video_overlay_interface_init (GstVideoOverlayIface * iface);
+void gst_v4l2_video_overlay_interface_init (GstVideoOverlayInterface * iface);
 void gst_v4l2_video_overlay_set_window_handle (GstV4l2Object * v4l2object,
     guintptr id);
 void gst_v4l2_video_overlay_prepare_window_handle (GstV4l2Object * v4l2object,
@@ -57,7 +57,7 @@ interface_as_function ## _video_overlay_set_window_handle (GstVideoOverlay * ove
 }                                                                             \
                                                                               \
 static void                                                                   \
-interface_as_function ## _video_overlay_interface_init (GstVideoOverlayIface * iface)  \
+interface_as_function ## _video_overlay_interface_init (GstVideoOverlayInterface * iface)  \
 {                                                                             \
   /* default virtual functions */                                             \
   iface->set_window_handle = interface_as_function ## _video_overlay_set_window_handle;  \
index ee765b6..4dc0da7 100644 (file)
@@ -42,7 +42,7 @@ GST_DEBUG_CATEGORY_STATIC (v4l2vo_debug);
 #endif
 
 void
-gst_v4l2_video_orientation_interface_init (GstVideoOrientationInterface * klass)
+gst_v4l2_video_orientation_interface_init (GstVideoOrientationInterface * iface)
 {
   GST_DEBUG_CATEGORY_INIT (v4l2vo_debug, "v4l2vo", 0,
       "V4L2 VideoOrientation interface debugging");
index 39682e2..07ab664 100644 (file)
@@ -30,7 +30,7 @@
 
 G_BEGIN_DECLS
 
-void     gst_v4l2_video_orientation_interface_init (GstVideoOrientationInterface * klass);
+void     gst_v4l2_video_orientation_interface_init (GstVideoOrientationInterface * iface);
 
 gboolean gst_v4l2_video_orientation_get_hflip  (GstV4l2Object *v4l2object, gboolean *flip);
 gboolean gst_v4l2_video_orientation_get_vflip  (GstV4l2Object *v4l2object, gboolean *flip);
@@ -101,17 +101,17 @@ gboolean gst_v4l2_video_orientation_set_vcenter (GstV4l2Object *v4l2object, gint
   }                                                                                               \
                                                                                                   \
   static void                                                                                     \
-  interface_as_function ## _video_orientation_interface_init (GstVideoOrientationInterface * klass)          \
+  interface_as_function ## _video_orientation_interface_init (GstVideoOrientationInterface * iface)          \
   {                                                                                               \
     /* default virtual functions */                                                               \
-    klass->get_hflip   = interface_as_function ## _video_orientation_get_hflip;                   \
-    klass->get_vflip   = interface_as_function ## _video_orientation_get_vflip;                   \
-    klass->get_hcenter = interface_as_function ## _video_orientation_get_hcenter;                 \
-    klass->get_vcenter = interface_as_function ## _video_orientation_get_vcenter;                 \
-    klass->set_hflip   = interface_as_function ## _video_orientation_set_hflip;                   \
-    klass->set_vflip   = interface_as_function ## _video_orientation_set_vflip;                   \
-    klass->set_hcenter = interface_as_function ## _video_orientation_set_hcenter;                 \
-    klass->set_vcenter = interface_as_function ## _video_orientation_set_vcenter;                 \
+    iface->get_hflip   = interface_as_function ## _video_orientation_get_hflip;                   \
+    iface->get_vflip   = interface_as_function ## _video_orientation_get_vflip;                   \
+    iface->get_hcenter = interface_as_function ## _video_orientation_get_hcenter;                 \
+    iface->get_vcenter = interface_as_function ## _video_orientation_get_vcenter;                 \
+    iface->set_hflip   = interface_as_function ## _video_orientation_set_hflip;                   \
+    iface->set_vflip   = interface_as_function ## _video_orientation_set_vflip;                   \
+    iface->set_hcenter = interface_as_function ## _video_orientation_set_hcenter;                 \
+    iface->set_vcenter = interface_as_function ## _video_orientation_set_vcenter;                 \
   }
 
 #endif /* __GST_V4L2_VIDORIENT_H__ */