[farsight2/master] Move the nice thread into a nice agent object

Olivier Crête olivier.crete at collabora.co.uk
Tue Dec 23 15:26:27 PST 2008


---
 transmitters/nice/Makefile.am                  |    4 +-
 transmitters/nice/fs-nice-agent.c              |  308 ++++++++++++++++++++++++
 transmitters/nice/fs-nice-agent.h              |   98 ++++++++
 transmitters/nice/fs-nice-stream-transmitter.c |    2 +-
 transmitters/nice/fs-nice-thread.c             |  308 ------------------------
 transmitters/nice/fs-nice-thread.h             |   98 --------
 transmitters/nice/fs-nice-transmitter.c        |    2 +-
 7 files changed, 410 insertions(+), 410 deletions(-)
 create mode 100644 transmitters/nice/fs-nice-agent.c
 create mode 100644 transmitters/nice/fs-nice-agent.h
 delete mode 100644 transmitters/nice/fs-nice-thread.c
 delete mode 100644 transmitters/nice/fs-nice-thread.h

diff --git a/transmitters/nice/Makefile.am b/transmitters/nice/Makefile.am
index d7e9faf..e1e27d9 100644
--- a/transmitters/nice/Makefile.am
+++ b/transmitters/nice/Makefile.am
@@ -7,7 +7,7 @@ plugin_LTLIBRARIES = libnice-transmitter.la
 libnice_transmitter_la_SOURCES = \
 	fs-nice-transmitter.c \
 	fs-nice-stream-transmitter.c \
-	fs-nice-thread.c
+	fs-nice-agent.c
 
 # flags used to compile this plugin
 libnice_transmitter_la_CFLAGS = $(FS2_INTERNAL_CFLAGS) $(FS2_CFLAGS) \
@@ -20,4 +20,4 @@ libnice_transmitter_la_LIBADD = \
 noinst_HEADERS = \
 	fs-nice-transmitter.h \
 	fs-nice-stream-transmitter.h \
