2000-12-28 22:12:02 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
|
|
|
* 2000 Wim Taymans <wtay@chello.be>
|
|
|
|
*
|
|
|
|
* gstplugin.h: Header for plugin subsystem
|
2000-01-30 09:03:00 +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-03 20:44:48 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2000-01-30 09:03:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __GST_PLUGIN_H__
|
|
|
|
#define __GST_PLUGIN_H__
|
|
|
|
|
2001-10-17 10:21:27 +00:00
|
|
|
#include <gst/gstconfig.h>
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2005-09-15 20:56:30 +00:00
|
|
|
#include <gst/gstobject.h>
|
2005-09-20 09:08:25 +00:00
|
|
|
#include <gst/gstmacros.h>
|
2009-06-07 20:46:54 +00:00
|
|
|
#include <gst/gststructure.h>
|
2000-12-28 22:12:02 +00:00
|
|
|
|
2004-03-15 14:43:35 +00:00
|
|
|
G_BEGIN_DECLS
|
2002-07-08 19:07:30 +00:00
|
|
|
|
2012-04-29 16:03:32 +00:00
|
|
|
/**
|
|
|
|
* GstPlugin:
|
|
|
|
*
|
|
|
|
* The opaque plugin object
|
|
|
|
*/
|
2005-09-15 00:13:26 +00:00
|
|
|
typedef struct _GstPlugin GstPlugin;
|
|
|
|
typedef struct _GstPluginClass GstPluginClass;
|
|
|
|
typedef struct _GstPluginDesc GstPluginDesc;
|
|
|
|
|
2005-09-25 12:11:39 +00:00
|
|
|
/**
|
|
|
|
* gst_plugin_error_quark:
|
|
|
|
*
|
|
|
|
* Get the error quark.
|
|
|
|
*
|
|
|
|
* Returns: The error quark used in GError messages
|
|
|
|
*/
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2004-03-15 14:43:35 +00:00
|
|
|
GQuark gst_plugin_error_quark (void);
|
2005-09-25 12:11:39 +00:00
|
|
|
/**
|
|
|
|
* GST_PLUGIN_ERROR:
|
|
|
|
*
|
|
|
|
* The error message category quark
|
|
|
|
*/
|
2002-05-20 23:11:10 +00:00
|
|
|
#define GST_PLUGIN_ERROR gst_plugin_error_quark ()
|
|
|
|
|
2005-09-25 12:11:39 +00:00
|
|
|
/**
|
|
|
|
* GstPluginError:
|
|
|
|
* @GST_PLUGIN_ERROR_MODULE: The plugin could not be loaded
|
|
|
|
* @GST_PLUGIN_ERROR_DEPENDENCIES: The plugin has unresolved dependencies
|
|
|
|
* @GST_PLUGIN_ERROR_NAME_MISMATCH: The plugin has already be loaded from a different file
|
|
|
|
*
|
|
|
|
* The plugin loading errors
|
|
|
|
*/
|
2002-05-20 23:11:10 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GST_PLUGIN_ERROR_MODULE,
|
2003-10-31 19:32:47 +00:00
|
|
|
GST_PLUGIN_ERROR_DEPENDENCIES,
|
|
|
|
GST_PLUGIN_ERROR_NAME_MISMATCH
|
2004-03-15 14:43:35 +00:00
|
|
|
} GstPluginError;
|
2002-05-20 23:11:10 +00:00
|
|
|
|
2009-11-25 15:27:30 +00:00
|
|
|
/**
|
|
|
|
* GstPluginFlags:
|
|
|
|
* @GST_PLUGIN_FLAG_CACHED: Temporarily loaded plugins
|
|
|
|
* @GST_PLUGIN_FLAG_BLACKLISTED: The plugin won't be scanned (again)
|
|
|
|
*
|
|
|
|
* The plugin loading state
|
|
|
|
*/
|
2005-09-15 00:13:26 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
2012-04-29 16:46:32 +00:00
|
|
|
GST_PLUGIN_FLAG_CACHED = (GST_OBJECT_FLAG_LAST << 0),
|
|
|
|
GST_PLUGIN_FLAG_BLACKLISTED = (GST_OBJECT_FLAG_LAST << 1)
|
2005-09-15 00:13:26 +00:00
|
|
|
} GstPluginFlags;
|
2000-01-30 09:03:00 +00:00
|
|
|
|
Add API for making a GStreamer plugin 'dependent' on external files, directories or environment variables, so that GS...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt::
* gst/gst_private.h: (GstPluginDep), (_GstPluginPrivate):
* gst/gstplugin.c: (gst_plugin_init), (gst_plugin_finalize),
(gst_plugin_class_init), (gst_plugin_list_free),
(gst_plugin_ext_dep_get_env_vars_hash),
(_priv_plugin_deps_env_vars_changed),
(gst_plugin_ext_dep_extract_env_vars_paths),
(gst_plugin_ext_dep_get_hash_from_stat_entry),
(gst_plugin_ext_dep_direntry_matches),
(gst_plugin_ext_dep_scan_dir_and_match_names),
(gst_plugin_ext_dep_scan_path_with_filenames),
(gst_plugin_ext_dep_get_stat_hash),
(_priv_plugin_deps_files_changed), (gst_plugin_ext_dep_free),
(gst_plugin_ext_dep_strv_equal), (gst_plugin_ext_dep_equals),
(gst_plugin_add_dependency), (gst_plugin_add_dependency_simple):
* gst/gstplugin.h: (GstPluginPrivate), (GstPluginFlags),
(GST_PLUGIN_DEPENDENCY_FLAG_NONE),
(GST_PLUGIN_DEPENDENCY_FLAG_RECURSE),
(GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_DEFAULT_ONLY),
(GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_SUFFIX),
(GstPluginDependencyFlags), (GstPluginFilter):
* gst/gstregistry.c: (gst_registry_scan_path_level):
* gst/gstregistrybinary.c: (gst_registry_binary_save_feature),
(gst_registry_binary_save_plugin_dep),
(gst_registry_binary_save_plugin),
(gst_registry_binary_load_feature),
(gst_registry_binary_load_plugin_dep_strv),
(gst_registry_binary_load_plugin_dep),
(gst_registry_binary_load_plugin):
* gst/gstregistrybinary.h: (GST_MAGIC_BINARY_VERSION_STR),
(GstBinaryPluginElement), (_GstBinaryDep), (GstBinaryDep):
* gst/gstregistryxml.c: (gst_registry_xml_save_plugin):
Add API for making a GStreamer plugin 'dependent' on external files,
directories or environment variables, so that GStreamer knows when
it needs to re-load GStreamer plugins that wrap other plugin systems.
Fixes bug #350477.
API: add gst_plugin_add_dependency()
API: add gst_plugin_add_dependency_simple()
2009-01-06 17:58:59 +00:00
|
|
|
/**
|
|
|
|
* GstPluginDependencyFlags:
|
|
|
|
* @GST_PLUGIN_DEPENDENCY_FLAG_NONE : no special flags
|
|
|
|
* @GST_PLUGIN_DEPENDENCY_FLAG_RECURSE : recurse into subdirectories
|
|
|
|
* @GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_DEFAULT_ONLY : use paths
|
|
|
|
* argument only if none of the environment variables is set
|
|
|
|
* @GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_SUFFIX : interpret
|
|
|
|
* filename argument as filter suffix and check all matching files in
|
|
|
|
* the directory
|
2015-11-13 22:32:57 +00:00
|
|
|
* @GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_PREFIX : interpret
|
|
|
|
* filename argument as filter prefix and check all matching files in
|
2019-04-23 12:08:18 +00:00
|
|
|
* the directory. Since: 1.8.
|
2017-09-25 18:35:59 +00:00
|
|
|
* @GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_RELATIVE_TO_EXE : interpret
|
|
|
|
* non-absolute paths as relative to the main executable directory. Since
|
|
|
|
* 1.14.
|
Add API for making a GStreamer plugin 'dependent' on external files, directories or environment variables, so that GS...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt::
* gst/gst_private.h: (GstPluginDep), (_GstPluginPrivate):
* gst/gstplugin.c: (gst_plugin_init), (gst_plugin_finalize),
(gst_plugin_class_init), (gst_plugin_list_free),
(gst_plugin_ext_dep_get_env_vars_hash),
(_priv_plugin_deps_env_vars_changed),
(gst_plugin_ext_dep_extract_env_vars_paths),
(gst_plugin_ext_dep_get_hash_from_stat_entry),
(gst_plugin_ext_dep_direntry_matches),
(gst_plugin_ext_dep_scan_dir_and_match_names),
(gst_plugin_ext_dep_scan_path_with_filenames),
(gst_plugin_ext_dep_get_stat_hash),
(_priv_plugin_deps_files_changed), (gst_plugin_ext_dep_free),
(gst_plugin_ext_dep_strv_equal), (gst_plugin_ext_dep_equals),
(gst_plugin_add_dependency), (gst_plugin_add_dependency_simple):
* gst/gstplugin.h: (GstPluginPrivate), (GstPluginFlags),
(GST_PLUGIN_DEPENDENCY_FLAG_NONE),
(GST_PLUGIN_DEPENDENCY_FLAG_RECURSE),
(GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_DEFAULT_ONLY),
(GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_SUFFIX),
(GstPluginDependencyFlags), (GstPluginFilter):
* gst/gstregistry.c: (gst_registry_scan_path_level):
* gst/gstregistrybinary.c: (gst_registry_binary_save_feature),
(gst_registry_binary_save_plugin_dep),
(gst_registry_binary_save_plugin),
(gst_registry_binary_load_feature),
(gst_registry_binary_load_plugin_dep_strv),
(gst_registry_binary_load_plugin_dep),
(gst_registry_binary_load_plugin):
* gst/gstregistrybinary.h: (GST_MAGIC_BINARY_VERSION_STR),
(GstBinaryPluginElement), (_GstBinaryDep), (GstBinaryDep):
* gst/gstregistryxml.c: (gst_registry_xml_save_plugin):
Add API for making a GStreamer plugin 'dependent' on external files,
directories or environment variables, so that GStreamer knows when
it needs to re-load GStreamer plugins that wrap other plugin systems.
Fixes bug #350477.
API: add gst_plugin_add_dependency()
API: add gst_plugin_add_dependency_simple()
2009-01-06 17:58:59 +00:00
|
|
|
*
|
|
|
|
* Flags used in connection with gst_plugin_add_dependency().
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
GST_PLUGIN_DEPENDENCY_FLAG_NONE = 0,
|
|
|
|
GST_PLUGIN_DEPENDENCY_FLAG_RECURSE = (1 << 0),
|
|
|
|
GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_DEFAULT_ONLY = (1 << 1),
|
2015-11-13 22:32:57 +00:00
|
|
|
GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_SUFFIX = (1 << 2),
|
2017-09-25 18:35:59 +00:00
|
|
|
GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_PREFIX = (1 << 3),
|
|
|
|
GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_RELATIVE_TO_EXE = (1 << 4)
|
Add API for making a GStreamer plugin 'dependent' on external files, directories or environment variables, so that GS...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt::
* gst/gst_private.h: (GstPluginDep), (_GstPluginPrivate):
* gst/gstplugin.c: (gst_plugin_init), (gst_plugin_finalize),
(gst_plugin_class_init), (gst_plugin_list_free),
(gst_plugin_ext_dep_get_env_vars_hash),
(_priv_plugin_deps_env_vars_changed),
(gst_plugin_ext_dep_extract_env_vars_paths),
(gst_plugin_ext_dep_get_hash_from_stat_entry),
(gst_plugin_ext_dep_direntry_matches),
(gst_plugin_ext_dep_scan_dir_and_match_names),
(gst_plugin_ext_dep_scan_path_with_filenames),
(gst_plugin_ext_dep_get_stat_hash),
(_priv_plugin_deps_files_changed), (gst_plugin_ext_dep_free),
(gst_plugin_ext_dep_strv_equal), (gst_plugin_ext_dep_equals),
(gst_plugin_add_dependency), (gst_plugin_add_dependency_simple):
* gst/gstplugin.h: (GstPluginPrivate), (GstPluginFlags),
(GST_PLUGIN_DEPENDENCY_FLAG_NONE),
(GST_PLUGIN_DEPENDENCY_FLAG_RECURSE),
(GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_DEFAULT_ONLY),
(GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_SUFFIX),
(GstPluginDependencyFlags), (GstPluginFilter):
* gst/gstregistry.c: (gst_registry_scan_path_level):
* gst/gstregistrybinary.c: (gst_registry_binary_save_feature),
(gst_registry_binary_save_plugin_dep),
(gst_registry_binary_save_plugin),
(gst_registry_binary_load_feature),
(gst_registry_binary_load_plugin_dep_strv),
(gst_registry_binary_load_plugin_dep),
(gst_registry_binary_load_plugin):
* gst/gstregistrybinary.h: (GST_MAGIC_BINARY_VERSION_STR),
(GstBinaryPluginElement), (_GstBinaryDep), (GstBinaryDep):
* gst/gstregistryxml.c: (gst_registry_xml_save_plugin):
Add API for making a GStreamer plugin 'dependent' on external files,
directories or environment variables, so that GStreamer knows when
it needs to re-load GStreamer plugins that wrap other plugin systems.
Fixes bug #350477.
API: add gst_plugin_add_dependency()
API: add gst_plugin_add_dependency_simple()
2009-01-06 17:58:59 +00:00
|
|
|
} GstPluginDependencyFlags;
|
|
|
|
|
2005-09-25 12:11:39 +00:00
|
|
|
/**
|
|
|
|
* GstPluginInitFunc:
|
2009-11-25 14:44:05 +00:00
|
|
|
* @plugin: The plugin object
|
2005-09-25 12:11:39 +00:00
|
|
|
*
|
|
|
|
* A plugin should provide a pointer to a function of this type in the
|
|
|
|
* plugin_desc struct.
|
2009-11-25 14:44:05 +00:00
|
|
|
* This function will be called by the loader at startup. One would then
|
|
|
|
* register each #GstPluginFeature.
|
2005-09-25 12:11:39 +00:00
|
|
|
*
|
2005-10-15 15:30:24 +00:00
|
|
|
* Returns: %TRUE if plugin initialised successfully
|
2005-09-25 12:11:39 +00:00
|
|
|
*/
|
2010-03-13 10:03:59 +00:00
|
|
|
/* FIXME 0.11: Make return void */
|
2004-03-15 14:43:35 +00:00
|
|
|
typedef gboolean (*GstPluginInitFunc) (GstPlugin *plugin);
|
2003-10-07 21:58:42 +00:00
|
|
|
|
2009-05-07 14:37:37 +00:00
|
|
|
/**
|
|
|
|
* GstPluginInitFullFunc:
|
2009-11-25 14:44:05 +00:00
|
|
|
* @plugin: The plugin object
|
2009-11-27 12:17:35 +00:00
|
|
|
* @user_data: extra data
|
2009-05-07 14:37:37 +00:00
|
|
|
*
|
|
|
|
* A plugin should provide a pointer to a function of either #GstPluginInitFunc
|
|
|
|
* or this type in the plugin_desc struct.
|
2009-11-25 14:44:05 +00:00
|
|
|
* The function will be called by the loader at startup. One would then
|
|
|
|
* register each #GstPluginFeature. This version allows
|
2009-05-07 14:37:37 +00:00
|
|
|
* user data to be passed to init function (useful for bindings).
|
|
|
|
*
|
|
|
|
* Returns: %TRUE if plugin initialised successfully
|
|
|
|
*/
|
2010-03-13 10:03:59 +00:00
|
|
|
/* FIXME 0.11: Merge with GstPluginInitFunc */
|
2009-05-07 14:37:37 +00:00
|
|
|
typedef gboolean (*GstPluginInitFullFunc) (GstPlugin *plugin, gpointer user_data);
|
|
|
|
|
2005-09-25 12:11:39 +00:00
|
|
|
/**
|
|
|
|
* GstPluginDesc:
|
|
|
|
* @major_version: the major version number of core that plugin was compiled for
|
|
|
|
* @minor_version: the minor version number of core that plugin was compiled for
|
|
|
|
* @name: a unique name of the plugin
|
|
|
|
* @description: description of plugin
|
|
|
|
* @plugin_init: pointer to the init function of this plugin.
|
|
|
|
* @version: version of the plugin
|
|
|
|
* @license: effective license of plugin
|
|
|
|
* @source: source module plugin belongs to
|
|
|
|
* @package: shipped package plugin belongs to
|
|
|
|
* @origin: URL to provider of plugin
|
2014-06-11 23:19:01 +00:00
|
|
|
* @release_datetime: (allow-none): date time string in ISO 8601
|
|
|
|
* format (or rather, a subset thereof), or %NULL. Allowed are the
|
|
|
|
* following formats: "YYYY-MM-DD" and "YYY-MM-DDTHH:MMZ" (with
|
|
|
|
* 'T' a separator and 'Z' indicating UTC/Zulu time). This field
|
2015-06-14 01:02:20 +00:00
|
|
|
* should be set via the GST_PACKAGE_RELEASE_DATETIME
|
2014-06-11 23:19:01 +00:00
|
|
|
* preprocessor macro.
|
2005-10-15 15:30:24 +00:00
|
|
|
*
|
2007-01-30 15:04:33 +00:00
|
|
|
* A plugin should export a variable of this type called plugin_desc. The plugin
|
|
|
|
* loader will use the data provided there to initialize the plugin.
|
2005-09-25 12:11:39 +00:00
|
|
|
*
|
2007-01-30 15:04:33 +00:00
|
|
|
* The @licence parameter must be one of: LGPL, GPL, QPL, GPL/QPL, MPL,
|
2007-09-24 17:41:25 +00:00
|
|
|
* BSD, MIT/X11, Proprietary, unknown.
|
2005-09-25 12:11:39 +00:00
|
|
|
*/
|
2004-03-15 14:43:35 +00:00
|
|
|
struct _GstPluginDesc {
|
2005-09-25 12:11:39 +00:00
|
|
|
gint major_version;
|
|
|
|
gint minor_version;
|
2007-10-09 14:18:39 +00:00
|
|
|
const gchar *name;
|
2010-03-03 10:45:38 +00:00
|
|
|
const gchar *description;
|
2005-09-25 12:11:39 +00:00
|
|
|
GstPluginInitFunc plugin_init;
|
2007-10-09 14:18:39 +00:00
|
|
|
const gchar *version;
|
|
|
|
const gchar *license;
|
|
|
|
const gchar *source;
|
|
|
|
const gchar *package;
|
|
|
|
const gchar *origin;
|
2010-06-19 23:33:36 +00:00
|
|
|
const gchar *release_datetime;
|
|
|
|
/*< private >*/
|
2011-02-22 15:04:12 +00:00
|
|
|
gpointer _gst_reserved[GST_PADDING];
|
2000-01-30 09:03:00 +00:00
|
|
|
};
|
|
|
|
|
2005-09-15 00:13:26 +00:00
|
|
|
|
|
|
|
#define GST_TYPE_PLUGIN (gst_plugin_get_type())
|
|
|
|
#define GST_IS_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PLUGIN))
|
|
|
|
#define GST_IS_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PLUGIN))
|
|
|
|
#define GST_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_PLUGIN, GstPluginClass))
|
|
|
|
#define GST_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PLUGIN, GstPlugin))
|
|
|
|
#define GST_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_PLUGIN, GstPluginClass))
|
2006-06-12 09:11:44 +00:00
|
|
|
#define GST_PLUGIN_CAST(obj) ((GstPlugin*)(obj))
|
2005-09-15 00:13:26 +00:00
|
|
|
|
2010-06-19 23:33:36 +00:00
|
|
|
#ifdef GST_PACKAGE_RELEASE_DATETIME
|
|
|
|
#define __GST_PACKAGE_RELEASE_DATETIME GST_PACKAGE_RELEASE_DATETIME
|
|
|
|
#else
|
|
|
|
#define __GST_PACKAGE_RELEASE_DATETIME NULL
|
|
|
|
#endif
|
|
|
|
|
2012-10-24 09:58:35 +00:00
|
|
|
/**
|
|
|
|
* GST_PLUGIN_STATIC_DECLARE:
|
|
|
|
* @name: short, but unique name of the plugin
|
|
|
|
*
|
|
|
|
* This macro can be used to initialize statically linked plugins. It is
|
|
|
|
* necessary to call this macro before the plugin can be used.
|
|
|
|
* It has to be used in combination with GST_PLUGIN_STATIC_REGISTER
|
|
|
|
* and must be placed outside any block to declare the plugin initialization
|
|
|
|
* function.
|
|
|
|
*
|
2013-11-16 12:24:56 +00:00
|
|
|
* Since: 1.2
|
2012-10-24 09:58:35 +00:00
|
|
|
*/
|
|
|
|
#define GST_PLUGIN_STATIC_DECLARE(name) \
|
|
|
|
extern void G_PASTE(gst_plugin_, G_PASTE(name, _register)) (void)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_PLUGIN_STATIC_REGISTER:
|
|
|
|
* @name: short, but unique name of the plugin
|
|
|
|
*
|
|
|
|
* This macro can be used to initialize statically linked plugins. It is
|
|
|
|
* necessary to call this macro before the plugin can be used.
|
|
|
|
* It has to be used in combination with GST_PLUGIN_STATIC_DECLARE and
|
|
|
|
* calls the plugin initialization function.
|
|
|
|
*
|
2013-11-16 12:24:56 +00:00
|
|
|
* Since: 1.2
|
2012-10-24 09:58:35 +00:00
|
|
|
*/
|
|
|
|
#define GST_PLUGIN_STATIC_REGISTER(name) G_PASTE(gst_plugin_, G_PASTE(name, _register)) ()
|
|
|
|
|
2005-09-25 12:11:39 +00:00
|
|
|
/**
|
|
|
|
* GST_PLUGIN_DEFINE:
|
|
|
|
* @major: major version number of the gstreamer-core that plugin was compiled for
|
|
|
|
* @minor: minor version number of the gstreamer-core that plugin was compiled for
|
|
|
|
* @name: short, but unique name of the plugin
|
|
|
|
* @description: information about the purpose of the plugin
|
|
|
|
* @init: function pointer to the plugin_init method with the signature of <code>static gboolean plugin_init (GstPlugin * plugin)</code>.
|
|
|
|
* @version: full version string (e.g. VERSION from config.h)
|
|
|
|
* @license: under which licence the package has been released, e.g. GPL, LGPL.
|
|
|
|
* @package: the package-name (e.g. PACKAGE_NAME from config.h)
|
|
|
|
* @origin: a description from where the package comes from (e.g. the homepage URL)
|
|
|
|
*
|
|
|
|
* This macro needs to be used to define the entry point and meta data of a
|
|
|
|
* plugin. One would use this macro to export a plugin, so that it can be used
|
2009-01-25 20:11:32 +00:00
|
|
|
* by other applications.
|
|
|
|
*
|
|
|
|
* The macro uses a define named PACKAGE for the #GstPluginDesc,source field.
|
2010-06-19 23:33:36 +00:00
|
|
|
* When using autoconf, this is usually set automatically via the AC_INIT
|
|
|
|
* macro, and set in config.h. If you are not using autoconf, you will need to
|
|
|
|
* define PACKAGE yourself and set it to a short mnemonic string identifying
|
|
|
|
* your application/package, e.g. 'someapp' or 'my-plugins-foo.
|
|
|
|
*
|
|
|
|
* If defined, the GST_PACKAGE_RELEASE_DATETIME will also be used for the
|
|
|
|
* #GstPluginDesc,release_datetime field.
|
2005-09-25 12:11:39 +00:00
|
|
|
*/
|
2017-02-28 02:38:11 +00:00
|
|
|
#define GST_PLUGIN_DEFINE(major,minor,name,description,init,version,license,package,origin) \
|
2009-11-09 18:52:42 +00:00
|
|
|
G_BEGIN_DECLS \
|
2017-02-28 02:38:11 +00:00
|
|
|
GST_PLUGIN_EXPORT const GstPluginDesc * G_PASTE(gst_plugin_, G_PASTE(name, _get_desc)) (void); \
|
|
|
|
GST_PLUGIN_EXPORT void G_PASTE(gst_plugin_, G_PASTE(name, _register)) (void); \
|
|
|
|
\
|
|
|
|
static const GstPluginDesc gst_plugin_desc = { \
|
|
|
|
major, \
|
|
|
|
minor, \
|
|
|
|
G_STRINGIFY(name), \
|
|
|
|
(gchar *) description, \
|
|
|
|
init, \
|
|
|
|
version, \
|
|
|
|
license, \
|
|
|
|
PACKAGE, \
|
|
|
|
package, \
|
|
|
|
origin, \
|
|
|
|
__GST_PACKAGE_RELEASE_DATETIME, \
|
|
|
|
GST_PADDING_INIT \
|
|
|
|
}; \
|
|
|
|
\
|
|
|
|
const GstPluginDesc * \
|
|
|
|
G_PASTE(gst_plugin_, G_PASTE(name, _get_desc)) (void) \
|
|
|
|
{ \
|
|
|
|
return &gst_plugin_desc; \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
void \
|
|
|
|
G_PASTE(gst_plugin_, G_PASTE(name, _register)) (void) \
|
|
|
|
{ \
|
|
|
|
gst_plugin_register_static (major, minor, G_STRINGIFY(name), \
|
|
|
|
description, init, version, license, \
|
|
|
|
PACKAGE, package, origin); \
|
|
|
|
} \
|
2009-11-09 18:52:42 +00:00
|
|
|
G_END_DECLS
|
2003-12-22 01:39:35 +00:00
|
|
|
|
2005-09-25 12:11:39 +00:00
|
|
|
/**
|
|
|
|
* GST_LICENSE_UNKNOWN:
|
|
|
|
*
|
2013-12-07 14:38:19 +00:00
|
|
|
* To be used in GST_PLUGIN_DEFINE if unsure about the licence.
|
2005-09-25 12:11:39 +00:00
|
|
|
*/
|
2003-10-31 19:32:47 +00:00
|
|
|
#define GST_LICENSE_UNKNOWN "unknown"
|
2001-08-21 20:16:48 +00:00
|
|
|
|
2003-11-13 02:47:03 +00:00
|
|
|
|
2003-04-14 18:53:03 +00:00
|
|
|
/* function for filters */
|
2005-09-25 12:11:39 +00:00
|
|
|
/**
|
|
|
|
* GstPluginFilter:
|
|
|
|
* @plugin: the plugin to check
|
|
|
|
* @user_data: the user_data that has been passed on e.g. gst_registry_plugin_filter()
|
|
|
|
*
|
|
|
|
* A function that can be used with e.g. gst_registry_plugin_filter()
|
|
|
|
* to get a list of plugins that match certain criteria.
|
|
|
|
*
|
2014-05-29 21:54:34 +00:00
|
|
|
* Returns: %TRUE for a positive match, %FALSE otherwise
|
2005-09-25 12:11:39 +00:00
|
|
|
*/
|
2004-03-15 14:43:35 +00:00
|
|
|
typedef gboolean (*GstPluginFilter) (GstPlugin *plugin,
|
|
|
|
gpointer user_data);
|
2003-04-14 18:53:03 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2004-03-15 14:43:35 +00:00
|
|
|
GType gst_plugin_get_type (void);
|
2005-09-15 00:13:26 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2008-01-17 22:17:15 +00:00
|
|
|
gboolean gst_plugin_register_static (gint major_version,
|
|
|
|
gint minor_version,
|
|
|
|
const gchar *name,
|
2010-03-03 10:45:38 +00:00
|
|
|
const gchar *description,
|
2008-01-17 22:17:15 +00:00
|
|
|
GstPluginInitFunc init_func,
|
|
|
|
const gchar *version,
|
|
|
|
const gchar *license,
|
|
|
|
const gchar *source,
|
|
|
|
const gchar *package,
|
|
|
|
const gchar *origin);
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2009-05-07 14:37:37 +00:00
|
|
|
gboolean gst_plugin_register_static_full (gint major_version,
|
|
|
|
gint minor_version,
|
|
|
|
const gchar *name,
|
2010-03-03 10:45:38 +00:00
|
|
|
const gchar *description,
|
2009-05-07 14:37:37 +00:00
|
|
|
GstPluginInitFullFunc init_full_func,
|
|
|
|
const gchar *version,
|
|
|
|
const gchar *license,
|
|
|
|
const gchar *source,
|
|
|
|
const gchar *package,
|
|
|
|
const gchar *origin,
|
|
|
|
gpointer user_data);
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-06-09 16:13:35 +00:00
|
|
|
const gchar* gst_plugin_get_name (GstPlugin *plugin);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-06-09 16:13:35 +00:00
|
|
|
const gchar* gst_plugin_get_description (GstPlugin *plugin);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-06-09 16:13:35 +00:00
|
|
|
const gchar* gst_plugin_get_filename (GstPlugin *plugin);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-06-09 16:13:35 +00:00
|
|
|
const gchar* gst_plugin_get_version (GstPlugin *plugin);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-06-09 16:13:35 +00:00
|
|
|
const gchar* gst_plugin_get_license (GstPlugin *plugin);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-06-09 16:13:35 +00:00
|
|
|
const gchar* gst_plugin_get_source (GstPlugin *plugin);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-06-09 16:13:35 +00:00
|
|
|
const gchar* gst_plugin_get_package (GstPlugin *plugin);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-06-09 16:13:35 +00:00
|
|
|
const gchar* gst_plugin_get_origin (GstPlugin *plugin);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2012-04-29 15:20:50 +00:00
|
|
|
const gchar* gst_plugin_get_release_date_string (GstPlugin *plugin);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-06-09 16:13:35 +00:00
|
|
|
const GstStructure* gst_plugin_get_cache_data (GstPlugin * plugin);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-06-09 16:13:35 +00:00
|
|
|
void gst_plugin_set_cache_data (GstPlugin * plugin, GstStructure *cache_data);
|
2009-06-07 20:46:54 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2004-03-15 14:43:35 +00:00
|
|
|
gboolean gst_plugin_is_loaded (GstPlugin *plugin);
|
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2004-12-07 18:50:39 +00:00
|
|
|
GstPlugin * gst_plugin_load_file (const gchar *filename, GError** error);
|
2004-03-15 14:43:35 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2005-09-15 00:13:26 +00:00
|
|
|
GstPlugin * gst_plugin_load (GstPlugin *plugin);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2005-09-18 06:59:25 +00:00
|
|
|
GstPlugin * gst_plugin_load_by_name (const gchar *name);
|
2005-09-15 00:13:26 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-11-11 15:52:41 +00:00
|
|
|
void gst_plugin_add_dependency (GstPlugin * plugin,
|
|
|
|
const gchar ** env_vars,
|
|
|
|
const gchar ** paths,
|
|
|
|
const gchar ** names,
|
|
|
|
GstPluginDependencyFlags flags);
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
Add API for making a GStreamer plugin 'dependent' on external files, directories or environment variables, so that GS...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt::
* gst/gst_private.h: (GstPluginDep), (_GstPluginPrivate):
* gst/gstplugin.c: (gst_plugin_init), (gst_plugin_finalize),
(gst_plugin_class_init), (gst_plugin_list_free),
(gst_plugin_ext_dep_get_env_vars_hash),
(_priv_plugin_deps_env_vars_changed),
(gst_plugin_ext_dep_extract_env_vars_paths),
(gst_plugin_ext_dep_get_hash_from_stat_entry),
(gst_plugin_ext_dep_direntry_matches),
(gst_plugin_ext_dep_scan_dir_and_match_names),
(gst_plugin_ext_dep_scan_path_with_filenames),
(gst_plugin_ext_dep_get_stat_hash),
(_priv_plugin_deps_files_changed), (gst_plugin_ext_dep_free),
(gst_plugin_ext_dep_strv_equal), (gst_plugin_ext_dep_equals),
(gst_plugin_add_dependency), (gst_plugin_add_dependency_simple):
* gst/gstplugin.h: (GstPluginPrivate), (GstPluginFlags),
(GST_PLUGIN_DEPENDENCY_FLAG_NONE),
(GST_PLUGIN_DEPENDENCY_FLAG_RECURSE),
(GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_DEFAULT_ONLY),
(GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_SUFFIX),
(GstPluginDependencyFlags), (GstPluginFilter):
* gst/gstregistry.c: (gst_registry_scan_path_level):
* gst/gstregistrybinary.c: (gst_registry_binary_save_feature),
(gst_registry_binary_save_plugin_dep),
(gst_registry_binary_save_plugin),
(gst_registry_binary_load_feature),
(gst_registry_binary_load_plugin_dep_strv),
(gst_registry_binary_load_plugin_dep),
(gst_registry_binary_load_plugin):
* gst/gstregistrybinary.h: (GST_MAGIC_BINARY_VERSION_STR),
(GstBinaryPluginElement), (_GstBinaryDep), (GstBinaryDep):
* gst/gstregistryxml.c: (gst_registry_xml_save_plugin):
Add API for making a GStreamer plugin 'dependent' on external files,
directories or environment variables, so that GStreamer knows when
it needs to re-load GStreamer plugins that wrap other plugin systems.
Fixes bug #350477.
API: add gst_plugin_add_dependency()
API: add gst_plugin_add_dependency_simple()
2009-01-06 17:58:59 +00:00
|
|
|
void gst_plugin_add_dependency_simple (GstPlugin * plugin,
|
|
|
|
const gchar * env_vars,
|
|
|
|
const gchar * paths,
|
|
|
|
const gchar * names,
|
|
|
|
GstPluginDependencyFlags flags);
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2017-05-10 09:56:16 +00:00
|
|
|
void gst_plugin_list_free (GList *list);
|
2000-11-04 18:54:07 +00:00
|
|
|
|
2015-11-10 17:38:59 +00:00
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstPlugin, gst_object_unref)
|
|
|
|
|
2002-07-08 19:07:30 +00:00
|
|
|
G_END_DECLS
|
2004-03-15 14:43:35 +00:00
|
|
|
|
2000-01-30 09:03:00 +00:00
|
|
|
#endif /* __GST_PLUGIN_H__ */
|