[farsight2/master] Add dtmf blueprints
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:21:36 PST 2008
---
gst/fsrtpconference/fs-rtp-discover-codecs.c | 5 +++++
gst/fsrtpconference/fs-rtp-special-source.c | 16 +++++++++++++++-
gst/fsrtpconference/fs-rtp-special-source.h | 5 +++++
tests/rtp/Makefile.am | 4 +++-
4 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/gst/fsrtpconference/fs-rtp-discover-codecs.c b/gst/fsrtpconference/fs-rtp-discover-codecs.c
index 435fb14..b106699 100644
--- a/gst/fsrtpconference/fs-rtp-discover-codecs.c
+++ b/gst/fsrtpconference/fs-rtp-discover-codecs.c
@@ -36,6 +36,7 @@
#include "fs-rtp-conference.h"
#include "fs-rtp-codec-cache.h"
+#include "fs-rtp-special-source.h"
#include <gst/farsight/fs-conference-iface.h>
@@ -311,6 +312,10 @@ create_codec_lists (FsMediaType media_type,
codec_cap_list_free (duplex_list);
+ fs_rtp_special_sources_init ();
+ list_codec_blueprints[media_type] =
+ fs_rtp_special_sources_add_blueprints (list_codec_blueprints[media_type]);
+
return TRUE;
}
diff --git a/gst/fsrtpconference/fs-rtp-special-source.c b/gst/fsrtpconference/fs-rtp-special-source.c
index c223854..33eb2bc 100644
--- a/gst/fsrtpconference/fs-rtp-special-source.c
+++ b/gst/fsrtpconference/fs-rtp-special-source.c
@@ -29,6 +29,8 @@
#include <gst/farsight/fs-base-conference.h>
+#include "fs-rtp-conference.h"
+
#include "fs-rtp-special-source.h"
#include "fs-rtp-dtmf-event-source.h"
@@ -81,11 +83,20 @@ fs_rtp_special_source_class_init (FsRtpSpecialSourceClass *klass)
parent_class = fs_rtp_special_source_parent_class;
gobject_class->dispose = fs_rtp_special_source_dispose;
+}
- if (!classes)
+void
+fs_rtp_special_sources_init (void)
+{
+ static gsize initialization_value = 0;
+ if (g_once_init_enter (&initialization_value))
{
+ gsize setup_value = 42;
+
classes = g_list_prepend (classes,
g_type_class_ref (FS_TYPE_RTP_DTMF_EVENT_SOURCE));
+
+ g_once_init_leave (&initialization_value, setup_value);
}
}
@@ -116,6 +127,9 @@ fs_rtp_special_source_class_add_blueprint (FsRtpSpecialSourceClass *klass,
{
if (klass->add_blueprint)
return klass->add_blueprint (klass, blueprints);
+ else
+ GST_CAT_DEBUG (fsrtpconference_disco,
+ "Class %s has no add_blueprint function", G_OBJECT_CLASS_NAME(klass));
return blueprints;
}
diff --git a/gst/fsrtpconference/fs-rtp-special-source.h b/gst/fsrtpconference/fs-rtp-special-source.h
index 5e895a1..7558176 100644
--- a/gst/fsrtpconference/fs-rtp-special-source.h
+++ b/gst/fsrtpconference/fs-rtp-special-source.h
@@ -28,6 +28,8 @@
#include <gst/gst.h>
+#include <gst/farsight/fs-session.h>
+
G_BEGIN_DECLS
/* TYPE MACROS */
@@ -100,6 +102,9 @@ struct _FsRtpSpecialSource
GType fs_rtp_special_source_get_type (void);
+void
+fs_rtp_special_sources_init (void);
+
GList *
fs_rtp_special_sources_update (
GList *current_extra_sources,
diff --git a/tests/rtp/Makefile.am b/tests/rtp/Makefile.am
index 40612c8..47969cd 100644
--- a/tests/rtp/Makefile.am
+++ b/tests/rtp/Makefile.am
@@ -3,7 +3,9 @@ noinst_PROGRAMS = codec-discovery
codec_discovery_SOURCES = codec-discovery.c \
$(top_srcdir)/gst/fsrtpconference/fs-rtp-discover-codecs.c \
- $(top_srcdir)/gst/fsrtpconference/fs-rtp-codec-cache.c
+ $(top_srcdir)/gst/fsrtpconference/fs-rtp-codec-cache.c \
+ $(top_srcdir)/gst/fsrtpconference/fs-rtp-special-source.c \
+ $(top_srcdir)/gst/fsrtpconference/fs-rtp-dtmf-event-source.c
codec_discovery_CFLAGS = -I$(top_srcdir)/gst/fsrtpconference/ \
$(FS2_INTERNAL_CFLAGS) $(FS2_CFLAGS) $(GST_CFLAGS) $(CFLAGS)
LDADD = $(GST_LIBS) $(GST_CHECK_LIBS) \
--
1.5.6.5
More information about the farsight-commits
mailing list