[farsight2/master] Implement new and update methods in the base SpecialSource class
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:21:29 PST 2008
---
gst/fsrtpconference/fs-rtp-special-source.c | 14 +++++++++++++-
gst/fsrtpconference/fs-rtp-special-source.h | 6 ++++++
2 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/gst/fsrtpconference/fs-rtp-special-source.c b/gst/fsrtpconference/fs-rtp-special-source.c
index be96274..a3bad19 100644
--- a/gst/fsrtpconference/fs-rtp-special-source.c
+++ b/gst/fsrtpconference/fs-rtp-special-source.c
@@ -27,6 +27,8 @@
#include "config.h"
#endif
+#include <gst/farsight/fs-base-conference.h>
+
#include "fs-rtp-special-source.h"
#define GST_CAT_DEFAULT fsrtpconference_debug
@@ -229,7 +231,12 @@ fs_rtp_special_source_new (FsRtpSpecialSourceClass *klass,
GstElement *rtpmuxer,
GError **error)
{
- /* STUB */
+ if (klass->new)
+ return klass->new (klass, negotiated_sources, bin, rtpmuxer, error);
+
+ g_set_error (error, FS_ERROR, FS_ERROR_NOT_IMPLEMENTED,
+ "new not defined for %s", G_OBJECT_CLASS_NAME (klass));
+
return NULL;
}
@@ -237,5 +244,10 @@ static gboolean
fs_rtp_special_source_update (FsRtpSpecialSource *source,
GList *negotiated_sources)
{
+ FsRtpSpecialSourceClass *klass = FS_RTP_SPECIAL_SOURCE_GET_CLASS (source);
+
+ if (klass->update)
+ return klass->update (source, negotiated_sources);
+
return FALSE;
}
diff --git a/gst/fsrtpconference/fs-rtp-special-source.h b/gst/fsrtpconference/fs-rtp-special-source.h
index e4de13e..7ef7a13 100644
--- a/gst/fsrtpconference/fs-rtp-special-source.h
+++ b/gst/fsrtpconference/fs-rtp-special-source.h
@@ -67,6 +67,12 @@ struct _FsRtpSpecialSourceClass
GList* (*add_blueprint) (FsRtpSpecialSourceClass *klass,
GList *blueprints);
+
+ FsRtpSpecialSource* (*new) (FsRtpSpecialSourceClass *klass,
+ GList *negotiated_sources,
+ GstElement *bin,
+ GstElement *rtpmuxer,
+ GError **error);
};
/**
--
1.5.6.5
More information about the farsight-commits
mailing list