From e71e1cc9fb35d3fb8d621779ede7a71c12c9694b Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Fri, 3 Aug 2018 14:02:58 -0400 Subject: [PATCH] ges: Check that nle is avalaible when initializing --- ges/ges.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ges/ges.c b/ges/ges.c index af5edd9b7d..28d94cae96 100644 --- a/ges/ges.c +++ b/ges/ges.c @@ -61,6 +61,7 @@ ges_init_post (GOptionContext * context, GOptionGroup * group, gpointer data, GError ** error) { GESUriClipAssetClass *uriasset_klass = NULL; + GstElementFactory *nlecomposition_factory = NULL; if (ges_initialized) { GST_DEBUG ("already initialized ges"); @@ -74,6 +75,19 @@ ges_init_post (GOptionContext * context, GOptionGroup * group, gpointer data, if (!uriasset_klass->sync_discoverer) goto failed; + nlecomposition_factory = gst_element_factory_find ("nlecomposition"); + if (!nlecomposition_factory) { + GST_ERROR ("The `nlecomposition` object was not found."); + if (error) + *error = g_error_new (GST_CORE_ERROR, GST_CORE_ERROR_MISSING_PLUGIN, + "The `nle` plugin is missing."); + + goto failed; + } + gst_object_unref (nlecomposition_factory); + + + /* register clip classes with the system */ g_type_class_ref (GES_TYPE_TEST_CLIP);