summaryrefslogtreecommitdiff
path: root/transmitters
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
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')
-rw-r--r--transmitters/multicast/Makefile.am1
-rw-r--r--transmitters/multicast/fs-multicast-stream-transmitter.c6
-rw-r--r--transmitters/multicast/fs-multicast-transmitter.c6
-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
-rw-r--r--transmitters/rawudp/Makefile.am1
-rw-r--r--transmitters/rawudp/fs-rawudp-component.c5
-rw-r--r--transmitters/rawudp/fs-rawudp-stream-transmitter.c4
-rw-r--r--transmitters/rawudp/fs-rawudp-transmitter.c6
-rw-r--r--transmitters/shm/Makefile.am1
-rw-r--r--transmitters/shm/fs-shm-stream-transmitter.c6
-rw-r--r--transmitters/shm/fs-shm-transmitter.c8
14 files changed, 32 insertions, 30 deletions
diff --git a/transmitters/multicast/Makefile.am b/transmitters/multicast/Makefile.am
index d2e1954d..d5e3e2b1 100644
--- a/transmitters/multicast/Makefile.am
+++ b/transmitters/multicast/Makefile.am
@@ -16,6 +16,7 @@ libmulticast_transmitter_la_CFLAGS = \
$(GST_CFLAGS) \
$(GIO_CFLAGS)
libmulticast_transmitter_la_LDFLAGS = $(FS_PLUGIN_LDFLAGS)
+libmulticast_transmitter_la_LIBTOOLFLAGS = $(PLUGIN_LIBTOOLFLAGS)
libmulticast_transmitter_la_LIBADD = \
$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
$(FS_LIBS) \
diff --git a/transmitters/multicast/fs-multicast-stream-transmitter.c b/transmitters/multicast/fs-multicast-stream-transmitter.c
index eb134b4f..ba0d3bcc 100644
--- a/transmitters/multicast/fs-multicast-stream-transmitter.c
+++ b/transmitters/multicast/fs-multicast-stream-transmitter.c
@@ -166,7 +166,7 @@ fs_multicast_stream_transmitter_get_type (void)
}
GType
-fs_multicast_stream_transmitter_register_type (FsPlugin *module)
+fs_multicast_stream_transmitter_register_type (FsPlugin *module G_GNUC_UNUSED)
{
static const GTypeInfo info = {
sizeof (FsMulticastStreamTransmitterClass),
@@ -180,8 +180,8 @@ fs_multicast_stream_transmitter_register_type (FsPlugin *module)
(GInstanceInitFunc) fs_multicast_stream_transmitter_init
};
- type = g_type_module_register_type (G_TYPE_MODULE (module),
- FS_TYPE_STREAM_TRANSMITTER, "FsMulticastStreamTransmitter", &info, 0);
+ type = g_type_register_static (FS_TYPE_STREAM_TRANSMITTER,
+ "FsMulticastStreamTransmitter", &info, 0);
return type;
}
diff --git a/transmitters/multicast/fs-multicast-transmitter.c b/transmitters/multicast/fs-multicast-transmitter.c
index 1f9eaf1d..7918c1ac 100644
--- a/transmitters/multicast/fs-multicast-transmitter.c
+++ b/transmitters/multicast/fs-multicast-transmitter.c
@@ -173,13 +173,13 @@ fs_multicast_transmitter_register_type (FsPlugin *module)
fs_multicast_stream_transmitter_register_type (module);
- type = g_type_module_register_type (G_TYPE_MODULE (module),
- FS_TYPE_TRANSMITTER, "FsMulticastTransmitter", &info, 0);
+ type = g_type_register_static (FS_TYPE_TRANSMITTER,
+ "FsMulticastTransmitter", &info, 0);
return type;
}
-FS_INIT_PLUGIN (fs_multicast_transmitter_register_type)
+FS_INIT_PLUGIN (multicast, transmitter)
static void
fs_multicast_transmitter_class_init (FsMulticastTransmitterClass *klass)
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)
diff --git a/transmitters/rawudp/Makefile.am b/transmitters/rawudp/Makefile.am
index 5fb562ac..1e99722a 100644
--- a/transmitters/rawudp/Makefile.am
+++ b/transmitters/rawudp/Makefile.am
@@ -20,6 +20,7 @@ librawudp_transmitter_la_CFLAGS = \
$(GIO_CFLAGS)
librawudp_transmitter_la_LDFLAGS = $(FS_PLUGIN_LDFLAGS)
+librawudp_transmitter_la_LIBTOOLFLAGS = $(PLUGIN_LIBTOOLFLAGS)
librawudp_transmitter_la_LIBADD = \
$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
$(FS_LIBS) \
diff --git a/transmitters/rawudp/fs-rawudp-component.c b/transmitters/rawudp/fs-rawudp-component.c
index f9043df8..9281e3fa 100644
--- a/transmitters/rawudp/fs-rawudp-component.c
+++ b/transmitters/rawudp/fs-rawudp-component.c
@@ -235,7 +235,7 @@ fs_rawudp_component_get_type (void)
}
GType
-fs_rawudp_component_register_type (FsPlugin *module)
+fs_rawudp_component_register_type (FsPlugin *module G_GNUC_UNUSED)
{
static const GTypeInfo info = {
sizeof (FsRawUdpComponentClass),
@@ -251,8 +251,7 @@ fs_rawudp_component_register_type (FsPlugin *module)
/* Required because the GST type registration is not thread safe */
- type = g_type_module_register_type (G_TYPE_MODULE (module),
- G_TYPE_OBJECT, "FsRawUdpComponent", &info, 0);
+ type = g_type_register_static (G_TYPE_OBJECT, "FsRawUdpComponent", &info, 0);
return type;
}
diff --git a/transmitters/rawudp/fs-rawudp-stream-transmitter.c b/transmitters/rawudp/fs-rawudp-stream-transmitter.c
index f64a7d0a..0ab7f86a 100644
--- a/transmitters/rawudp/fs-rawudp-stream-transmitter.c
+++ b/transmitters/rawudp/fs-rawudp-stream-transmitter.c
@@ -226,8 +226,8 @@ fs_rawudp_stream_transmitter_register_type (FsPlugin *module)
fs_rawudp_component_register_type (module);
- type = g_type_module_register_type (G_TYPE_MODULE (module),
- FS_TYPE_STREAM_TRANSMITTER, "FsRawUdpStreamTransmitter", &info, 0);
+ type = g_type_register_static (FS_TYPE_STREAM_TRANSMITTER,
+ "FsRawUdpStreamTransmitter", &info, 0);
return type;
}
diff --git a/transmitters/rawudp/fs-rawudp-transmitter.c b/transmitters/rawudp/fs-rawudp-transmitter.c
index 4372f150..24f6763b 100644
--- a/transmitters/rawudp/fs-rawudp-transmitter.c
+++ b/transmitters/rawudp/fs-rawudp-transmitter.c
@@ -162,14 +162,14 @@ fs_rawudp_transmitter_register_type (FsPlugin *module)
fs_rawudp_stream_transmitter_register_type (module);
- type = g_type_module_register_type (G_TYPE_MODULE (module),
- FS_TYPE_TRANSMITTER, "FsRawUdpTransmitter", &info, 0);
+ type = g_type_register_static (FS_TYPE_TRANSMITTER, "FsRawUdpTransmitter",
+ &info, 0);
return type;
}
-FS_INIT_PLUGIN (fs_rawudp_transmitter_register_type)
+FS_INIT_PLUGIN (rawudp, transmitter)
static void
fs_rawudp_transmitter_class_init (FsRawUdpTransmitterClass *klass)
diff --git a/transmitters/shm/Makefile.am b/transmitters/shm/Makefile.am
index 4b5c6b21..e56a1b9c 100644
--- a/transmitters/shm/Makefile.am
+++ b/transmitters/shm/Makefile.am
@@ -15,6 +15,7 @@ libshm_transmitter_la_CFLAGS = \
$(GST_PLUGINS_BASE_CFLAGS) \
$(GST_CFLAGS)
libshm_transmitter_la_LDFLAGS = $(FS_PLUGIN_LDFLAGS)
+libshm_transmitter_la_LIBTOOLFLAGS = $(PLUGIN_LIBTOOLFLAGS)
libshm_transmitter_la_LIBADD = \
$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
$(FS_LIBS) \
diff --git a/transmitters/shm/fs-shm-stream-transmitter.c b/transmitters/shm/fs-shm-stream-transmitter.c
index 796e898b..e745480b 100644
--- a/transmitters/shm/fs-shm-stream-transmitter.c
+++ b/transmitters/shm/fs-shm-stream-transmitter.c
@@ -176,7 +176,7 @@ fs_shm_stream_transmitter_get_type (void)
}
GType
-fs_shm_stream_transmitter_register_type (FsPlugin *module)
+fs_shm_stream_transmitter_register_type (FsPlugin *module G_GNUC_UNUSED)
{
static const GTypeInfo info = {
sizeof (FsShmStreamTransmitterClass),
@@ -190,8 +190,8 @@ fs_shm_stream_transmitter_register_type (FsPlugin *module)
(GInstanceInitFunc) fs_shm_stream_transmitter_init
};
- type = g_type_module_register_type (G_TYPE_MODULE (module),
- FS_TYPE_STREAM_TRANSMITTER, "FsShmStreamTransmitter", &info, 0);
+ type = g_type_register_static (FS_TYPE_STREAM_TRANSMITTER,
+ "FsShmStreamTransmitter", &info, 0);
return type;
}
diff --git a/transmitters/shm/fs-shm-transmitter.c b/transmitters/shm/fs-shm-transmitter.c
index 917eccff..28a6ad48 100644
--- a/transmitters/shm/fs-shm-transmitter.c
+++ b/transmitters/shm/fs-shm-transmitter.c
@@ -241,16 +241,16 @@ fs_shm_transmitter_register_type (FsPlugin *module)
fs_shm_stream_transmitter_register_type (module);
- type = g_type_module_register_type (G_TYPE_MODULE (module),
- FS_TYPE_TRANSMITTER, "FsShmTransmitter", &info, 0);
+ type = g_type_register_static (FS_TYPE_TRANSMITTER, "FsShmTransmitter",
+ &info, 0);
- shm_bin_type = g_type_module_register_type (G_TYPE_MODULE (module),
+ shm_bin_type = g_type_register_static (
GST_TYPE_BIN, "FsShmBin", &bin_info, 0);
return type;
}
-FS_INIT_PLUGIN (fs_shm_transmitter_register_type)
+FS_INIT_PLUGIN (shm, transmitter)
static void
fs_shm_transmitter_class_init (FsShmTransmitterClass *klass)