[farsight2/master] Add special codecs to buildables

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


---
 gst/fsrtpconference/Makefile.am            |    7 ++-
 gst/fsrtpconference/fs-rtp-special-codec.c |   96 ++++++++++++++++++++++++++++
 gst/fsrtpconference/fs-rtp-special-codec.h |    3 +-
 3 files changed, 102 insertions(+), 4 deletions(-)
 create mode 100644 gst/fsrtpconference/fs-rtp-special-codec.c

diff --git a/gst/fsrtpconference/Makefile.am b/gst/fsrtpconference/Makefile.am
index fee5bd4..003cb0a 100644
--- a/gst/fsrtpconference/Makefile.am
+++ b/gst/fsrtpconference/Makefile.am
@@ -9,7 +9,9 @@ libfsrtpconference_la_SOURCES = gstfsrtpconference.c \
 	fs-rtp-discover-codecs.c \
 	fs-rtp-codec-cache.c \
 	fs-rtp-codec-negotiation.c \
-	fs-rtp-specific-nego.c
+	fs-rtp-specific-nego.c \
+	fs-rtp-special-codec.c
+
 libfsrtpconference_la_CFLAGS = $(FS2_INTERNAL_CFLAGS) $(FS2_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
 libfsrtpconference_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libfsrtpconference_la_LIBADD = \
@@ -26,4 +28,5 @@ noinst_HEADERS = \
 	fs-rtp-discover-codecs.h \
 	fs-rtp-codec-cache.h \
 	fs-rtp-codec-negotiation.h \
-	fs-rtp-specific-nego.h
+	fs-rtp-specific-nego.h \
+	fs-rtp-special-codec.h
diff --git a/gst/fsrtpconference/fs-rtp-special-codec.c b/gst/fsrtpconference/fs-rtp-special-codec.c
new file mode 100644
index 0000000..41e7ef3
--- /dev/null
+++ b/gst/fsrtpconference/fs-rtp-special-codec.c
@@ -0,0 +1,96 @@
+/*
+ * Farsight2 - Farsight RTP Special Codec
+ *
+ * Copyright 2007 Collabora Ltd.
+ *  @author: Olivier Crete <olivier.crete at collabora.co.uk>
+ * Copyright 2007 Nokia Corp.
+ *
+ * fs-rtp-substream.c - A Farsight RTP Substream gobject
+ *
+ * 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
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "fs-rtp-special-codec.h"
+
+#define GST_CAT_DEFAULT fsrtpconference_debug
+
+/**
+ * SECTION:fs-rtp-special-codec
+ * @short_description: Base class to abstract how special codecs are handled
+ *
+ * This class defines how special codecs can be handled, it is the base
+ * for DMTF and CN sources.
+ *
+ */
+
+
+#define DEFAULT_NO_RTCP_TIMEOUT (7000)
+
+struct _FsRtpSpecialCodecPrivate {
+  gboolean disposed;
+};
+
+static GObjectClass *parent_class = NULL;
+
+static GList *classes = NULL;
+
+G_DEFINE_ABSTRACT_TYPE(FsRtpSpecialCodec, fs_rtp_special_codec, G_TYPE_OBJECT);
+
+#define FS_RTP_SPECIAL_CODEC_GET_PRIVATE(o)                                 \
+  (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_RTP_SPECIAL_CODEC,             \
+   FsRtpSpecialCodecPrivate))
+
+static void fs_rtp_special_codec_dispose (GObject *object);
+
+static void
+fs_rtp_special_codec_class_init (FsRtpSpecialCodecClass *klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+  parent_class = fs_rtp_special_codec_parent_class;
+
+  gobject_class->dispose = fs_rtp_special_codec_dispose;
+
+  if (!classes)
+  {
+    //classes = g_list_prepend (classes, fs_rtp_dtmf_source_get_class ());
+  }
+}
+
+
+static void
+fs_rtp_special_codec_init (FsRtpSpecialCodec *self)
+{
+  self->priv = FS_RTP_SPECIAL_CODEC_GET_PRIVATE (self);
+  self->priv->disposed = FALSE;
+}
+
+static void
+fs_rtp_special_codec_dispose (GObject *object)
+{
+  FsRtpSpecialCodec *self = FS_RTP_SPECIAL_CODEC (object);
+
+  if (self->priv->disposed)
+    return;
+
+  self->priv->disposed = TRUE;
+  G_OBJECT_CLASS (fs_rtp_special_codec_parent_class)->dispose (object);
+}
+
diff --git a/gst/fsrtpconference/fs-rtp-special-codec.h b/gst/fsrtpconference/fs-rtp-special-codec.h
index a1b76c0..eea10a7 100644
--- a/gst/fsrtpconference/fs-rtp-special-codec.h
+++ b/gst/fsrtpconference/fs-rtp-special-codec.h
@@ -26,7 +26,7 @@
 #ifndef __FS_RTP_SPECIAL_CODEC_H__
 #define __FS_RTP_SPECIAL_CODEC_H__
 
-#include <glib.h>
+#include <gst/gst.h>
 
 G_BEGIN_DECLS
 
@@ -82,7 +82,6 @@ fs_rtp_special_codecs_update (
 GList *
 fs_rtp_special_codecs_add_blueprints (GList *blueprints);
 
-
 G_END_DECLS
 
 #endif /* __FS_RTP_SPECIAL_CODEC_H__ */
-- 
1.5.6.5




More information about the farsight-commits mailing list