[farsight2/master] Add empty FsRtpConference

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


---
 gst/fsrtpconference/Makefile.am          |    4 +-
 gst/fsrtpconference/fs-rtp-conference.c  |  222 ++++++++++++++++++++++++++++++
 gst/fsrtpconference/fs-rtp-conference.h  |   76 ++++++++++
 3 files changed, 300 insertions(+), 2 deletions(-)
 create mode 100644 gst/fsrtpconference/fs-rtp-conference.c
 create mode 100644 gst/fsrtpconference/fs-rtp-conference.h
 delete mode 100644 gst/fsrtpconference/gstfsrtpconference.c
 delete mode 100644 gst/fsrtpconference/gstfsrtpconference.h

diff --git a/gst/fsrtpconference/Makefile.am b/gst/fsrtpconference/Makefile.am
index 963fe9a..771b8e8 100644
--- a/gst/fsrtpconference/Makefile.am
+++ b/gst/fsrtpconference/Makefile.am
@@ -1,8 +1,8 @@
 plugin_LTLIBRARIES = libfsrtpconference.la
 
-libfsrtpconference_la_SOURCES = fsrtpconference.c
+libfsrtpconference_la_SOURCES = fs-rtp-conference.c
 libfsrtpconference_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
 libfsrtpconference_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libfsrtpconference_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS)
 
