2009-08-06 09:23:01 +00:00
|
|
|
/* GStreamer Editing Services
|
2009-11-30 14:14:25 +00:00
|
|
|
* Copyright (C) 2009 Edward Hervey <edward.hervey@collabora.co.uk>
|
|
|
|
* 2009 Nokia Corporation
|
2009-08-06 09:23:01 +00:00
|
|
|
*
|
|
|
|
* 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
|
2012-11-04 00:25:20 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2009-08-06 09:23:01 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <ges/ges.h>
|
2009-08-06 17:51:29 +00:00
|
|
|
#include "ges-internal.h"
|
2009-08-06 09:23:01 +00:00
|
|
|
|
2011-02-07 12:19:18 +00:00
|
|
|
#define GES_GNONLIN_VERSION_NEEDED_MAJOR 0
|
2012-05-01 17:48:57 +00:00
|
|
|
#define GES_GNONLIN_VERSION_NEEDED_MINOR 11
|
|
|
|
#define GES_GNONLIN_VERSION_NEEDED_MICRO 0
|
2011-02-07 12:19:18 +00:00
|
|
|
|
2011-01-11 16:19:54 +00:00
|
|
|
GST_DEBUG_CATEGORY (_ges_debug);
|
2009-08-06 09:23:01 +00:00
|
|
|
|
2009-09-10 16:40:51 +00:00
|
|
|
/**
|
2009-11-12 19:11:28 +00:00
|
|
|
* SECTION:ges-common
|
2009-09-10 16:40:51 +00:00
|
|
|
* @short_description: Initialization.
|
|
|
|
*/
|
|
|
|
|
2011-02-07 12:19:18 +00:00
|
|
|
static gboolean
|
|
|
|
ges_check_gnonlin_availability (void)
|
|
|
|
{
|
|
|
|
gboolean ret = TRUE;
|
2012-01-02 14:58:17 +00:00
|
|
|
if (!gst_registry_check_feature_version (gst_registry_get (),
|
|
|
|
"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);
|
2011-02-07 12:19:18 +00:00
|
|
|
ret = FALSE;
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2009-09-10 16:40:51 +00:00
|
|
|
/**
|
|
|
|
* ges_init:
|
|
|
|
*
|
|
|
|
* Initialize the GStreamer Editing Service. Call this before any usage of
|
2011-05-18 14:46:34 +00:00
|
|
|
* GES. You should take care of initilizing GStreamer before calling this
|
|
|
|
* function.
|
2009-09-10 16:40:51 +00:00
|
|
|
*/
|
|
|
|
|
2011-02-07 12:19:18 +00:00
|
|
|
gboolean
|
2009-08-06 09:23:01 +00:00
|
|
|
ges_init (void)
|
|
|
|
{
|
|
|
|
/* initialize debugging category */
|
2011-01-11 16:19:54 +00:00
|
|
|
GST_DEBUG_CATEGORY_INIT (_ges_debug, "ges", GST_DEBUG_FG_YELLOW,
|
2009-08-06 09:23:01 +00:00
|
|
|
"GStreamer Editing Services");
|
2009-08-07 14:46:35 +00:00
|
|
|
|
2010-09-23 13:49:04 +00:00
|
|
|
/* register timeline object classes with the system */
|
|
|
|
|
|
|
|
GES_TYPE_TIMELINE_TEST_SOURCE;
|
|
|
|
GES_TYPE_TIMELINE_FILE_SOURCE;
|
|
|
|
GES_TYPE_TIMELINE_TITLE_SOURCE;
|
2010-12-09 16:09:11 +00:00
|
|
|
GES_TYPE_TIMELINE_STANDARD_TRANSITION;
|
2010-09-23 13:49:04 +00:00
|
|
|
GES_TYPE_TIMELINE_OVERLAY;
|
|
|
|
|
2012-09-23 00:05:42 +00:00
|
|
|
/* register formatter types with the system */
|
|
|
|
GES_TYPE_PITIVI_FORMATTER;
|
2012-11-19 16:24:03 +00:00
|
|
|
GES_TYPE_XML_FORMATTER;
|
|
|
|
|
|
|
|
/* Register track effect */
|
|
|
|
GES_TYPE_TRACK_PARSE_LAUNCH_EFFECT;
|
2012-12-17 18:23:39 +00:00
|
|
|
|
|
|
|
GES_TYPE_META_CONTAINER;
|
2012-09-23 00:05:42 +00:00
|
|
|
|
2012-09-10 00:15:17 +00:00
|
|
|
ges_asset_cache_init ();
|
|
|
|
|
2011-02-07 12:19:18 +00:00
|
|
|
/* check the gnonlin elements are available */
|
|
|
|
if (!ges_check_gnonlin_availability ())
|
|
|
|
return FALSE;
|
|
|
|
|
2010-09-23 13:49:04 +00:00
|
|
|
/* TODO: user-defined types? */
|
|
|
|
|
2009-08-07 14:46:35 +00:00
|
|
|
GST_DEBUG ("GStreamer Editing Services initialized");
|
2011-02-07 12:19:18 +00:00
|
|
|
|
|
|
|
return TRUE;
|
2009-08-06 09:23:01 +00:00
|
|
|
}
|
2011-12-26 01:54:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ges_version:
|
|
|
|
* @major: (out): pointer to a guint to store the major version number
|
|
|
|
* @minor: (out): pointer to a guint to store the minor version number
|
|
|
|
* @micro: (out): pointer to a guint to store the micro version number
|
|
|
|
* @nano: (out): pointer to a guint to store the nano version number
|
|
|
|
*
|
|
|
|
* Gets the version number of the GStreamer Editing Services library.
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
ges_version (guint * major, guint * minor, guint * micro, guint * nano)
|
|
|
|
{
|
|
|
|
g_return_if_fail (major);
|
|
|
|
g_return_if_fail (minor);
|
|
|
|
g_return_if_fail (micro);
|
|
|
|
g_return_if_fail (nano);
|
|
|
|
|
|
|
|
*major = GES_VERSION_MAJOR;
|
|
|
|
*minor = GES_VERSION_MINOR;
|
|
|
|
*micro = GES_VERSION_MICRO;
|
|
|
|
*nano = GES_VERSION_NANO;
|
|
|
|
}
|