summaryrefslogtreecommitdiff
path: root/transmitters/nice
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2014-10-30 19:36:25 -0400
committerOlivier CrĂȘte <olivier.crete@collabora.com>2015-02-25 16:43:45 -0500
commit45861c192761b7059a6ffd4b6daea2ebcdd82642 (patch)
tree1cd12d6486d920a24b7fa668cc95e08abcfe6605 /transmitters/nice
parentadb4765979f627dfce44590b243cd74af086da9a (diff)
downloadfarstream-45861c192761b7059a6ffd4b6daea2ebcdd82642.tar.gz
Enable building static FsPlugins
This required change FS_INIT_PLUGIN() macro. It's now taking name and type argumenet. This is a slight API break, but there never existed any external plugins. Also, already built plugins should not be affected since the symbol remains the same. Note also that plugin are no longer unloadable, it was already not well supported. Instead of adding loads of if, we simply register the module types as static (just like GStreamer does). To register static plugin, you can declare it's registration function using FS_PLUGIN_STATIC_DECLARE(name), and then in your code call the function using FS_PLUGIN_STATIC_REGISTER(name). https://bugs.freedesktop.org/show_bug.cgi?id=89287
Diffstat (limited to 'transmitters/nice')
-rw-r--r--transmitters/nice/Makefile.am1
-rw-r--r--transmitters/nice/fs-nice-agent.c5
-rw-r--r--transmitters/nice/fs-nice-stream-transmitter.c6
-rw-r--r--transmitters/nice/fs-nice-transmitter.c6
4 files changed, 9 insertions, 9 deletions
diff --git a/transmitters/nice/Makefile.am b/transmitters/nice/Makefile.am
index 051a17d3..cdacde42 100644
--- a/transmitters/nice/Makefile.am
+++ b/transmitters/nice/Makefile.am
@@ -17,6 +17,7 @@ libnice_transmitter_la_CFLAGS = \
$(GST_CFLAGS) \
$(NICE_CFLAGS)
libnice_transmitter_la_LDFLAGS = $(FS_PLUGIN_LDFLAGS)
+libnice_transmitter_la_LIBTOOLFLAGS = $(PLUGIN_LIBTOOLFLAGS)
libnice_transmitter_la_LIBADD = \
$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
$(FS_LIBS) \
diff --git a/transmitters/nice/fs-nice-agent.c b/transmitters/nice/fs-nice-agent.c
index d95126dc..b94e7138 100644
--- a/transmitters/nice/fs-nice-agent.c
+++ b/transmitters/nice/fs-nice-agent.c
@@ -116,7 +116,7 @@ fs_nice_agent_get_type (void)
}
GType
-fs_nice_agent_register_type (FsPlugin *module)
+fs_nice_agent_register_type (FsPlugin *module G_GNUC_UNUSED)
{
static const GTypeInfo info = {
sizeof (FsNiceAgentClass),
@@ -130,8 +130,7 @@ fs_nice_agent_register_type (FsPlugin *module)
(GInstanceInitFunc) fs_nice_agent_init
};
- type = g_type_module_register_type (G_TYPE_MODULE (module),
- G_TYPE_OBJECT, "FsNiceAgent", &info, 0);
+ type = g_type_register_static (G_TYPE_OBJECT, "FsNiceAgent", &info, 0);
return type;
}
diff --git a/transmitters/nice/fs-nice-stream-transmitter.c b/transmitters/nice/fs-nice-stream-transmitter.c
index 9040635b..e126d9ae 100644
--- a/transmitters/nice/fs-nice-stream-transmitter.c
+++ b/transmitters/nice/fs-nice-stream-transmitter.c
@@ -203,7 +203,7 @@ fs_nice_stream_transmitter_get_type (void)
}
GType
-fs_nice_stream_transmitter_register_type (FsPlugin *module)
+fs_nice_stream_transmitter_register_type (FsPlugin *module G_GNUC_UNUSED)
{
static const GTypeInfo info = {
sizeof (FsNiceStreamTransmitterClass),
@@ -217,8 +217,8 @@ fs_nice_stream_transmitter_register_type (FsPlugin *module)
(GInstanceInitFunc) fs_nice_stream_transmitter_init
};
- type = g_type_module_register_type (G_TYPE_MODULE (module),
- FS_TYPE_STREAM_TRANSMITTER, "FsNiceStreamTransmitter", &info, 0);
+ type = g_type_register_static (FS_TYPE_STREAM_TRANSMITTER,
+ "FsNiceStreamTransmitter", &info, 0);
return type;
}
diff --git a/transmitters/nice/fs-nice-transmitter.c b/transmitters/nice/fs-nice-transmitter.c
index 41545373..51f2371e 100644
--- a/transmitters/nice/fs-nice-transmitter.c
+++ b/transmitters/nice/fs-nice-transmitter.c
@@ -147,13 +147,13 @@ fs_nice_transmitter_register_type (FsPlugin *module)
fs_nice_stream_transmitter_register_type (module);
fs_nice_agent_register_type (module);
- type = g_type_module_register_type (G_TYPE_MODULE (module),
- FS_TYPE_TRANSMITTER, "FsNiceTransmitter", &info, 0);
+ type = g_type_register_static (FS_TYPE_TRANSMITTER,
+ "FsNiceTransmitter", &info, 0);
return type;
}
-FS_INIT_PLUGIN (fs_nice_transmitter_register_type)
+FS_INIT_PLUGIN (nice, transmitter)
static void
fs_nice_transmitter_class_init (FsNiceTransmitterClass *klass)