[farsight2/master] rtp: Remove useless properties in special sources

Olivier Crête olivier.crete at collabora.co.uk
Tue Jul 21 18:01:14 PDT 2009


---
 gst/fsrtpconference/fs-rtp-special-source.c |   81 +--------------------------
 1 files changed, 2 insertions(+), 79 deletions(-)

diff --git a/gst/fsrtpconference/fs-rtp-special-source.c b/gst/fsrtpconference/fs-rtp-special-source.c
index 9d332cf..372c361 100644
--- a/gst/fsrtpconference/fs-rtp-special-source.c
+++ b/gst/fsrtpconference/fs-rtp-special-source.c
@@ -52,8 +52,6 @@
 enum
 {
   PROP_0,
-  PROP_BIN,
-  PROP_RTPMUXER
 };
 
 struct _FsRtpSpecialSourcePrivate {
@@ -86,15 +84,6 @@ G_DEFINE_ABSTRACT_TYPE(FsRtpSpecialSource, fs_rtp_special_source,
 #define FS_RTP_SPECIAL_SOURCE_LOCK(src)   g_mutex_lock (src->priv->mutex)
 #define FS_RTP_SPECIAL_SOURCE_UNLOCK(src) g_mutex_unlock (src->priv->mutex)
 
-static void fs_rtp_special_source_set_property (GObject *object,
-    guint prop_id,
-    const GValue *value,
-    GParamSpec *pspec);
-static void fs_rtp_special_source_get_property (GObject *object,
-    guint prop_id,
-    GValue *value,
-    GParamSpec *pspec);
-
 static void fs_rtp_special_source_dispose (GObject *object);
 static void fs_rtp_special_source_finalize (GObject *object);
 
@@ -134,29 +123,9 @@ fs_rtp_special_source_class_init (FsRtpSpecialSourceClass *klass)
 
   parent_class = fs_rtp_special_source_parent_class;
 
-  gobject_class->set_property = fs_rtp_special_source_set_property;
-  gobject_class->get_property = fs_rtp_special_source_get_property;
   gobject_class->dispose = fs_rtp_special_source_dispose;
   gobject_class->finalize = fs_rtp_special_source_finalize;
 
-  g_object_class_install_property (gobject_class,
-      PROP_BIN,
-      g_param_spec_object ("bin",
-          "The GstBin to add the elements to",
-          "This is the GstBin where this class adds elements",
-          GST_TYPE_BIN,
-          G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
-
-  g_object_class_install_property (gobject_class,
-      PROP_RTPMUXER,
-      g_param_spec_object ("rtpmuxer",
-          "The RTP muxer that the source is linked to",
-          "The RTP muxer that the source is linked to",
-          GST_TYPE_ELEMENT,
-          G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
-
-
-
   g_type_class_add_private (klass, sizeof (FsRtpSpecialSourcePrivate));
 }
 
@@ -276,52 +245,6 @@ fs_rtp_special_source_finalize (GObject *object)
   G_OBJECT_CLASS (fs_rtp_special_source_parent_class)->finalize (object);
 }
 
-
-static void
-fs_rtp_special_source_set_property (GObject *object,
-    guint prop_id,
-    const GValue *value,
-    GParamSpec *pspec)
-{
-  FsRtpSpecialSource *self = FS_RTP_SPECIAL_SOURCE (object);
-
-  switch (prop_id)
-  {
-    case PROP_BIN:
-      self->priv->outer_bin = g_value_dup_object (value);
-      break;
-    case PROP_RTPMUXER:
-      self->priv->rtpmuxer = g_value_dup_object (value);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-static void
-fs_rtp_special_source_get_property (GObject *object,
-    guint prop_id,
-    GValue *value,
-    GParamSpec *pspec)
-{
- FsRtpSpecialSource *self = FS_RTP_SPECIAL_SOURCE (object);
-
-  switch (prop_id)
-  {
-    case PROP_BIN:
-      g_value_set_object (value, self->priv->outer_bin);
-      break;
-    case PROP_RTPMUXER:
-      g_value_set_object (value, self->priv->rtpmuxer);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-
 static GList*
 fs_rtp_special_source_class_add_blueprint (FsRtpSpecialSourceClass *klass,
     GList *blueprints)
@@ -588,13 +511,13 @@ fs_rtp_special_source_new (FsRtpSpecialSourceClass *klass,
   g_return_val_if_fail (GST_IS_ELEMENT (rtpmuxer), NULL);
 
   source = g_object_new (G_OBJECT_CLASS_TYPE (klass),
-      "bin", bin,
-      "rtpmuxer", rtpmuxer,
       NULL);
   g_return_val_if_fail (source, NULL);
 
   g_mutex_lock (mutex);
 
+  source->priv->rtpmuxer = gst_object_ref (rtpmuxer);
+  source->priv->outer_bin = gst_object_ref (bin);
   source->priv->src = klass->build (source, *negotiated_codecs, selected_codec);
 
   g_mutex_unlock (mutex);
-- 
1.5.6.5




More information about the farsight-commits mailing list