-noinst_HEADERS = fsrtpconference.h
+noinst_HEADERS = fs-rtp-conference.h
diff --git a/gst/fsrtpconference/fs-rtp-conference.c b/gst/fsrtpconference/fs-rtp-conference.c
new file mode 100644
index 0000000..4a25809
--- /dev/null
+++ b/gst/fsrtpconference/fs-rtp-conference.c
@@ -0,0 +1,222 @@
+/*
+ * Farsight2 - Farsight RTP Conference Implementation
+ *
+ * Copyright 2007 Collabora Ltd.
+ *  @author: Olivier Crete <olivier.crete at collabora.co.uk>
+ * Copyright 2007 Nokia Corp.
+ *
+ * fs-rtp-conference.c - RTP implementation for Farsight Conference Gstreamer
+ *                       Elements
+ *
+ * This program 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 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+/**
+ * SECTION:fs-rtp-conference
+ * @short_description: FarsightRTP Conference Gstreamer Elements
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "fs-rtp-conference.h"
+
+GST_DEBUG_CATEGORY_STATIC (fs_rtp_conference_debug);
+#define GST_CAT_DEFAULT fs_rtp_conference_debug
+
+/* Signals */
+enum
+{
+  LAST_SIGNAL
+};
+
+/* Properties */
+enum
+{
+  PROP_0
+};
+
+#define FS_RTP_CONFERENCE_GET_PRIVATE(obj) \
+  (G_TYPE_INSTANCE_GET_PRIVATE ((obj), FS_TYPE_RTP_CONFERENCE, FsRtpConferencePrivate))
+
+struct _FsRtpConferencePrivate
+{
+};
+
+static GstElementClass *parent_class = NULL;
+
+static void fs_rtp_conference_base_init (gpointer g_class);
+static void fs_rtp_conference_class_init (FsRtpConferenceClass *klass);
+static void fs_rtp_conference_init (FsRtpConference *conf,
+                                     FsRtpConferenceClass *klass);
+static void fs_rtp_conference_implements_interface_init (
+    GstImplementsInterfaceClass * klass);
+
+GType
+fs_rtp_conference_get_type (void)
+{
+  static GType rtp_conference_type = 0;
+
+  if (!rtp_conference_type) {
+    static const GTypeInfo rtp_conference_info = {
+      sizeof (FsRtpConferenceClass),
+      (GRtpInitFunc) fs_rtp_conference_base_init,
+      NULL,
+      (GClassInitFunc) fs_rtp_conference_class_init,
+      NULL,
+      NULL,
+      sizeof (FsRtpConference),
+      0,
+      (GInstanceInitFunc) fs_rtp_conference_init,
+    };
+
+
+    rtp_conference_type = g_type_register_static (FS_BASE_CONFERENCE,
+        "FsRtpConference", &rtp_conference_info, 0);
+
+  return rtp_conference_type;
+}
+
+static void fs_rtp_conference_finalize (GObject *object);
+static void fs_rtp_conference_set_property (GObject *object, guint prop_id,
+                                             const GValue *value,
+                                             GParamSpec *pspec);
+static void fs_rtp_conference_get_property (GObject *object, guint prop_id,
+                                             GValue *value, GParamSpec *pspec);
+
+static FsSession *fs_rtp_conference_new_session (FsBaseConference *conf,
+                                                 FsMediaType media_type);
+static FsParticipant *fs_rtp_conference_new_participant (FsBaseConference *conf,
+                                                         gchar *cname);
+
+
+static void
+fs_rtp_conference_rtp_init (gpointer g_class)
+{
+  GST_DEBUG_CATEGORY_INIT (fs_rtp_conference_debug, "fsrtpconference", 0,
+      "farsight rtp conference element");
+}
+
+static void
+fs_rtp_conference_finalize (GObject * object)
+{
+  FsRtpConference *conf = FS_RTP_CONFERENCE (object);
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+fs_rtp_conference_class_init (FsRtpConferenceClass * klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+  g_type_class_add_private (klass, sizeof (FsRtpConferencePrivate));
+
+  parent_class = g_type_class_peek_parent (klass);
+
+  parent_class->new_session = fs_rtp_conference_new_session;
+  parent_class->new_participant = fs_rtp_conference_new_participant;
+
+
+  gobject_class->set_property =
+      GST_DEBUG_FUNCPTR (fs_rtp_conference_set_property);
+  gobject_class->get_property =
+      GST_DEBUG_FUNCPTR (fs_rtp_conference_get_property);
+
+  gobject_class->finalize = GST_DEBUG_FUNCPTR (fs_rtp_conference_finalize);
+}
+
+static void
+fs_rtp_conference_init (FsRtpConference *conf,
+    FsRtpConferenceClass *bclass)
+{
+  GstPadTemplate *pad_template;
+
+  GST_DEBUG ("fs_rtp_conference_init");
+
+  conf->priv = FS_RTP_CONFERENCE_GET_PRIVATE (conf);
+
+  conf->priv->session_list = g_ptr_array_new();
+}
+
+static GstCaps *
+fs_rtp_conference_getcaps (GstPad * pad)
+{
+  FsRtpConference *conf;
+  GstPad *otherpad;
+  GstCaps *caps;
+
+  conf = FS_RTP_CONFERENCE (gst_pad_get_parent (pad));
+
+  //otherpad = (pad == conf->srcpad) ? conf->sinkpad : trans->srcpad;
+
+  return caps;
+}
+
+/* called when new caps arrive on the sink or source pad */
+static gboolean
+fs_rtp_conference_setcaps (GstPad * pad, GstCaps * caps)
+{
+}
+
+void _remove_session_ptr (FsRtpConference *conf, FsSession *session)
+{
+  if (!g_ptr_array_remove (conf->priv->session_list, session))
+  {
+    GST_WARNING_OBJECT (conf, "FsSession not found in session ptr array");
+  }
+}
+
+static void
+fs_rtp_conference_set_property (GObject *object, guint prop_id,
+                                 const GValue *value,
+                                 GParamSpec *pspec)
+{
+}
+
+static void
+fs_rtp_conference_get_property (GObject *object, guint prop_id,
+                                 GValue *value, GParamSpec *pspec)
+{
+}
+
+
+static FsSession *
+fs_rtp_conference_new_session (FsBaseConference *conf,
+                                 FsMediaType media_type)
+{
+  FsRtpConference *rtp_conf = FS_RTP_CONFERENCE (conf);
+
+  FsSession *new_session = NULL;
+
+
+  return new_session;
+}
+
+
+
+static FsParticipant *
+fs_rtp_conference_new_participant (FsBaseConference *conf,
+                                   gchar *cname)
+{
+  FsRtpConference *rtp_conf = FS_RTP_CONFERENCE (conf);
+
+  FsParticipant *new_participant = NULL;
+
+
+  return new_participant;
+}
diff --git a/gst/fsrtpconference/fs-rtp-conference.h b/gst/fsrtpconference/fs-rtp-conference.h
new file mode 100644
index 0000000..9edfd3b
--- /dev/null
+++ b/gst/fsrtpconference/fs-rtp-conference.h
@@ -0,0 +1,76 @@
+/*
+ * Farsight2 - Farsight RTP Conference Implementation
+ *
+ * Copyright 2007 Collabora Ltd.
+ *  @author: Olivier Crete <olivier.crete at collabora.co.uk>
+ * Copyright 2007 Nokia Corp.
+ *
+ * gstfsrtpconference.h - RTP implementation for Farsight Conference Gstreamer
+ *                        Elements
+ *
+ * This program 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 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef __FS_RTP_CONFERENCE_H__
+#define __FS_RTP_CONFERENCE_H__
+
+#include <gst/farsight/fs-base-conference.h>
+
+G_BEGIN_DECLS
+
+#define FS_TYPE_RTP_CONFERENCE \
+  (fs_rtp_conference_get_type())
+#define FS_RTP_CONFERENCE(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj),FS_TYPE_RTP_CONFERENCE,FsRtpConference))
+#define FS_RTP_CONFERENCE_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass),FS_TYPE_RTP_CONFERENCE,FsRtpConferenceClass))
+#define FS_RTP_CONFERENCE_GET_CLASS(obj) \
+  (G_TYPE_INSTANCE_GET_CLASS((obj),FS_TYPE_RTP_CONFERENCE,FsRtpConferenceClass))
+#define GST_IS_RTP_TRANSFORM(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj),FS_TYPE_RTP_CONFERENCE))
+#define GST_IS_RTP_TRANSFORM_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass),FS_TYPE_RTP_CONFERENCE))
+/* since 0.10.4 */
+#define FS_RTP_CONFERENCE_CAST(obj) \
+  ((FsRtpConference *)(obj))
+
+typedef struct _FsRtpConference FsRtpConference;
+typedef struct _FsRtpConferenceClass FsRtpConferenceClass;
+typedef struct _FsRtpConferencePrivate FsRtpConferencePrivate;
+
+struct _FsRtpConference
+{
+  FsBaseConference parent;
+  FsRtpConferencePrivate *priv;
+
+  /*< private >*/
+
+  gpointer _padding[8];
+};
+
+struct _FsRtpConferenceClass
+{
+  FsBaseConfereneClass parent_class;
+
+  /*< public >*/
+
+  gpointer _padding[8];
+};
+
+GType fs_rtp_conference_get_type(void);
+
+G_END_DECLS
+
+#endif /* __FS_RTP_CONFERENCE_H__ */
diff --git a/gst/fsrtpconference/gstfsrtpconference.c b/gst/fsrtpconference/gstfsrtpconference.c
deleted file mode 100644
index e69de29..0000000
diff --git a/gst/fsrtpconference/gstfsrtpconference.h b/gst/fsrtpconference/gstfsrtpconference.h
deleted file mode 100644
index e69de29..0000000
-- 
1.5.6.5




More information about the farsight-commits mailing list