-	fs-nice-thread.h
+	fs-nice-agent.h
diff --git a/transmitters/nice/fs-nice-agent.c b/transmitters/nice/fs-nice-agent.c
new file mode 100644
index 0000000..45d32e5
--- /dev/null
+++ b/transmitters/nice/fs-nice-agent.c
@@ -0,0 +1,308 @@
+/*
+ * Farsight2 - Farsight libnice Transmitter thread object
+ *
+ * Copyright 2007-2008 Collabora Ltd.
+ *  @author: Olivier Crete <olivier.crete at collabora.co.uk>
+ * Copyright 2007-2008 Nokia Corp.
+ *
+ * fs-nice-thread.c - A Farsight libnice transmitter thread object
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
+/**
+ * SECTION:fs-nice-thread
+ * @short_description: A transmitter for threads for libnice
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "fs-nice-transmitter.h"
+#include "fs-nice-agent.h"
+
+#include <nice/nice.h>
+
+#include <string.h>
+#include <sys/types.h>
+
+#define GST_CAT_DEFAULT fs_nice_transmitter_debug
+
+/* Signals */
+enum
+{
+  LAST_SIGNAL
+};
+
+/* props */
+enum
+{
+  PROP_0,
+  PROP_COMPATIBILITY_MODE
+};
+
+struct _FsNiceThreadPrivate
+{
+  GMainContext *main_context;
+  GMainLoop *main_loop;
+
+  guint compatibility_mode;
+
+  NiceUDPSocketFactory udpfactory;
+
+
+  GMutex *mutex;
+
+  /* Everything below is protected by the mutex */
+
+  GThread *thread;
+};
+
+#define FS_NICE_THREAD_GET_PRIVATE(o)  \
+  (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_NICE_THREAD, \
+    FsNiceThreadPrivate))
+
+
+#define FS_NICE_THREAD_LOCK(o)   g_mutex_lock ((o)->priv->mutex)
+#define FS_NICE_THREAD_UNLOCK(o) g_mutex_unlock ((o)->priv->mutex)
+
+static void fs_nice_thread_class_init (
+    FsNiceThreadClass *klass);
+static void fs_nice_thread_init (FsNiceThread *self);
+static void fs_nice_thread_finalize (GObject *object);
+static void fs_nice_thread_stop_thread (FsNiceThread *self);
+
+static void
+fs_nice_thread_set_property (GObject *object,
+    guint prop_id,
+    const GValue *value,
+    GParamSpec *pspec);
+
+
+static GObjectClass *parent_class = NULL;
+
+
+/*
+ * Lets register the plugin
+ */
+
+static GType type = 0;
+
+GType
+fs_nice_thread_get_type (void)
+{
+  g_assert (type);
+  return type;
+}
+
+GType
+fs_nice_thread_register_type (FsPlugin *module)
+{
+  static const GTypeInfo info = {
+    sizeof (FsNiceThreadClass),
+    NULL,
+    NULL,
+    (GClassInitFunc) fs_nice_thread_class_init,
+    NULL,
+    NULL,
+    sizeof (FsNiceThread),
+    0,
+    (GInstanceInitFunc) fs_nice_thread_init
+  };
+
+  type = g_type_module_register_type (G_TYPE_MODULE (module),
+      G_TYPE_OBJECT, "FsNiceThread", &info, 0);
+
+  return type;
+}
+
+static void
+fs_nice_thread_class_init (FsNiceThreadClass *klass)
+{
+  GObjectClass *gobject_class = (GObjectClass *) klass;
+
+  parent_class = g_type_class_peek_parent (klass);
+
+  gobject_class->set_property = fs_nice_thread_set_property;
+  gobject_class->finalize = fs_nice_thread_finalize;
+
+  g_type_class_add_private (klass, sizeof (FsNiceThreadPrivate));
+
+  g_object_class_install_property (gobject_class, PROP_COMPATIBILITY_MODE,
+      g_param_spec_uint (
+          "compatibility-mode",
+          "The compability-mode",
+          "The id of the stream according to libnice",
+          NICE_COMPATIBILITY_ID19, NICE_COMPATIBILITY_LAST,
+          NICE_COMPATIBILITY_ID19,
+          G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+fs_nice_thread_init (FsNiceThread *self)
+{
+
+  /* member init */
+  self->priv = FS_NICE_THREAD_GET_PRIVATE (self);
+
+  nice_udp_bsd_socket_factory_init (&self->priv->udpfactory);
+
+  self->priv->mutex = g_mutex_new ();
+
+  self->priv->main_context = g_main_context_new ();
+  self->priv->main_loop = g_main_loop_new (self->priv->main_context, FALSE);
+
+  self->priv->compatibility_mode = NICE_COMPATIBILITY_ID19;
+}
+
+static void
+fs_nice_thread_finalize (GObject *object)
+{
+  FsNiceThread *self = FS_NICE_THREAD (object);
+
+  fs_nice_thread_stop_thread (self);
+
+  if (self->priv->main_context)
+  {
+    g_main_context_unref (self->priv->main_context);
+    self->priv->main_context = NULL;
+  }
+
+  if (self->priv->main_loop)
+  {
+    g_main_loop_unref (self->priv->main_loop);
+    self->priv->main_loop = NULL;
+  }
+
+  g_mutex_free (self->priv->mutex);
+
+  nice_udp_socket_factory_close (&self->priv->udpfactory);
+
+  parent_class->finalize (object);
+}
+
+static void
+fs_nice_thread_set_property (GObject *object,
+    guint prop_id,
+    const GValue *value,
+    GParamSpec *pspec)
+{
+  FsNiceThread *self = FS_NICE_THREAD (object);
+
+  switch (prop_id)
+  {
+    case PROP_COMPATIBILITY_MODE:
+      self->priv->compatibility_mode = g_value_get_uint (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+
+
+static gboolean
+thread_unlock_idler (gpointer data)
+{
+  FsNiceThread *self = FS_NICE_THREAD (data);
+
+  g_main_loop_quit (self->priv->main_loop);
+
+  return TRUE;
+}
+
+static void
+fs_nice_thread_stop_thread (FsNiceThread *self)
+{
+  GSource *idle_source;
+
+  FS_NICE_THREAD_LOCK(self);
+
+  if (self->priv->thread == NULL)
+  {
+    FS_NICE_THREAD_UNLOCK (self);
+    return;
+  }
+  FS_NICE_THREAD_UNLOCK (self);
+
+  g_main_loop_quit (self->priv->main_loop);
+
+  idle_source = g_idle_source_new ();
+  g_source_set_priority (idle_source, G_PRIORITY_HIGH);
+  g_source_set_callback (idle_source, thread_unlock_idler, self, NULL);
+  g_source_attach (idle_source, self->priv->main_context);
+
+  g_thread_join (self->priv->thread);
+
+  g_source_destroy (idle_source);
+  g_source_unref (idle_source);
+
+  FS_NICE_THREAD_LOCK (self);
+  self->priv->thread = NULL;
+  FS_NICE_THREAD_UNLOCK (self);
+}
+
+GMainContext *
+fs_nice_thread_get_context (FsNiceThread *self)
+{
+  return self->priv->main_context;
+}
+
+
+void
+fs_nice_thread_add_weak_object (FsNiceThread *self,
+    GObject *object)
+{
+  g_object_weak_ref (G_OBJECT (object), (GWeakNotify) g_object_unref, self);
+
+  g_object_ref (self);
+}
+
+
+
+static gpointer
+fs_nice_thread_main_thread (gpointer data)
+{
+  FsNiceThread *self = FS_NICE_THREAD (data);
+
+  g_main_loop_run (self->priv->main_loop);
+
+  return NULL;
+}
+
+FsNiceThread *
+fs_nice_thread_new (GError **error)
+{
+  FsNiceThread *self = NULL;
+
+  self = g_object_new (FS_TYPE_NICE_THREAD, NULL);
+
+  FS_NICE_THREAD_LOCK (self);
+  self->priv->thread = g_thread_create (fs_nice_thread_main_thread,
+      self, TRUE, error);
+
+  if (!self->priv->thread)
+  {
+    FS_NICE_THREAD_UNLOCK (self);
+    g_object_unref (self);
+    return NULL;
+  }
+  FS_NICE_THREAD_UNLOCK (self);
+
+  return self;
+}
diff --git a/transmitters/nice/fs-nice-agent.h b/transmitters/nice/fs-nice-agent.h
new file mode 100644
index 0000000..e858fb5
--- /dev/null
+++ b/transmitters/nice/fs-nice-agent.h
@@ -0,0 +1,98 @@
+/*
+ * Farsight2 - Farsight libnice Transmitter thread object
+ *
+ * Copyright 2007-2008 Collabora Ltd.
+ *  @author: Olivier Crete <olivier.crete at collabora.co.uk>
+ * Copyright 2007-2008 Nokia Corp.
+ *
+ * fs-nice-thread.h - A Farsight libnice transmitter thread object
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
+#ifndef __FS_NICE_THREAD_H__
+#define __FS_NICE_THREAD_H__
+
+#include <glib-object.h>
+#include <gst-libs/gst/farsight/fs-plugin.h>
+
+
+G_BEGIN_DECLS
+
+/* TYPE MACROS */
+#define FS_TYPE_NICE_THREAD \
+  (fs_nice_thread_get_type ())
+#define FS_NICE_THREAD(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_NICE_THREAD, \
+    FsNiceThread))
+#define FS_NICE_THREAD_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_NICE_THREAD, \
+    FsNiceThreadClass))
+#define FS_IS_NICE_THREAD(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_NICE_THREAD))
+#define FS_IS_NICE_THREAD_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_NICE_THREAD))
+#define FS_NICE_THREAD_GET_CLASS(obj) \
+  (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_NICE_THREAD, \
+    FsNiceThreadClass))
+#define FS_NICE_THREAD_CAST(obj) ((FsNiceThread *) (obj))
+
+typedef struct _FsNiceThread FsNiceThread;
+typedef struct _FsNiceThreadClass FsNiceThreadClass;
+typedef struct _FsNiceThreadPrivate FsNiceThreadPrivate;
+
+/**
+ * FsNiceThreadClass:
+ * @parent_class: Our parent
+ *
+ * The class structure
+ */
+
+struct _FsNiceThreadClass
+{
+  GObjectClass parent_class;
+};
+
+/**
+ * FsNiceThread:
+ *
+ * All members are private, access them using methods and properties
+ */
+struct _FsNiceThread
+{
+  GObject parent;
+
+  /*< private >*/
+  FsNiceThreadPrivate *priv;
+};
+
+
+GType fs_nice_thread_get_type (void);
+
+GMainContext *
+fs_nice_thread_get_context (FsNiceThread *self);
+
+void fs_nice_thread_add_weak_object (FsNiceThread *self,
+    GObject *object);
+
+FsNiceThread *fs_nice_thread_new (GError **error);
+
+
+GType
+fs_nice_thread_register_type (FsPlugin *module);
+
+G_END_DECLS
+
+#endif /* __FS_NICE_THREAD_H__ */
diff --git a/transmitters/nice/fs-nice-stream-transmitter.c b/transmitters/nice/fs-nice-stream-transmitter.c
index cd5891e..a1e3dca 100644
--- a/transmitters/nice/fs-nice-stream-transmitter.c
+++ b/transmitters/nice/fs-nice-stream-transmitter.c
@@ -36,7 +36,7 @@
 
 #include "fs-nice-stream-transmitter.h"
 #include "fs-nice-transmitter.h"
-#include "fs-nice-thread.h"
+#include "fs-nice-agent.h"
 
 #include <gst/farsight/fs-conference-iface.h>
 #include <gst/farsight/fs-interfaces.h>
diff --git a/transmitters/nice/fs-nice-thread.c b/transmitters/nice/fs-nice-thread.c
deleted file mode 100644
index 99ebd88..0000000
--- a/transmitters/nice/fs-nice-thread.c
+++ /dev/null
@@ -1,308 +0,0 @@
-/*
- * Farsight2 - Farsight libnice Transmitter thread object
- *
- * Copyright 2007-2008 Collabora Ltd.
- *  @author: Olivier Crete <olivier.crete at collabora.co.uk>
- * Copyright 2007-2008 Nokia Corp.
- *
- * fs-nice-thread.c - A Farsight libnice transmitter thread object
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
- */
-
-/**
- * SECTION:fs-nice-thread
- * @short_description: A transmitter for threads for libnice
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "fs-nice-transmitter.h"
-#include "fs-nice-thread.h"
-
-#include <nice/nice.h>
-
-#include <string.h>
-#include <sys/types.h>
-
-#define GST_CAT_DEFAULT fs_nice_transmitter_debug
-
-/* Signals */
-enum
-{
-  LAST_SIGNAL
-};
-
-/* props */
-enum
-{
-  PROP_0,
-  PROP_COMPATIBILITY_MODE
-};
-
-struct _FsNiceThreadPrivate
-{
-  GMainContext *main_context;
-  GMainLoop *main_loop;
-
-  guint compatibility_mode;
-
-  NiceUDPSocketFactory udpfactory;
-
-
-  GMutex *mutex;
-
-  /* Everything below is protected by the mutex */
-
-  GThread *thread;
-};
-
-#define FS_NICE_THREAD_GET_PRIVATE(o)  \
-  (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_NICE_THREAD, \
-    FsNiceThreadPrivate))
-
-
-#define FS_NICE_THREAD_LOCK(o)   g_mutex_lock ((o)->priv->mutex)
-#define FS_NICE_THREAD_UNLOCK(o) g_mutex_unlock ((o)->priv->mutex)
-
-static void fs_nice_thread_class_init (
-    FsNiceThreadClass *klass);
-static void fs_nice_thread_init (FsNiceThread *self);
-static void fs_nice_thread_finalize (GObject *object);
-static void fs_nice_thread_stop_thread (FsNiceThread *self);
-
-static void
-fs_nice_thread_set_property (GObject *object,
-    guint prop_id,
-    const GValue *value,
-    GParamSpec *pspec);
-
-
-static GObjectClass *parent_class = NULL;
-
-
-/*
- * Lets register the plugin
- */
-
-static GType type = 0;
-
-GType
-fs_nice_thread_get_type (void)
-{
-  g_assert (type);
-  return type;
-}
-
-GType
-fs_nice_thread_register_type (FsPlugin *module)
-{
-  static const GTypeInfo info = {
-    sizeof (FsNiceThreadClass),
-    NULL,
-    NULL,
-    (GClassInitFunc) fs_nice_thread_class_init,
-    NULL,
-    NULL,
-    sizeof (FsNiceThread),
-    0,
-    (GInstanceInitFunc) fs_nice_thread_init
-  };
-
-  type = g_type_module_register_type (G_TYPE_MODULE (module),
-      G_TYPE_OBJECT, "FsNiceThread", &info, 0);
-
-  return type;
-}
-
-static void
-fs_nice_thread_class_init (FsNiceThreadClass *klass)
-{
-  GObjectClass *gobject_class = (GObjectClass *) klass;
-
-  parent_class = g_type_class_peek_parent (klass);
-
-  gobject_class->set_property = fs_nice_thread_set_property;
-  gobject_class->finalize = fs_nice_thread_finalize;
-
-  g_type_class_add_private (klass, sizeof (FsNiceThreadPrivate));
-
-  g_object_class_install_property (gobject_class, PROP_COMPATIBILITY_MODE,
-      g_param_spec_uint (
-          "compatibility-mode",
-          "The compability-mode",
-          "The id of the stream according to libnice",
-          NICE_COMPATIBILITY_ID19, NICE_COMPATIBILITY_LAST,
-          NICE_COMPATIBILITY_ID19,
-          G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
-}
-
-static void
-fs_nice_thread_init (FsNiceThread *self)
-{
-
-  /* member init */
-  self->priv = FS_NICE_THREAD_GET_PRIVATE (self);
-
-  nice_udp_bsd_socket_factory_init (&self->priv->udpfactory);
-
-  self->priv->mutex = g_mutex_new ();
-
-  self->priv->main_context = g_main_context_new ();
-  self->priv->main_loop = g_main_loop_new (self->priv->main_context, FALSE);
-
-  self->priv->compatibility_mode = NICE_COMPATIBILITY_ID19;
-}
-
-static void
-fs_nice_thread_finalize (GObject *object)
-{
-  FsNiceThread *self = FS_NICE_THREAD (object);
-
-  fs_nice_thread_stop_thread (self);
-
-  if (self->priv->main_context)
-  {
-    g_main_context_unref (self->priv->main_context);
-    self->priv->main_context = NULL;
-  }
-
-  if (self->priv->main_loop)
-  {
-    g_main_loop_unref (self->priv->main_loop);
-    self->priv->main_loop = NULL;
-  }
-
-  g_mutex_free (self->priv->mutex);
-
-  nice_udp_socket_factory_close (&self->priv->udpfactory);
-
-  parent_class->finalize (object);
-}
-
-static void
-fs_nice_thread_set_property (GObject *object,
-    guint prop_id,
-    const GValue *value,
-    GParamSpec *pspec)
-{
-  FsNiceThread *self = FS_NICE_THREAD (object);
-
-  switch (prop_id)
-  {
-    case PROP_COMPATIBILITY_MODE:
-      self->priv->compatibility_mode = g_value_get_uint (value);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
-
-
-static gboolean
-thread_unlock_idler (gpointer data)
-{
-  FsNiceThread *self = FS_NICE_THREAD (data);
-
-  g_main_loop_quit (self->priv->main_loop);
-
-  return TRUE;
-}
-
-static void
-fs_nice_thread_stop_thread (FsNiceThread *self)
-{
-  GSource *idle_source;
-
-  FS_NICE_THREAD_LOCK(self);
-
-  if (self->priv->thread == NULL)
-  {
-    FS_NICE_THREAD_UNLOCK (self);
-    return;
-  }
-  FS_NICE_THREAD_UNLOCK (self);
-
-  g_main_loop_quit (self->priv->main_loop);
-
-  idle_source = g_idle_source_new ();
-  g_source_set_priority (idle_source, G_PRIORITY_HIGH);
-  g_source_set_callback (idle_source, thread_unlock_idler, self, NULL);
-  g_source_attach (idle_source, self->priv->main_context);
-
-  g_thread_join (self->priv->thread);
-
-  g_source_destroy (idle_source);
-  g_source_unref (idle_source);
-
-  FS_NICE_THREAD_LOCK (self);
-  self->priv->thread = NULL;
-  FS_NICE_THREAD_UNLOCK (self);
-}
-
-GMainContext *
-fs_nice_thread_get_context (FsNiceThread *self)
-{
-  return self->priv->main_context;
-}
-
-
-void
-fs_nice_thread_add_weak_object (FsNiceThread *self,
-    GObject *object)
-{
-  g_object_weak_ref (G_OBJECT (object), (GWeakNotify) g_object_unref, self);
-
-  g_object_ref (self);
-}
-
-
-
-static gpointer
-fs_nice_thread_main_thread (gpointer data)
-{
-  FsNiceThread *self = FS_NICE_THREAD (data);
-
-  g_main_loop_run (self->priv->main_loop);
-
-  return NULL;
-}
-
-FsNiceThread *
-fs_nice_thread_new (GError **error)
-{
-  FsNiceThread *self = NULL;
-
-  self = g_object_new (FS_TYPE_NICE_THREAD, NULL);
-
-  FS_NICE_THREAD_LOCK (self);
-  self->priv->thread = g_thread_create (fs_nice_thread_main_thread,
-      self, TRUE, error);
-
-  if (!self->priv->thread)
-  {
-    FS_NICE_THREAD_UNLOCK (self);
-    g_object_unref (self);
-    return NULL;
-  }
-  FS_NICE_THREAD_UNLOCK (self);
-
-  return self;
-}
diff --git a/transmitters/nice/fs-nice-thread.h b/transmitters/nice/fs-nice-thread.h
deleted file mode 100644
index e858fb5..0000000
--- a/transmitters/nice/fs-nice-thread.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Farsight2 - Farsight libnice Transmitter thread object
- *
- * Copyright 2007-2008 Collabora Ltd.
- *  @author: Olivier Crete <olivier.crete at collabora.co.uk>
- * Copyright 2007-2008 Nokia Corp.
- *
- * fs-nice-thread.h - A Farsight libnice transmitter thread object
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
- */
-
-#ifndef __FS_NICE_THREAD_H__
-#define __FS_NICE_THREAD_H__
-
-#include <glib-object.h>
-#include <gst-libs/gst/farsight/fs-plugin.h>
-
-
-G_BEGIN_DECLS
-
-/* TYPE MACROS */
-#define FS_TYPE_NICE_THREAD \
-  (fs_nice_thread_get_type ())
-#define FS_NICE_THREAD(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_NICE_THREAD, \
-    FsNiceThread))
-#define FS_NICE_THREAD_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_NICE_THREAD, \
-    FsNiceThreadClass))
-#define FS_IS_NICE_THREAD(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_NICE_THREAD))
-#define FS_IS_NICE_THREAD_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_NICE_THREAD))
-#define FS_NICE_THREAD_GET_CLASS(obj) \
-  (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_NICE_THREAD, \
-    FsNiceThreadClass))
-#define FS_NICE_THREAD_CAST(obj) ((FsNiceThread *) (obj))
-
-typedef struct _FsNiceThread FsNiceThread;
-typedef struct _FsNiceThreadClass FsNiceThreadClass;
-typedef struct _FsNiceThreadPrivate FsNiceThreadPrivate;
-
-/**
- * FsNiceThreadClass:
- * @parent_class: Our parent
- *
- * The class structure
- */
-
-struct _FsNiceThreadClass
-{
-  GObjectClass parent_class;
-};
-
-/**
- * FsNiceThread:
- *
- * All members are private, access them using methods and properties
- */
-struct _FsNiceThread
-{
-  GObject parent;
-
-  /*< private >*/
-  FsNiceThreadPrivate *priv;
-};
-
-
-GType fs_nice_thread_get_type (void);
-
-GMainContext *
-fs_nice_thread_get_context (FsNiceThread *self);
-
-void fs_nice_thread_add_weak_object (FsNiceThread *self,
-    GObject *object);
-
-FsNiceThread *fs_nice_thread_new (GError **error);
-
-
-GType
-fs_nice_thread_register_type (FsPlugin *module);
-
-G_END_DECLS
-
-#endif /* __FS_NICE_THREAD_H__ */
diff --git a/transmitters/nice/fs-nice-transmitter.c b/transmitters/nice/fs-nice-transmitter.c
index f9ee032..0cdf95a 100644
--- a/transmitters/nice/fs-nice-transmitter.c
+++ b/transmitters/nice/fs-nice-transmitter.c
@@ -37,7 +37,7 @@
 
 #include "fs-nice-transmitter.h"
 #include "fs-nice-stream-transmitter.h"
-#include "fs-nice-thread.h"
+#include "fs-nice-agent.h"
 
 #include <gst/farsight/fs-conference-iface.h>
 #include <gst/farsight/fs-plugin.h>
-- 
1.5.6.5




More information about the farsight-commits mailing list