2005-05-30 15:51:40 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
|
|
|
* 2000,2004 Wim Taymans <wim@fluendo.com>
|
|
|
|
*
|
2015-05-13 14:25:21 +00:00
|
|
|
* gstelementfactory.h: Header for GstElementFactory
|
2005-05-30 15:51:40 +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.
|
2005-05-30 15:51:40 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __GST_ELEMENT_FACTORY_H__
|
|
|
|
#define __GST_ELEMENT_FACTORY_H__
|
|
|
|
|
2012-05-19 14:51:53 +00:00
|
|
|
/**
|
|
|
|
* GstElementFactory:
|
|
|
|
*
|
|
|
|
* The opaque #GstElementFactory data structure.
|
|
|
|
*/
|
2005-07-18 12:49:53 +00:00
|
|
|
typedef struct _GstElementFactory GstElementFactory;
|
|
|
|
typedef struct _GstElementFactoryClass GstElementFactoryClass;
|
|
|
|
|
2005-05-30 15:51:40 +00:00
|
|
|
#include <gst/gstconfig.h>
|
|
|
|
#include <gst/gstelement.h>
|
2012-05-19 14:51:53 +00:00
|
|
|
#include <gst/gstpad.h>
|
2005-05-30 15:51:40 +00:00
|
|
|
#include <gst/gstplugin.h>
|
|
|
|
#include <gst/gstpluginfeature.h>
|
2011-11-13 20:56:02 +00:00
|
|
|
#include <gst/gsturi.h>
|
2005-05-30 15:51:40 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2009-09-10 09:53:09 +00:00
|
|
|
#define GST_TYPE_ELEMENT_FACTORY (gst_element_factory_get_type())
|
|
|
|
#define GST_ELEMENT_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ELEMENT_FACTORY,\
|
|
|
|
GstElementFactory))
|
|
|
|
#define GST_ELEMENT_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ELEMENT_FACTORY,\
|
|
|
|
GstElementFactoryClass))
|
|
|
|
#define GST_IS_ELEMENT_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ELEMENT_FACTORY))
|
|
|
|
#define GST_IS_ELEMENT_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ELEMENT_FACTORY))
|
2006-06-12 09:11:44 +00:00
|
|
|
#define GST_ELEMENT_FACTORY_CAST(obj) ((GstElementFactory *)(obj))
|
2005-05-30 15:51:40 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2009-09-10 09:53:09 +00:00
|
|
|
GType gst_element_factory_get_type (void);
|
2005-05-30 15:51:40 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2009-09-10 09:53:09 +00:00
|
|
|
GstElementFactory * gst_element_factory_find (const gchar *name);
|
2005-05-30 15:51:40 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2009-09-10 09:53:09 +00:00
|
|
|
GType gst_element_factory_get_element_type (GstElementFactory *factory);
|
2010-12-07 14:33:04 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-06-10 10:09:49 +00:00
|
|
|
const gchar * gst_element_factory_get_metadata (GstElementFactory *factory, const gchar *key);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2012-05-19 13:52:29 +00:00
|
|
|
gchar ** gst_element_factory_get_metadata_keys (GstElementFactory *factory);
|
2010-12-07 14:33:04 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2009-09-10 09:53:09 +00:00
|
|
|
guint gst_element_factory_get_num_pad_templates (GstElementFactory *factory);
|
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 GList * gst_element_factory_get_static_pad_templates (GstElementFactory *factory);
|
2010-12-07 14:33:04 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-11-13 20:56:02 +00:00
|
|
|
GstURIType gst_element_factory_get_uri_type (GstElementFactory *factory);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-11-13 23:07:58 +00:00
|
|
|
const gchar * const * gst_element_factory_get_uri_protocols (GstElementFactory *factory);
|
2010-12-07 14:33:04 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2009-09-10 09:53:09 +00:00
|
|
|
gboolean gst_element_factory_has_interface (GstElementFactory *factory,
|
2007-07-25 18:37:12 +00:00
|
|
|
const gchar *interfacename);
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2009-09-10 09:53:09 +00:00
|
|
|
GstElement* gst_element_factory_create (GstElementFactory *factory,
|
2011-11-26 18:57:44 +00:00
|
|
|
const gchar *name) G_GNUC_MALLOC;
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-11-26 18:57:44 +00:00
|
|
|
GstElement* gst_element_factory_make (const gchar *factoryname, const gchar *name) G_GNUC_MALLOC;
|
2005-05-30 15:51:40 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2009-09-10 09:53:09 +00:00
|
|
|
gboolean gst_element_register (GstPlugin *plugin, const gchar *name,
|
|
|
|
guint rank, GType type);
|
2005-05-30 15:51:40 +00:00
|
|
|
|
2010-08-16 17:01:15 +00:00
|
|
|
/* Factory list functions */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GstFactoryListType:
|
|
|
|
* @GST_ELEMENT_FACTORY_TYPE_DECODER: Decoder elements
|
|
|
|
* @GST_ELEMENT_FACTORY_TYPE_ENCODER: Encoder elements
|
|
|
|
* @GST_ELEMENT_FACTORY_TYPE_SINK: Sink elements
|
|
|
|
* @GST_ELEMENT_FACTORY_TYPE_SRC: Source elements
|
|
|
|
* @GST_ELEMENT_FACTORY_TYPE_MUXER: Muxer elements
|
|
|
|
* @GST_ELEMENT_FACTORY_TYPE_DEMUXER: Demuxer elements
|
|
|
|
* @GST_ELEMENT_FACTORY_TYPE_PARSER: Parser elements
|
|
|
|
* @GST_ELEMENT_FACTORY_TYPE_PAYLOADER: Payloader elements
|
|
|
|
* @GST_ELEMENT_FACTORY_TYPE_DEPAYLOADER: Depayloader elements
|
2019-04-23 12:08:18 +00:00
|
|
|
* @GST_ELEMENT_FACTORY_TYPE_DECRYPTOR: Elements handling decryption (Since: 1.6)
|
|
|
|
* @GST_ELEMENT_FACTORY_TYPE_ENCRYPTOR: Elements handling encryption (Since: 1.6)
|
2010-08-16 17:01:15 +00:00
|
|
|
* @GST_ELEMENT_FACTORY_TYPE_MAX_ELEMENTS: Private, do not use
|
|
|
|
* @GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO: Elements handling video media types
|
|
|
|
* @GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO: Elements handling audio media types
|
|
|
|
* @GST_ELEMENT_FACTORY_TYPE_MEDIA_IMAGE: Elements handling image media types
|
|
|
|
* @GST_ELEMENT_FACTORY_TYPE_MEDIA_SUBTITLE: Elements handling subtitle media types
|
|
|
|
* @GST_ELEMENT_FACTORY_TYPE_MEDIA_METADATA: Elements handling metadata media types
|
|
|
|
*
|
|
|
|
* The type of #GstElementFactory to filter.
|
|
|
|
*
|
|
|
|
* All @GstFactoryListType up to @GST_ELEMENT_FACTORY_TYPE_MAX_ELEMENTS are exclusive.
|
|
|
|
*
|
|
|
|
* If one or more of the MEDIA types are specified, then only elements
|
|
|
|
* matching the specified media types will be selected.
|
|
|
|
*/
|
|
|
|
|
2018-10-22 09:32:45 +00:00
|
|
|
/**
|
|
|
|
* GstElementFactoryListType:
|
|
|
|
*
|
|
|
|
* A type defining the type of an element factory.
|
|
|
|
*/
|
2010-08-16 17:01:15 +00:00
|
|
|
typedef guint64 GstElementFactoryListType;
|
|
|
|
|
2017-04-05 12:46:26 +00:00
|
|
|
#define GST_ELEMENT_FACTORY_TYPE_DECODER ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 0))
|
|
|
|
#define GST_ELEMENT_FACTORY_TYPE_ENCODER ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 1))
|
|
|
|
#define GST_ELEMENT_FACTORY_TYPE_SINK ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 2))
|
|
|
|
#define GST_ELEMENT_FACTORY_TYPE_SRC ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 3))
|
|
|
|
#define GST_ELEMENT_FACTORY_TYPE_MUXER ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 4))
|
|
|
|
#define GST_ELEMENT_FACTORY_TYPE_DEMUXER ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 5))
|
|
|
|
#define GST_ELEMENT_FACTORY_TYPE_PARSER ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 6))
|
|
|
|
#define GST_ELEMENT_FACTORY_TYPE_PAYLOADER ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 7))
|
|
|
|
#define GST_ELEMENT_FACTORY_TYPE_DEPAYLOADER ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 8))
|
|
|
|
#define GST_ELEMENT_FACTORY_TYPE_FORMATTER ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 9))
|
|
|
|
#define GST_ELEMENT_FACTORY_TYPE_DECRYPTOR ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 10))
|
|
|
|
#define GST_ELEMENT_FACTORY_TYPE_ENCRYPTOR ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 11))
|
|
|
|
|
|
|
|
#define GST_ELEMENT_FACTORY_TYPE_MAX_ELEMENTS ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 48))
|
|
|
|
|
|
|
|
#define GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 49))
|
|
|
|
#define GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 50))
|
|
|
|
#define GST_ELEMENT_FACTORY_TYPE_MEDIA_IMAGE ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 51))
|
|
|
|
#define GST_ELEMENT_FACTORY_TYPE_MEDIA_SUBTITLE ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 52))
|
|
|
|
#define GST_ELEMENT_FACTORY_TYPE_MEDIA_METADATA ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 53))
|
2018-10-12 14:34:45 +00:00
|
|
|
|
2010-08-16 17:01:15 +00:00
|
|
|
/**
|
2015-06-13 13:19:27 +00:00
|
|
|
* GST_ELEMENT_FACTORY_TYPE_ANY: (value 562949953421311) (type GstElementFactoryListType)
|
2010-09-13 08:17:34 +00:00
|
|
|
*
|
2010-08-16 17:01:15 +00:00
|
|
|
* Elements of any of the defined GST_ELEMENT_FACTORY_LIST types
|
|
|
|
*/
|
2017-04-05 12:46:26 +00:00
|
|
|
#define GST_ELEMENT_FACTORY_TYPE_ANY ((GstElementFactoryListType)((G_GUINT64_CONSTANT (1) << 49) - 1))
|
2010-08-16 17:01:15 +00:00
|
|
|
|
|
|
|
/**
|
2015-06-13 13:19:27 +00:00
|
|
|
* GST_ELEMENT_FACTORY_TYPE_MEDIA_ANY: (value 18446462598732840960) (type GstElementFactoryListType)
|
2010-09-13 08:17:34 +00:00
|
|
|
*
|
2010-08-16 17:01:15 +00:00
|
|
|
* Elements matching any of the defined GST_ELEMENT_FACTORY_TYPE_MEDIA types
|
|
|
|
*
|
|
|
|
* Note: Do not use this if you wish to not filter against any of the defined
|
2011-11-11 15:52:41 +00:00
|
|
|
* media types. If you wish to do this, simply don't specify any
|
2010-08-16 17:01:15 +00:00
|
|
|
* GST_ELEMENT_FACTORY_TYPE_MEDIA flag.
|
|
|
|
*/
|
2017-04-05 12:46:26 +00:00
|
|
|
#define GST_ELEMENT_FACTORY_TYPE_MEDIA_ANY ((GstElementFactoryListType)(~G_GUINT64_CONSTANT (0) << 48))
|
2010-08-16 17:01:15 +00:00
|
|
|
|
|
|
|
/**
|
2015-06-13 13:19:27 +00:00
|
|
|
* GST_ELEMENT_FACTORY_TYPE_VIDEO_ENCODER: (value 2814749767106562) (type GstElementFactoryListType)
|
2010-09-13 08:17:34 +00:00
|
|
|
*
|
2010-08-16 17:01:15 +00:00
|
|
|
* All encoders handling video or image media types
|
|
|
|
*/
|
2017-04-05 12:46:26 +00:00
|
|
|
#define GST_ELEMENT_FACTORY_TYPE_VIDEO_ENCODER ((GstElementFactoryListType)(GST_ELEMENT_FACTORY_TYPE_ENCODER | GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO | GST_ELEMENT_FACTORY_TYPE_MEDIA_IMAGE))
|
2010-08-16 17:01:15 +00:00
|
|
|
|
|
|
|
/**
|
2015-06-13 13:19:27 +00:00
|
|
|
* GST_ELEMENT_FACTORY_TYPE_AUDIO_ENCODER: (value 1125899906842626) (type GstElementFactoryListType)
|
2010-09-13 08:17:34 +00:00
|
|
|
*
|
2010-08-16 17:01:15 +00:00
|
|
|
* All encoders handling audio media types
|
|
|
|
*/
|
2017-04-05 12:46:26 +00:00
|
|
|
#define GST_ELEMENT_FACTORY_TYPE_AUDIO_ENCODER ((GstElementFactoryListType)(GST_ELEMENT_FACTORY_TYPE_ENCODER | GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO))
|
2010-08-16 17:01:15 +00:00
|
|
|
|
|
|
|
/**
|
2015-06-13 13:34:06 +00:00
|
|
|
* GST_ELEMENT_FACTORY_TYPE_AUDIOVIDEO_SINKS: (value 3940649673949188) (type GstElementFactoryListType)
|
2010-08-16 17:01:15 +00:00
|
|
|
*
|
|
|
|
* All sinks handling audio, video or image media types
|
|
|
|
*/
|
2017-04-05 12:46:26 +00:00
|
|
|
#define GST_ELEMENT_FACTORY_TYPE_AUDIOVIDEO_SINKS ((GstElementFactoryListType)(GST_ELEMENT_FACTORY_TYPE_SINK | GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO | GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO | GST_ELEMENT_FACTORY_TYPE_MEDIA_IMAGE))
|
2010-08-16 17:01:15 +00:00
|
|
|
|
|
|
|
/**
|
2018-03-21 08:11:30 +00:00
|
|
|
* GST_ELEMENT_FACTORY_TYPE_DECODABLE: (value 1377) (type GstElementFactoryListType)
|
2010-08-16 17:01:15 +00:00
|
|
|
*
|
|
|
|
* All elements used to 'decode' streams (decoders, demuxers, parsers, depayloaders)
|
|
|
|
*/
|
|
|
|
#define GST_ELEMENT_FACTORY_TYPE_DECODABLE \
|
2017-04-05 12:46:26 +00:00
|
|
|
((GstElementFactoryListType)(GST_ELEMENT_FACTORY_TYPE_DECODER | GST_ELEMENT_FACTORY_TYPE_DEMUXER | GST_ELEMENT_FACTORY_TYPE_DEPAYLOADER | GST_ELEMENT_FACTORY_TYPE_PARSER | GST_ELEMENT_FACTORY_TYPE_DECRYPTOR))
|
2010-08-16 17:01:15 +00:00
|
|
|
|
|
|
|
/* Element klass defines */
|
2011-11-11 15:52:41 +00:00
|
|
|
#define GST_ELEMENT_FACTORY_KLASS_DECODER "Decoder"
|
|
|
|
#define GST_ELEMENT_FACTORY_KLASS_ENCODER "Encoder"
|
|
|
|
#define GST_ELEMENT_FACTORY_KLASS_SINK "Sink"
|
|
|
|
#define GST_ELEMENT_FACTORY_KLASS_SRC "Source"
|
|
|
|
#define GST_ELEMENT_FACTORY_KLASS_MUXER "Muxer"
|
|
|
|
#define GST_ELEMENT_FACTORY_KLASS_DEMUXER "Demuxer"
|
|
|
|
#define GST_ELEMENT_FACTORY_KLASS_PARSER "Parser"
|
|
|
|
#define GST_ELEMENT_FACTORY_KLASS_PAYLOADER "Payloader"
|
|
|
|
#define GST_ELEMENT_FACTORY_KLASS_DEPAYLOADER "Depayloader"
|
|
|
|
#define GST_ELEMENT_FACTORY_KLASS_FORMATTER "Formatter"
|
2015-03-16 13:11:59 +00:00
|
|
|
#define GST_ELEMENT_FACTORY_KLASS_DECRYPTOR "Decryptor"
|
2015-04-14 16:47:08 +00:00
|
|
|
#define GST_ELEMENT_FACTORY_KLASS_ENCRYPTOR "Encryptor"
|
2011-11-11 15:52:41 +00:00
|
|
|
|
|
|
|
#define GST_ELEMENT_FACTORY_KLASS_MEDIA_VIDEO "Video"
|
|
|
|
#define GST_ELEMENT_FACTORY_KLASS_MEDIA_AUDIO "Audio"
|
|
|
|
#define GST_ELEMENT_FACTORY_KLASS_MEDIA_IMAGE "Image"
|
|
|
|
#define GST_ELEMENT_FACTORY_KLASS_MEDIA_SUBTITLE "Subtitle"
|
|
|
|
#define GST_ELEMENT_FACTORY_KLASS_MEDIA_METADATA "Metadata"
|
2018-10-12 14:34:45 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_ELEMENT_FACTORY_KLASS_HARDWARE:
|
|
|
|
*
|
|
|
|
* Elements interacting with hardware devices should specify this classifier in
|
|
|
|
* their metadata. You may need to put the element in "READY" state to test if
|
|
|
|
* the hardware is present in the system.
|
|
|
|
*
|
|
|
|
* Since: 1.16
|
|
|
|
*/
|
|
|
|
#define GST_ELEMENT_FACTORY_KLASS_HARDWARE "Hardware"
|
2010-08-16 17:01:15 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2010-08-16 17:01:15 +00:00
|
|
|
gboolean gst_element_factory_list_is_type (GstElementFactory *factory,
|
2011-11-11 15:52:41 +00:00
|
|
|
GstElementFactoryListType type);
|
2010-08-16 17:01:15 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2010-08-16 17:01:15 +00:00
|
|
|
GList * gst_element_factory_list_get_elements (GstElementFactoryListType type,
|
2011-11-26 19:44:23 +00:00
|
|
|
GstRank minrank) G_GNUC_MALLOC;
|
2005-05-30 15:51:40 +00:00
|
|
|
|
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2010-08-16 17:01:15 +00:00
|
|
|
GList * gst_element_factory_list_filter (GList *list, const GstCaps *caps,
|
2011-11-11 15:52:41 +00:00
|
|
|
GstPadDirection direction,
|
2011-11-26 19:44:23 +00:00
|
|
|
gboolean subsetonly) G_GNUC_MALLOC;
|
2015-11-10 17:38:59 +00:00
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstElementFactory, gst_object_unref)
|
|
|
|
|
2005-05-30 15:51:40 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GST_ELEMENT_FACTORY_H__ */
|