mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 04:36:20 +00:00
ges: Check that the gnonlin elements are present at initialization time
This avoids hanging with no obvious cause later when they're not. https://bugzilla.gnome.org/show_bug.cgi?id=641246
This commit is contained in:
parent
493059f01c
commit
857142a15d
3 changed files with 32 additions and 3 deletions
28
ges/ges.c
28
ges/ges.c
|
@ -22,6 +22,10 @@
|
||||||
#include <gst/controller/gstcontroller.h>
|
#include <gst/controller/gstcontroller.h>
|
||||||
#include "ges-internal.h"
|
#include "ges-internal.h"
|
||||||
|
|
||||||
|
#define GES_GNONLIN_VERSION_NEEDED_MAJOR 0
|
||||||
|
#define GES_GNONLIN_VERSION_NEEDED_MINOR 10
|
||||||
|
#define GES_GNONLIN_VERSION_NEEDED_MICRO 16
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY (_ges_debug);
|
GST_DEBUG_CATEGORY (_ges_debug);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -29,6 +33,22 @@ GST_DEBUG_CATEGORY (_ges_debug);
|
||||||
* @short_description: Initialization.
|
* @short_description: Initialization.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
ges_check_gnonlin_availability (void)
|
||||||
|
{
|
||||||
|
gboolean ret = TRUE;
|
||||||
|
if (!gst_default_registry_check_feature_version ("gnlcomposition",
|
||||||
|
GES_GNONLIN_VERSION_NEEDED_MAJOR, GES_GNONLIN_VERSION_NEEDED_MINOR,
|
||||||
|
GES_GNONLIN_VERSION_NEEDED_MICRO)) {
|
||||||
|
GST_ERROR
|
||||||
|
("GNonLin plugins not found, or not at least version %u.%u.%u",
|
||||||
|
GES_GNONLIN_VERSION_NEEDED_MAJOR,
|
||||||
|
GES_GNONLIN_VERSION_NEEDED_MINOR, GES_GNONLIN_VERSION_NEEDED_MICRO);
|
||||||
|
ret = FALSE;
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ges_init:
|
* ges_init:
|
||||||
*
|
*
|
||||||
|
@ -36,7 +56,7 @@ GST_DEBUG_CATEGORY (_ges_debug);
|
||||||
* GES.
|
* GES.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
gboolean
|
||||||
ges_init (void)
|
ges_init (void)
|
||||||
{
|
{
|
||||||
/* initialize debugging category */
|
/* initialize debugging category */
|
||||||
|
@ -52,7 +72,13 @@ ges_init (void)
|
||||||
GES_TYPE_TIMELINE_STANDARD_TRANSITION;
|
GES_TYPE_TIMELINE_STANDARD_TRANSITION;
|
||||||
GES_TYPE_TIMELINE_OVERLAY;
|
GES_TYPE_TIMELINE_OVERLAY;
|
||||||
|
|
||||||
|
/* check the gnonlin elements are available */
|
||||||
|
if (!ges_check_gnonlin_availability ())
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
/* TODO: user-defined types? */
|
/* TODO: user-defined types? */
|
||||||
|
|
||||||
GST_DEBUG ("GStreamer Editing Services initialized");
|
GST_DEBUG ("GStreamer Editing Services initialized");
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
void ges_init (void);
|
gboolean ges_init (void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -435,7 +435,10 @@ main (int argc, gchar ** argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize the GStreamer Editing Services */
|
/* Initialize the GStreamer Editing Services */
|
||||||
ges_init ();
|
if (!ges_init ()) {
|
||||||
|
g_printerr ("Error initializing GES\n");
|
||||||
|
exit (1);
|
||||||
|
}
|
||||||
|
|
||||||
if (list_transitions) {
|
if (list_transitions) {
|
||||||
print_transition_list ();
|
print_transition_list ();
|
||||||
|
|
Loading…
Reference in a new issue