mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 12:10:37 +00:00
857142a15d
This avoids hanging with no obvious cause later when they're not. https://bugzilla.gnome.org/show_bug.cgi?id=641246
84 lines
2.4 KiB
C
84 lines
2.4 KiB
C
/* GStreamer Editing Services
|
|
* Copyright (C) 2009 Edward Hervey <edward.hervey@collabora.co.uk>
|
|
* 2009 Nokia Corporation
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Library General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Library General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Library General Public
|
|
* License along with this library; if not, write to the
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
* Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
#include <ges/ges.h>
|
|
#include <gst/controller/gstcontroller.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);
|
|
|
|
/**
|
|
* SECTION:ges-common
|
|
* @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:
|
|
*
|
|
* Initialize the GStreamer Editing Service. Call this before any usage of
|
|
* GES.
|
|
*/
|
|
|
|
gboolean
|
|
ges_init (void)
|
|
{
|
|
/* initialize debugging category */
|
|
GST_DEBUG_CATEGORY_INIT (_ges_debug, "ges", GST_DEBUG_FG_YELLOW,
|
|
"GStreamer Editing Services");
|
|
gst_controller_init (NULL, NULL);
|
|
|
|
/* register timeline object classes with the system */
|
|
|
|
GES_TYPE_TIMELINE_TEST_SOURCE;
|
|
GES_TYPE_TIMELINE_FILE_SOURCE;
|
|
GES_TYPE_TIMELINE_TITLE_SOURCE;
|
|
GES_TYPE_TIMELINE_STANDARD_TRANSITION;
|
|
GES_TYPE_TIMELINE_OVERLAY;
|
|
|
|
/* check the gnonlin elements are available */
|
|
if (!ges_check_gnonlin_availability ())
|
|
return FALSE;
|
|
|
|
/* TODO: user-defined types? */
|
|
|
|
GST_DEBUG ("GStreamer Editing Services initialized");
|
|
|
|
return TRUE;
|
|
}
|