2001-08-21 20:16:48 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
|
|
|
* 2000 Wim Taymans <wtay@chello.be>
|
|
|
|
*
|
|
|
|
* gstpluginfeature.h: Header for base GstPluginFeature
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __GST_PLUGIN_FEATURE_H__
|
|
|
|
#define __GST_PLUGIN_FEATURE_H__
|
|
|
|
|
2002-07-08 19:07:30 +00:00
|
|
|
#include <glib-object.h>
|
2005-09-18 06:59:25 +00:00
|
|
|
#include <gst/gstobject.h>
|
2011-04-29 22:44:55 +00:00
|
|
|
#include <gst/gstplugin.h>
|
2001-08-21 20:16:48 +00:00
|
|
|
|
2002-07-08 19:07:30 +00:00
|
|
|
G_BEGIN_DECLS
|
2004-03-15 14:43:35 +00:00
|
|
|
|
2009-09-10 09:53:09 +00:00
|
|
|
#define GST_TYPE_PLUGIN_FEATURE (gst_plugin_feature_get_type())
|
|
|
|
#define GST_PLUGIN_FEATURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PLUGIN_FEATURE, GstPluginFeature))
|
|
|
|
#define GST_IS_PLUGIN_FEATURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PLUGIN_FEATURE))
|
|
|
|
#define GST_PLUGIN_FEATURE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_PLUGIN_FEATURE, GstPluginFeatureClass))
|
|
|
|
#define GST_IS_PLUGIN_FEATURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PLUGIN_FEATURE))
|
|
|
|
#define GST_PLUGIN_FEATURE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_PLUGIN_FEATURE, GstPluginFeatureClass))
|
|
|
|
#define GST_PLUGIN_FEATURE_CAST(obj) ((GstPluginFeature*)(obj))
|
2004-03-15 14:43:35 +00:00
|
|
|
|
more docs inlined, splitted gstindex.{c,h}
Original commit message from CVS:
* docs/gst/gstreamer-docs.sgml:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* gst/Makefile.am:
* gst/gst.h:
* gst/gstbin.c:
* gst/gstelement.h:
* gst/gstindex.c: (gst_index_class_init):
* gst/gstindex.h:
* gst/gstindexfactory.c: (gst_index_factory_get_type),
(gst_index_factory_class_init), (gst_index_factory_init),
(gst_index_factory_finalize), (gst_index_factory_new),
(gst_index_factory_destroy), (gst_index_factory_find),
(gst_index_factory_create), (gst_index_factory_make):
* gst/gstindexfactory.h:
* gst/gstpluginfeature.c:
* gst/gstpluginfeature.h:
* libs/gst/controller/gstcontroller.c: (gst_controller_new_valist):
more docs inlined, splitted gstindex.{c,h}
2005-09-20 20:40:00 +00:00
|
|
|
/**
|
|
|
|
* GST_PLUGIN_FEATURE_NAME:
|
|
|
|
* @feature: The feature to query
|
|
|
|
*
|
|
|
|
* Get the name of the feature
|
|
|
|
*/
|
2002-05-08 20:40:48 +00:00
|
|
|
#define GST_PLUGIN_FEATURE_NAME(feature) (GST_PLUGIN_FEATURE (feature)->name)
|
2004-03-15 14:43:35 +00:00
|
|
|
|
2001-08-21 20:16:48 +00:00
|
|
|
typedef struct _GstPluginFeature GstPluginFeature;
|
|
|
|
typedef struct _GstPluginFeatureClass GstPluginFeatureClass;
|
|
|
|
|
more docs inlined, splitted gstindex.{c,h}
Original commit message from CVS:
* docs/gst/gstreamer-docs.sgml:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* gst/Makefile.am:
* gst/gst.h:
* gst/gstbin.c:
* gst/gstelement.h:
* gst/gstindex.c: (gst_index_class_init):
* gst/gstindex.h:
* gst/gstindexfactory.c: (gst_index_factory_get_type),
(gst_index_factory_class_init), (gst_index_factory_init),
(gst_index_factory_finalize), (gst_index_factory_new),
(gst_index_factory_destroy), (gst_index_factory_find),
(gst_index_factory_create), (gst_index_factory_make):
* gst/gstindexfactory.h:
* gst/gstpluginfeature.c:
* gst/gstpluginfeature.h:
* libs/gst/controller/gstcontroller.c: (gst_controller_new_valist):
more docs inlined, splitted gstindex.{c,h}
2005-09-20 20:40:00 +00:00
|
|
|
/**
|
|
|
|
* GstRank:
|
|
|
|
* @GST_RANK_NONE: will be chosen last or not at all
|
2011-09-07 11:14:38 +00:00
|
|
|
* @GST_RANK_MARGINAL: unlikely to be chosen
|
more docs inlined, splitted gstindex.{c,h}
Original commit message from CVS:
* docs/gst/gstreamer-docs.sgml:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* gst/Makefile.am:
* gst/gst.h:
* gst/gstbin.c:
* gst/gstelement.h:
* gst/gstindex.c: (gst_index_class_init):
* gst/gstindex.h:
* gst/gstindexfactory.c: (gst_index_factory_get_type),
(gst_index_factory_class_init), (gst_index_factory_init),
(gst_index_factory_finalize), (gst_index_factory_new),
(gst_index_factory_destroy), (gst_index_factory_find),
(gst_index_factory_create), (gst_index_factory_make):
* gst/gstindexfactory.h:
* gst/gstpluginfeature.c:
* gst/gstpluginfeature.h:
* libs/gst/controller/gstcontroller.c: (gst_controller_new_valist):
more docs inlined, splitted gstindex.{c,h}
2005-09-20 20:40:00 +00:00
|
|
|
* @GST_RANK_SECONDARY: likely to be chosen
|
|
|
|
* @GST_RANK_PRIMARY: will be chosen first
|
|
|
|
*
|
|
|
|
* Element priority ranks. Defines the order in which the autoplugger (or
|
2008-02-05 21:22:47 +00:00
|
|
|
* similar rank-picking mechanisms, such as e.g. gst_element_make_from_uri())
|
|
|
|
* will choose this element over an alternative one with the same function.
|
more docs inlined, splitted gstindex.{c,h}
Original commit message from CVS:
* docs/gst/gstreamer-docs.sgml:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* gst/Makefile.am:
* gst/gst.h:
* gst/gstbin.c:
* gst/gstelement.h:
* gst/gstindex.c: (gst_index_class_init):
* gst/gstindex.h:
* gst/gstindexfactory.c: (gst_index_factory_get_type),
(gst_index_factory_class_init), (gst_index_factory_init),
(gst_index_factory_finalize), (gst_index_factory_new),
(gst_index_factory_destroy), (gst_index_factory_find),
(gst_index_factory_create), (gst_index_factory_make):
* gst/gstindexfactory.h:
* gst/gstpluginfeature.c:
* gst/gstpluginfeature.h:
* libs/gst/controller/gstcontroller.c: (gst_controller_new_valist):
more docs inlined, splitted gstindex.{c,h}
2005-09-20 20:40:00 +00:00
|
|
|
*
|
2008-02-05 21:22:47 +00:00
|
|
|
* These constants serve as a rough guidance for defining the rank of a
|
|
|
|
* #GstPluginFeature. Any value is valid, including values bigger than
|
|
|
|
* @GST_RANK_PRIMARY.
|
more docs inlined, splitted gstindex.{c,h}
Original commit message from CVS:
* docs/gst/gstreamer-docs.sgml:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* gst/Makefile.am:
* gst/gst.h:
* gst/gstbin.c:
* gst/gstelement.h:
* gst/gstindex.c: (gst_index_class_init):
* gst/gstindex.h:
* gst/gstindexfactory.c: (gst_index_factory_get_type),
(gst_index_factory_class_init), (gst_index_factory_init),
(gst_index_factory_finalize), (gst_index_factory_new),
(gst_index_factory_destroy), (gst_index_factory_find),
(gst_index_factory_create), (gst_index_factory_make):
* gst/gstindexfactory.h:
* gst/gstpluginfeature.c:
* gst/gstpluginfeature.h:
* libs/gst/controller/gstcontroller.c: (gst_controller_new_valist):
more docs inlined, splitted gstindex.{c,h}
2005-09-20 20:40:00 +00:00
|
|
|
*/
|
2005-07-18 12:49:53 +00:00
|
|
|
typedef enum {
|
|
|
|
GST_RANK_NONE = 0,
|
|
|
|
GST_RANK_MARGINAL = 64,
|
|
|
|
GST_RANK_SECONDARY = 128,
|
|
|
|
GST_RANK_PRIMARY = 256
|
|
|
|
} GstRank;
|
|
|
|
|
2005-11-24 09:44:07 +00:00
|
|
|
/**
|
|
|
|
* GstPluginFeature:
|
|
|
|
*
|
|
|
|
* Opaque #GstPluginFeature structure.
|
|
|
|
*/
|
2004-03-15 14:43:35 +00:00
|
|
|
struct _GstPluginFeature {
|
2007-10-13 17:20:09 +00:00
|
|
|
GstObject object;
|
2002-05-08 20:40:48 +00:00
|
|
|
|
2004-03-15 14:43:35 +00:00
|
|
|
/*< private >*/
|
2005-09-18 06:59:25 +00:00
|
|
|
gboolean loaded;
|
2011-04-28 08:34:39 +00:00
|
|
|
gchar *name; /* FIXME-0.11: remove variable, we use GstObject:name */
|
2007-10-13 17:20:09 +00:00
|
|
|
guint rank;
|
2001-08-21 20:16:48 +00:00
|
|
|
|
2007-10-13 17:20:09 +00:00
|
|
|
const gchar *plugin_name;
|
2011-04-24 08:53:39 +00:00
|
|
|
GstPlugin *plugin; /* weak ref */
|
2003-10-07 21:58:42 +00:00
|
|
|
|
2005-07-18 12:49:53 +00:00
|
|
|
/*< private >*/
|
2011-04-24 08:53:39 +00:00
|
|
|
gpointer _gst_reserved[GST_PADDING - 1];
|
2001-08-21 20:16:48 +00:00
|
|
|
};
|
|
|
|
|
2004-03-15 14:43:35 +00:00
|
|
|
struct _GstPluginFeatureClass {
|
2009-09-10 09:53:09 +00:00
|
|
|
GstObjectClass parent_class;
|
2001-08-21 20:16:48 +00:00
|
|
|
|
2005-03-07 18:27:42 +00:00
|
|
|
/*< private >*/
|
2003-12-09 02:39:31 +00:00
|
|
|
gpointer _gst_reserved[GST_PADDING];
|
2001-08-21 20:16:48 +00:00
|
|
|
};
|
|
|
|
|
2005-11-24 09:44:07 +00:00
|
|
|
/**
|
|
|
|
* GstTypeNameData:
|
|
|
|
* @name: a name
|
|
|
|
* @type: a GType
|
|
|
|
*
|
|
|
|
* Structure used for filtering based on @name and @type.
|
|
|
|
*/
|
2011-10-30 21:21:59 +00:00
|
|
|
#ifndef GST_DISABLE_DEPRECATED
|
2004-03-15 14:43:35 +00:00
|
|
|
typedef struct {
|
2009-09-10 09:53:09 +00:00
|
|
|
const gchar *name;
|
|
|
|
GType type;
|
2004-03-15 14:43:35 +00:00
|
|
|
} GstTypeNameData;
|
2011-10-30 21:21:59 +00:00
|
|
|
#endif
|
2003-04-14 18:53:03 +00:00
|
|
|
|
more docs inlined, splitted gstindex.{c,h}
Original commit message from CVS:
* docs/gst/gstreamer-docs.sgml:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* gst/Makefile.am:
* gst/gst.h:
* gst/gstbin.c:
* gst/gstelement.h:
* gst/gstindex.c: (gst_index_class_init):
* gst/gstindex.h:
* gst/gstindexfactory.c: (gst_index_factory_get_type),
(gst_index_factory_class_init), (gst_index_factory_init),
(gst_index_factory_finalize), (gst_index_factory_new),
(gst_index_factory_destroy), (gst_index_factory_find),
(gst_index_factory_create), (gst_index_factory_make):
* gst/gstindexfactory.h:
* gst/gstpluginfeature.c:
* gst/gstpluginfeature.h:
* libs/gst/controller/gstcontroller.c: (gst_controller_new_valist):
more docs inlined, splitted gstindex.{c,h}
2005-09-20 20:40:00 +00:00
|
|
|
/**
|
|
|
|
* GstPluginFeatureFilter:
|
|
|
|
* @feature: the pluginfeature to check
|
|
|
|
* @user_data: the user_data that has been passed on e.g.
|
|
|
|
* gst_registry_feature_filter()
|
|
|
|
*
|
|
|
|
* A function that can be used with e.g. gst_registry_feature_filter()
|
|
|
|
* to get a list of pluginfeature that match certain criteria.
|
|
|
|
*
|
|
|
|
* Returns: %TRUE for a positive match, %FALSE otherwise
|
|
|
|
*/
|
2004-03-15 14:43:35 +00:00
|
|
|
typedef gboolean (*GstPluginFeatureFilter) (GstPluginFeature *feature,
|
|
|
|
gpointer user_data);
|
2001-08-21 20:16:48 +00:00
|
|
|
|
|
|
|
/* normal GObject stuff */
|
2009-09-10 09:53:09 +00:00
|
|
|
GType gst_plugin_feature_get_type (void);
|
2001-08-21 20:16:48 +00:00
|
|
|
|
2005-09-15 00:13:26 +00:00
|
|
|
GstPluginFeature *
|
2009-09-10 09:53:09 +00:00
|
|
|
gst_plugin_feature_load (GstPluginFeature *feature);
|
2001-08-21 20:16:48 +00:00
|
|
|
|
2011-10-30 21:21:59 +00:00
|
|
|
#ifndef GST_DISABLE_DEPRECATED
|
2009-09-10 09:53:09 +00:00
|
|
|
gboolean gst_plugin_feature_type_name_filter (GstPluginFeature *feature,
|
|
|
|
GstTypeNameData *data);
|
2011-10-30 21:21:59 +00:00
|
|
|
#endif
|
2003-04-14 18:53:03 +00:00
|
|
|
|
2009-09-10 09:53:09 +00:00
|
|
|
void gst_plugin_feature_set_rank (GstPluginFeature *feature, guint rank);
|
|
|
|
void gst_plugin_feature_set_name (GstPluginFeature *feature, const gchar *name);
|
|
|
|
guint gst_plugin_feature_get_rank (GstPluginFeature *feature);
|
2011-06-09 16:13:35 +00:00
|
|
|
const gchar *gst_plugin_feature_get_name (GstPluginFeature *feature);
|
2003-08-19 07:31:24 +00:00
|
|
|
|
2005-09-15 20:56:30 +00:00
|
|
|
void gst_plugin_feature_list_free (GList *list);
|
2011-11-26 18:57:44 +00:00
|
|
|
GList *gst_plugin_feature_list_copy (GList *list) G_GNUC_MALLOC;
|
2010-08-16 17:01:15 +00:00
|
|
|
void gst_plugin_feature_list_debug (GList *list);
|
|
|
|
|
2011-05-02 13:20:24 +00:00
|
|
|
/**
|
|
|
|
* GST_PLUGIN_FEATURE_LIST_DEBUG:
|
|
|
|
* @list: (transfer none) (element-type Gst.PluginFeature): a #GList of
|
|
|
|
* plugin features
|
|
|
|
*
|
|
|
|
* Debug the plugin feature names in @list.
|
|
|
|
*
|
|
|
|
* Since: 0.10.31
|
|
|
|
*/
|
2010-08-16 17:01:15 +00:00
|
|
|
#ifndef GST_DISABLE_GST_DEBUG
|
|
|
|
#define GST_PLUGIN_FEATURE_LIST_DEBUG(list) gst_plugin_feature_list_debug(list)
|
|
|
|
#else
|
|
|
|
#define GST_PLUGIN_FEATURE_LIST_DEBUG(list)
|
|
|
|
#endif
|
2005-09-15 20:56:30 +00:00
|
|
|
|
2005-10-14 11:09:29 +00:00
|
|
|
gboolean gst_plugin_feature_check_version (GstPluginFeature *feature,
|
|
|
|
guint min_major,
|
|
|
|
guint min_minor,
|
|
|
|
guint min_micro);
|
2010-08-16 17:01:15 +00:00
|
|
|
gint gst_plugin_feature_rank_compare_func (gconstpointer p1,
|
|
|
|
gconstpointer p2);
|
2005-10-14 11:09:29 +00:00
|
|
|
|
2002-07-08 19:07:30 +00:00
|
|
|
G_END_DECLS
|
2004-03-15 14:43:35 +00:00
|
|
|
|
|
|
|
|
2001-08-21 20:16:48 +00:00
|
|
|
#endif /* __GST_PLUGIN_FEATURE_H__ */
|
2004-03-15 14:43:35 +00:00
|
|
|
|