ges: Check that nle is avalaible when initializing

This commit is contained in:
Thibault Saunier 2018-08-03 14:02:58 -04:00
parent efa220a615
commit e71e1cc9fb

View file

@ -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);