summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2017-04-13 11:33:41 +0100
committerTim-Philipp Müller <tim@centricular.com>2017-04-13 11:33:41 +0100
commit5b458bf8299566d0f183349756b4bfb8358ec2e3 (patch)
treede1ed9c04aad04456e658a3a9afb21665a262af2
parent9ed9c14eb5479498e3e3a77c1d740c96a6027e8d (diff)
downloadgstreamer-plugins-bad-5b458bf8299566d0f183349756b4bfb8358ec2e3.tar.gz
ttml: build, but don't autoplug unless GST_TTML_AUTOPLUG env var is set
Don't hide build behind --enable-experimental. Our goal is to not autoplug it for now, so let's just always build it if the dependencies are there and hide autoplugging enablement behind an env var.
-rw-r--r--configure.ac12
-rw-r--r--ext/ttml/gstttmlplugin.c17
2 files changed, 18 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index f1171dd45..6df044c25 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2496,13 +2496,11 @@ AG_GST_CHECK_FEATURE(DTLS, [DTLS plugin], dtls, [
dnl *** ttml ***
translit(dnm, m, l) AM_CONDITIONAL(USE_TTML, true)
AG_GST_CHECK_FEATURE(TTML, [TTML plugin], ttml, [
- if test "x$BUILD_EXPERIMENTAL" = "xyes"; then
- PKG_CHECK_MODULES(TTML, [ libxml-2.0 >= 2.9.2 pango cairo pangocairo ], [
- HAVE_TTML="yes"
- ], [
- HAVE_TTML="no"
- ])
- fi
+ PKG_CHECK_MODULES(TTML, [ libxml-2.0 >= 2.9.2 pango cairo pangocairo ], [
+ HAVE_TTML="yes"
+ ], [
+ HAVE_TTML="no"
+ ])
])
dnl *** modplug ***
diff --git a/ext/ttml/gstttmlplugin.c b/ext/ttml/gstttmlplugin.c
index cc64bcc4a..d6d0d1afd 100644
--- a/ext/ttml/gstttmlplugin.c
+++ b/ext/ttml/gstttmlplugin.c
@@ -33,11 +33,20 @@ GST_DEBUG_CATEGORY (ttmlrender_debug);
static gboolean
plugin_init (GstPlugin * plugin)
{
- if (!gst_element_register (plugin, "ttmlparse", GST_RANK_PRIMARY,
- GST_TYPE_TTML_PARSE))
+ guint rank = GST_RANK_NONE;
+
+ /* We don't want this autoplugged by default yet for now */
+ if (g_getenv ("GST_TTML_AUTOPLUG")) {
+ GST_INFO_OBJECT (plugin, "Registering ttml elements with primary rank.");
+ rank = GST_RANK_PRIMARY;
+ }
+
+ gst_plugin_add_dependency_simple (plugin, "GST_TTML_AUTOPLUG", NULL, NULL,
+ GST_PLUGIN_DEPENDENCY_FLAG_NONE);
+
+ if (!gst_element_register (plugin, "ttmlparse", rank, GST_TYPE_TTML_PARSE))
return FALSE;
- if (!gst_element_register (plugin, "ttmlrender", GST_RANK_PRIMARY,
- GST_TYPE_TTML_RENDER))
+ if (!gst_element_register (plugin, "ttmlrender", rank, GST_TYPE_TTML_RENDER))
return FALSE;
GST_DEBUG_CATEGORY_INIT (ttmlparse_debug, "ttmlparse", 0, "TTML parser");