[farsight2/master] rtp: Remove duplicated parent_class pointers

Olivier Crête olivier.crete at collabora.co.uk
Sat Jul 25 15:13:54 PDT 2009


---
 gst/fsrtpconference/fs-rtp-conference.c        |    2 --
 gst/fsrtpconference/fs-rtp-dtmf-event-source.c |    3 ---
 gst/fsrtpconference/fs-rtp-dtmf-sound-source.c |    3 ---
 gst/fsrtpconference/fs-rtp-participant.c       |    2 --
 gst/fsrtpconference/fs-rtp-session.c           |   10 ++++------
 gst/fsrtpconference/fs-rtp-special-source.c    |    4 ----
 gst/fsrtpconference/fs-rtp-stream.c            |   10 ++++------
 7 files changed, 8 insertions(+), 26 deletions(-)

diff --git a/gst/fsrtpconference/fs-rtp-conference.c b/gst/fsrtpconference/fs-rtp-conference.c
index 234f8da..b9d6511 100644
--- a/gst/fsrtpconference/fs-rtp-conference.c
+++ b/gst/fsrtpconference/fs-rtp-conference.c
@@ -228,8 +228,6 @@ fs_rtp_conference_class_init (FsRtpConferenceClass * klass)
 
   g_type_class_add_private (klass, sizeof (FsRtpConferencePrivate));
 
-  parent_class = g_type_class_peek_parent (klass);
-
   baseconf_class->new_session =
     GST_DEBUG_FUNCPTR (fs_rtp_conference_new_session);
   baseconf_class->new_participant =
diff --git a/gst/fsrtpconference/fs-rtp-dtmf-event-source.c b/gst/fsrtpconference/fs-rtp-dtmf-event-source.c
index 394a2eb..fa8ea67 100644
--- a/gst/fsrtpconference/fs-rtp-dtmf-event-source.c
+++ b/gst/fsrtpconference/fs-rtp-dtmf-event-source.c
@@ -51,8 +51,6 @@ struct _FsRtpDtmfEventSourcePrivate {
   gboolean disposed;
 };
 
-static FsRtpSpecialSourceClass *parent_class = NULL;
-
 G_DEFINE_TYPE (FsRtpDtmfEventSource, fs_rtp_dtmf_event_source,
     FS_TYPE_RTP_SPECIAL_SOURCE);
 
@@ -82,7 +80,6 @@ static void
 fs_rtp_dtmf_event_source_class_init (FsRtpDtmfEventSourceClass *klass)
 {
   FsRtpSpecialSourceClass *spsource_class = FS_RTP_SPECIAL_SOURCE_CLASS (klass);
-  parent_class = fs_rtp_dtmf_event_source_parent_class;
 
   spsource_class->build = fs_rtp_dtmf_event_source_build;
   spsource_class->want_source = fs_rtp_dtmf_event_source_class_want_source;
diff --git a/gst/fsrtpconference/fs-rtp-dtmf-sound-source.c b/gst/fsrtpconference/fs-rtp-dtmf-sound-source.c
index aa0ab5b..0931416 100644
--- a/gst/fsrtpconference/fs-rtp-dtmf-sound-source.c
+++ b/gst/fsrtpconference/fs-rtp-dtmf-sound-source.c
@@ -51,8 +51,6 @@ struct _FsRtpDtmfSoundSourcePrivate {
   gboolean disposed;
 };
 
-static FsRtpSpecialSourceClass *parent_class = NULL;
-
 G_DEFINE_TYPE(FsRtpDtmfSoundSource, fs_rtp_dtmf_sound_source,
     FS_TYPE_RTP_SPECIAL_SOURCE);
 
@@ -76,7 +74,6 @@ static void
 fs_rtp_dtmf_sound_source_class_init (FsRtpDtmfSoundSourceClass *klass)
 {
   FsRtpSpecialSourceClass *spsource_class = FS_RTP_SPECIAL_SOURCE_CLASS (klass);
-  parent_class = fs_rtp_dtmf_sound_source_parent_class;
 
   spsource_class->build = fs_rtp_dtmf_sound_source_build;
   spsource_class->want_source = fs_rtp_dtmf_sound_source_class_want_source;
diff --git a/gst/fsrtpconference/fs-rtp-participant.c b/gst/fsrtpconference/fs-rtp-participant.c
index fa933e5..6c639f4 100644
--- a/gst/fsrtpconference/fs-rtp-participant.c
+++ b/gst/fsrtpconference/fs-rtp-participant.c
@@ -59,7 +59,6 @@ struct _FsRtpParticipantPrivate
    FsRtpParticipantPrivate))
 */
 
-static GObjectClass *parent_class = NULL;
 // static guint signals[LAST_SIGNAL] = { 0 };
 
 static void
@@ -68,7 +67,6 @@ fs_rtp_participant_class_init (FsRtpParticipantClass *klass)
   GObjectClass *gobject_class;
 
   gobject_class = (GObjectClass *) klass;
-  parent_class = g_type_class_peek_parent (klass);
 
   // g_type_class_add_private (klass, sizeof (FsRtpParticipantPrivate));
 }
diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c
index af3fea2..8541488 100644
--- a/gst/fsrtpconference/fs-rtp-session.c
+++ b/gst/fsrtpconference/fs-rtp-session.c
@@ -301,8 +301,6 @@ _discovery_pad_blocked_callback (GstPad *pad, gboolean blocked,
     gpointer user_data);
 
 
-static GObjectClass *parent_class = NULL;
-
 //static guint signals[LAST_SIGNAL] = { 0 };
 
 static void
@@ -312,7 +310,6 @@ fs_rtp_session_class_init (FsRtpSessionClass *klass)
   FsSessionClass *session_class;
 
   gobject_class = (GObjectClass *) klass;
-  parent_class = g_type_class_peek_parent (klass);
   session_class = FS_SESSION_CLASS (klass);
 
   gobject_class->set_property = fs_rtp_session_set_property;
@@ -686,7 +683,7 @@ fs_rtp_session_dispose (GObject *object)
   /* MAKE sure dispose does not run twice. */
   self->priv->disposed = TRUE;
 
-  parent_class->dispose (object);
+  G_OBJECT_CLASS (fs_rtp_session_parent_class)->dispose (object);
 }
 
 static void
@@ -724,7 +721,7 @@ fs_rtp_session_finalize (GObject *object)
 
   g_static_rw_lock_free (&self->priv->disposed_lock);
 
-  parent_class->finalize (object);
+  G_OBJECT_CLASS (fs_rtp_session_parent_class)->finalize (object);
 }
 
 static gboolean
@@ -1359,7 +1356,8 @@ fs_rtp_session_constructed (GObject *object)
   fs_rtp_session_start_codec_param_gathering_locked (self);
   FS_RTP_SESSION_UNLOCK (self);
 
-  GST_CALL_PARENT (G_OBJECT_CLASS, constructed, (object));
+  if (G_OBJECT_CLASS (fs_rtp_session_parent_class)->constructed)
+    G_OBJECT_CLASS (fs_rtp_session_parent_class)->constructed(object);
 }
 
 static void
diff --git a/gst/fsrtpconference/fs-rtp-special-source.c b/gst/fsrtpconference/fs-rtp-special-source.c
index 372c361..cdf25db 100644
--- a/gst/fsrtpconference/fs-rtp-special-source.c
+++ b/gst/fsrtpconference/fs-rtp-special-source.c
@@ -69,8 +69,6 @@ struct _FsRtpSpecialSourcePrivate {
   GMutex *mutex;
 };
 
-static GObjectClass *parent_class = NULL;
-
 static GList *classes = NULL;
 
 G_DEFINE_ABSTRACT_TYPE(FsRtpSpecialSource, fs_rtp_special_source,
@@ -121,8 +119,6 @@ fs_rtp_special_source_class_init (FsRtpSpecialSourceClass *klass)
 {
   GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 
-  parent_class = fs_rtp_special_source_parent_class;
-
   gobject_class->dispose = fs_rtp_special_source_dispose;
   gobject_class->finalize = fs_rtp_special_source_finalize;
 
diff --git a/gst/fsrtpconference/fs-rtp-stream.c b/gst/fsrtpconference/fs-rtp-stream.c
index 12bf2a4..cedc2ba 100644
--- a/gst/fsrtpconference/fs-rtp-stream.c
+++ b/gst/fsrtpconference/fs-rtp-stream.c
@@ -150,8 +150,6 @@ static void _state_changed (FsStreamTransmitter *stream_transmitter,
     FsStreamState state,
     gpointer user_data);
 
-
-static GObjectClass *parent_class = NULL;
 // static guint signals[LAST_SIGNAL] = { 0 };
 
 static void
@@ -161,7 +159,6 @@ fs_rtp_stream_class_init (FsRtpStreamClass *klass)
   FsStreamClass *stream_class = FS_STREAM_CLASS (klass);
 
   gobject_class = (GObjectClass *) klass;
-  parent_class = g_type_class_peek_parent (klass);
 
   gobject_class->set_property = fs_rtp_stream_set_property;
   gobject_class->get_property = fs_rtp_stream_get_property;
@@ -332,7 +329,7 @@ fs_rtp_stream_dispose (GObject *object)
   g_object_unref (session);
   g_object_unref (session);
 
-  parent_class->dispose (object);
+  G_OBJECT_CLASS (fs_rtp_stream_parent_class)->dispose (object);
 }
 
 static void
@@ -345,7 +342,7 @@ fs_rtp_stream_finalize (GObject *object)
 
   g_mutex_free (self->priv->mutex);
 
-  parent_class->finalize (object);
+  G_OBJECT_CLASS (fs_rtp_stream_parent_class)->finalize (object);
 }
 
 static gboolean
@@ -556,7 +553,8 @@ fs_rtp_stream_constructed (GObject *object)
     return;
   }
 
-  GST_CALL_PARENT (G_OBJECT_CLASS, constructed, (object));
+  if (G_OBJECT_CLASS (fs_rtp_stream_parent_class)->constructed)
+    G_OBJECT_CLASS (fs_rtp_stream_parent_class)->constructed(object);
 }
 
 
-- 
1.5.6.5




More information about the farsight-commits mailing list