[farsight2/master] Use the plugin infrastructure for transmitter plugins
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:19:15 PST 2008
---
docs/libs/farsight-libs-sections.txt | 1 +
gst-libs/gst/farsight/fs-transmitter.c | 21 +++++++++++++++++++++
gst-libs/gst/farsight/fs-transmitter.h | 2 ++
3 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/docs/libs/farsight-libs-sections.txt b/docs/libs/farsight-libs-sections.txt
index 6d6f908..0532008 100644
--- a/docs/libs/farsight-libs-sections.txt
+++ b/docs/libs/farsight-libs-sections.txt
@@ -146,6 +146,7 @@ FsBaseConferencePrivate
<TITLE>FsTransmitter</TITLE>
FsTransmitter
FsTransmitterClass
+fs_transmitter_new
fs_transmitter_new_stream_transmitter
<SUBSECTION Standard>
FS_IS_TRANSMITTER
diff --git a/gst-libs/gst/farsight/fs-transmitter.c b/gst-libs/gst/farsight/fs-transmitter.c
index 053e48c..b58a993 100644
--- a/gst-libs/gst/farsight/fs-transmitter.c
+++ b/gst-libs/gst/farsight/fs-transmitter.c
@@ -41,6 +41,8 @@
#include "fs-marshal.h"
#include "fs-transmitter.h"
+#include "fs-plugin.h"
+
#include <gst/gst.h>
/* Signals */
@@ -254,3 +256,22 @@ fs_transmitter_new_stream_transmitter (FsTransmitter *transmitter,
return NULL;
}
+
+/**
+ * fs_transmitter_new:
+ * @type: The type of transmitter to create
+ *
+ * This function creates a new transmitter of the requested type.
+ * It will load the appropriate plugin as required.
+ *
+ * Returns: a newly-created #FsTransmitter of the requested type
+ * (or NULL if there is an error)
+ */
+
+FsTransmitter *fs_transmitter_new (gchar *type)
+{
+ g_return_val_if_fail (type != NULL, NULL);
+
+ return FS_TRANSMITTER(fs_plugin_create_valist(type, "transmitter",
+ NULL, NULL));
+}
diff --git a/gst-libs/gst/farsight/fs-transmitter.h b/gst-libs/gst/farsight/fs-transmitter.h
index a628bb1..3df4431 100644
--- a/gst-libs/gst/farsight/fs-transmitter.h
+++ b/gst-libs/gst/farsight/fs-transmitter.h
@@ -84,6 +84,8 @@ FsStreamTransmitter *fs_transmitter_new_stream_transmitter (
FsParticipant *participant);
+FsTransmitter *fs_transmitter_new (gchar *type);
+
G_END_DECLS
#endif /* __FS_TRANSMITTER_H__ */
--
1.5.6.5
More information about the farsight-commits
mailing list