| gstelementfactory.h | gstelementfactory.h | |||
|---|---|---|---|---|
| skipping to change at line 38 | skipping to change at line 38 | |||
| #include <gst/gstconfig.h> | #include <gst/gstconfig.h> | |||
| #include <gst/gstelement.h> | #include <gst/gstelement.h> | |||
| #include <gst/gstobject.h> | #include <gst/gstobject.h> | |||
| #include <gst/gstplugin.h> | #include <gst/gstplugin.h> | |||
| #include <gst/gstpluginfeature.h> | #include <gst/gstpluginfeature.h> | |||
| #include <gst/gstiterator.h> | #include <gst/gstiterator.h> | |||
| G_BEGIN_DECLS | G_BEGIN_DECLS | |||
| /* FIXME 0.11: Move GstElementDetails into a private header and use it inte | ||||
| rnally | ||||
| * in GstElementFactory, GstElementClass and the registry | ||||
| */ | ||||
| typedef struct _GstElementDetails GstElementDetails; | typedef struct _GstElementDetails GstElementDetails; | |||
| /** | /** | |||
| * GstElementDetails: | * GstElementDetails: | |||
| * @longname: long, english name | * @longname: long, english name | |||
| * @klass: string describing the type of element, as an unordered list | * @klass: string describing the type of element, as an unordered list | |||
| * separated with slashes ('/'). See draft-klass.txt of the design docs | * separated with slashes ('/'). See draft-klass.txt of the design docs | |||
| * for more details and common types | * for more details and common types | |||
| * @description: what the element is about | * @description: what the element is about | |||
| * @author: who wrote this thing? | * @author: who wrote this thing? | |||
| skipping to change at line 67 | skipping to change at line 71 | |||
| * in gst_element_factory_get_longname() | * in gst_element_factory_get_longname() | |||
| */ | */ | |||
| struct _GstElementDetails | struct _GstElementDetails | |||
| { | { | |||
| /*< public > */ | /*< public > */ | |||
| gchar *longname; | gchar *longname; | |||
| gchar *klass; | gchar *klass; | |||
| gchar *description; | gchar *description; | |||
| gchar *author; | gchar *author; | |||
| /*< private > */ | /*< private >*/ | |||
| gpointer _gst_reserved[GST_PADDING]; | gpointer _gst_reserved[GST_PADDING]; | |||
| }; | }; | |||
| /** | /** | |||
| * GST_ELEMENT_DETAILS: | * GST_ELEMENT_DETAILS: | |||
| * @longname: long, english name | * @longname: long, english name | |||
| * @klass: string describing the type of element, as an unordered list | * @klass: string describing the type of element, as an unordered list | |||
| * separated with slashes ('/'). See draft-klass.txt of the design docs | * separated with slashes ('/'). See draft-klass.txt of the design docs | |||
| * for more details and common types | * for more details and common types | |||
| * @description: what the element is about | * @description: what the element is about | |||
| * @author: who wrote this element | * @author: who wrote this element | |||
| * | * | |||
| * Macro to initialize #GstElementDetails. | * Macro to initialize #GstElementDetails. | |||
| */ | */ | |||
| #define GST_ELEMENT_DETAILS(longname,klass,description,author) \ | #define GST_ELEMENT_DETAILS(longname,klass,description,author) \ | |||
| { longname, klass, description, author, {NULL} } | { longname, klass, description, author, {NULL} } | |||
| /** | /** | |||
| * GST_IS_ELEMENT_DETAILS: | * GST_IS_ELEMENT_DETAILS: | |||
| * @details: the #GstElementDetails to check | * @details: the #GstElementDetails to check | |||
| * | * | |||
| * Tests if element details are initialized. | * Tests if element details are initialized. | |||
| */ | */ | |||
| /* FIXME: what about adding '&& (*__gst_reserved==NULL)' */ | /* FIXME: what about adding '&& (*__gst_reserved==NULL)' */ | |||
| #define GST_IS_ELEMENT_DETAILS(details) ( | #define GST_IS_ELEMENT_DETAILS(details) ( | |||
| \ | \ | |||
| (details) && ((details)->longname != NULL) && ((details)->klass != NULL) | (details) && ((details)->longname != NULL) && ((details)->klass != NULL) | |||
| \ | \ | |||
| && ((details)->description != NULL) && ((details)->author != NULL)) | && ((details)->description != NULL) && ((details)->author != NULL)) | |||
| #define GST_TYPE_ELEMENT_FACTORY (gst_element_factory_get_typ | #define GST_TYPE_ELEMENT_FACTORY (gst_element_factory_get_ty | |||
| e()) | pe()) | |||
| #define GST_ELEMENT_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST( | #define GST_ELEMENT_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST | |||
| (obj),GST_TYPE_ELEMENT_FACTORY,\ | ((obj),GST_TYPE_ELEMENT_FACTORY,\ | |||
| GstElementFactory)) | GstElementFactory)) | |||
| #define GST_ELEMENT_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((kl | #define GST_ELEMENT_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((k | |||
| ass),GST_TYPE_ELEMENT_FACTORY,\ | lass),GST_TYPE_ELEMENT_FACTORY,\ | |||
| GstElementFactoryClass)) | GstElementFactoryClass)) | |||
| #define GST_IS_ELEMENT_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE( | #define GST_IS_ELEMENT_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE | |||
| (obj),GST_TYPE_ELEMENT_FACTORY)) | ((obj),GST_TYPE_ELEMENT_FACTORY)) | |||
| #define GST_IS_ELEMENT_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((kl | #define GST_IS_ELEMENT_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((k | |||
| ass),GST_TYPE_ELEMENT_FACTORY)) | lass),GST_TYPE_ELEMENT_FACTORY)) | |||
| #define GST_ELEMENT_FACTORY_CAST(obj) ((GstElementFactory *)(obj) ) | #define GST_ELEMENT_FACTORY_CAST(obj) ((GstElementFactory *)(obj) ) | |||
| /** | /** | |||
| * GstElementFactory: | * GstElementFactory: | |||
| * | * | |||
| * The opaque #GstElementFactory data structure. | * The opaque #GstElementFactory data structure. | |||
| */ | */ | |||
| struct _GstElementFactory { | struct _GstElementFactory { | |||
| GstPluginFeature parent; | GstPluginFeature parent; | |||
| GType type; /* unique GType of e lement or 0 if not loaded */ | GType type; /* unique GType of element or 0 if not loaded */ | |||
| GstElementDetails details; | /* FIXME-0.11: deprecate this in favour of meta_data */ | |||
| GstElementDetails details; | ||||
| GList * staticpadtemplates; | GList * staticpadtemplates; /* GstStaticPadTemplate lis | |||
| guint numpadtemplates; | t */ | |||
| guint numpadtemplates; | ||||
| /* URI interface stuff */ | /* URI interface stuff */ | |||
| guint uri_type; | guint uri_type; | |||
| gchar ** uri_protocols; | gchar ** uri_protocols; | |||
| GList * interfaces; /* interfaces this element i mplements */ | GList * interfaces; /* interface type names thi s element implements */ | |||
| gpointer _gst_reserved[GST_PADDING]; | /*< private >*/ | |||
| /* FIXME-0.11: move up and replace details */ | ||||
| gpointer meta_data; | ||||
| gpointer _gst_reserved[GST_PADDING - 1]; | ||||
| }; | }; | |||
| struct _GstElementFactoryClass { | struct _GstElementFactoryClass { | |||
| GstPluginFeatureClass parent_class; | GstPluginFeatureClass parent_class; | |||
| gpointer _gst_reserved[GST_PADDING]; | gpointer _gst_reserved[GST_PADDING]; | |||
| }; | }; | |||
| GType gst_element_factory_get_type (void); | GType gst_element_factory_get_type (void); | |||
| GstElementFactory * gst_element_factory_find (const gchar *name); | GstElementFactory * gst_element_factory_find (const gcha r *name); | |||
| GType gst_element_factory_get_element_type (GstElementF | GType gst_element_factory_get_element_type (GstElement | |||
| actory *factory); | Factory *factory); | |||
| G_CONST_RETURN gchar * gst_element_factory_get_longname (GstElementF | G_CONST_RETURN gchar * gst_element_factory_get_longname (GstElement | |||
| actory *factory); | Factory *factory); | |||
| G_CONST_RETURN gchar * gst_element_factory_get_klass (GstElementF | G_CONST_RETURN gchar * gst_element_factory_get_klass (GstElement | |||
| actory *factory); | Factory *factory); | |||
| G_CONST_RETURN gchar * gst_element_factory_get_description (GstElementF | G_CONST_RETURN gchar * gst_element_factory_get_description (GstElement | |||
| actory *factory); | Factory *factory); | |||
| G_CONST_RETURN gchar * gst_element_factory_get_author (GstElementF | G_CONST_RETURN gchar * gst_element_factory_get_author (GstElement | |||
| actory *factory); | Factory *factory); | |||
| guint gst_element_factory_get_num_pad_templates (GstElemen | G_CONST_RETURN gchar * gst_element_factory_get_documentation_uri (GstEleme | |||
| tFactory *factory); | ntFactory *factory); | |||
| G_CONST_RETURN GList * gst_element_factory_get_static_pad_templates (GstEle | G_CONST_RETURN gchar * gst_element_factory_get_icon_name (GstElement | |||
| mentFactory *factory); | Factory *factory); | |||
| gint gst_element_factory_get_uri_type (GstElementF | guint gst_element_factory_get_num_pad_templates (GstEleme | |||
| actory *factory); | ntFactory *factory); | |||
| gchar ** gst_element_factory_get_uri_protocols (GstElementF | G_CONST_RETURN GList * gst_element_factory_get_static_pad_templates (GstEl | |||
| actory *factory); | ementFactory *factory); | |||
| gboolean gst_element_factory_has_interface (GstElementF | gint gst_element_factory_get_uri_type (GstElement | |||
| actory *factory, | Factory *factory); | |||
| gchar ** gst_element_factory_get_uri_protocols (GstElement | ||||
| Factory *factory); | ||||
| gboolean gst_element_factory_has_interface (GstElement | ||||
| Factory *factory, | ||||
| const gcha r *interfacename); | const gcha r *interfacename); | |||
| GstElement* gst_element_factory_create (GstElementF | GstElement* gst_element_factory_create (GstElement | |||
| actory *factory, | Factory *factory, | |||
| const gchar | const gcha | |||
| *name); | r *name); | |||
| GstElement* gst_element_factory_make (const gchar | GstElement* gst_element_factory_make (const gcha | |||
| *factoryname, const gchar *name); | r *factoryname, const gchar *name); | |||
| /* FIXME 0.11: move these two into our private headers */ | /* FIXME 0.11: move these two into our private headers */ | |||
| void __gst_element_factory_add_static_pad_template (GstE lementFactory *elementfactory, | void __gst_element_factory_add_static_pad_template (GstE lementFactory *elementfactory, | |||
| GstStaticP adTemplate *templ); | GstStaticP adTemplate *templ); | |||
| void __gst_element_factory_add_interface (GstElement Factory *elementfactory, | void __gst_element_factory_add_interface (GstElement Factory *elementfactory, | |||
| const gcha r *interfacename); | const gcha r *interfacename); | |||
| gboolean gst_element_register (GstPlugin * | gboolean gst_element_register (GstPlugin | |||
| plugin, const gchar *name, | *plugin, const gchar *name, | |||
| guint rank, | guint rank | |||
| GType type); | , GType type); | |||
| /* 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 | ||||
| * @GST_ELEMENT_FACTORY_TYPE_MAX_ELEMENTS: Private, do not use | ||||
| * @GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO: Elements handling video media typ | ||||
| es | ||||
| * @GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO: Elements handling audio media typ | ||||
| es | ||||
| * @GST_ELEMENT_FACTORY_TYPE_MEDIA_IMAGE: Elements handling image media typ | ||||
| es | ||||
| * @GST_ELEMENT_FACTORY_TYPE_MEDIA_SUBTITLE: Elements handling subtitle med | ||||
| ia types | ||||
| * @GST_ELEMENT_FACTORY_TYPE_MEDIA_METADATA: Elements handling metadata med | ||||
| ia 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. | ||||
| * | ||||
| * Since: 0.10.31 | ||||
| */ | ||||
| typedef guint64 GstElementFactoryListType; | ||||
| #define GST_ELEMENT_FACTORY_TYPE_DECODER (G_GUINT64_CONSTANT (1) << | ||||
| 0) | ||||
| #define GST_ELEMENT_FACTORY_TYPE_ENCODER (G_GUINT64_CONSTANT (1) << | ||||
| 1) | ||||
| #define GST_ELEMENT_FACTORY_TYPE_SINK (G_GUINT64_CONSTANT (1) << | ||||
| 2) | ||||
| #define GST_ELEMENT_FACTORY_TYPE_SRC (G_GUINT64_CONSTANT (1) << | ||||
| 3) | ||||
| #define GST_ELEMENT_FACTORY_TYPE_MUXER (G_GUINT64_CONSTANT (1) << | ||||
| 4) | ||||
| #define GST_ELEMENT_FACTORY_TYPE_DEMUXER (G_GUINT64_CONSTANT (1) << | ||||
| 5) | ||||
| #define GST_ELEMENT_FACTORY_TYPE_PARSER (G_GUINT64_CONSTANT (1) << | ||||
| 6) | ||||
| #define GST_ELEMENT_FACTORY_TYPE_PAYLOADER (G_GUINT64_CONSTANT (1) << | ||||
| 7) | ||||
| #define GST_ELEMENT_FACTORY_TYPE_DEPAYLOADER (G_GUINT64_CONSTANT (1) << | ||||
| 8) | ||||
| #define GST_ELEMENT_FACTORY_TYPE_FORMATTER (G_GUINT64_CONSTANT (1) << | ||||
| 9) | ||||
| #define GST_ELEMENT_FACTORY_TYPE_MAX_ELEMENTS (G_GUINT64_CONSTANT (1) << | ||||
| 48) | ||||
| #define GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO (G_GUINT64_CONSTANT (1) << | ||||
| 49) | ||||
| #define GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO (G_GUINT64_CONSTANT (1) << | ||||
| 50) | ||||
| #define GST_ELEMENT_FACTORY_TYPE_MEDIA_IMAGE (G_GUINT64_CONSTANT (1) << | ||||
| 51) | ||||
| #define GST_ELEMENT_FACTORY_TYPE_MEDIA_SUBTITLE (G_GUINT64_CONSTANT (1) << | ||||
| 52) | ||||
| #define GST_ELEMENT_FACTORY_TYPE_MEDIA_METADATA (G_GUINT64_CONSTANT (1) << | ||||
| 53) | ||||
| /** | ||||
| * GST_ELEMENT_FACTORY_TYPE_ANY: | ||||
| * | ||||
| * Elements of any of the defined GST_ELEMENT_FACTORY_LIST types | ||||
| * | ||||
| * Since: 0.10.31 | ||||
| */ | ||||
| #define GST_ELEMENT_FACTORY_TYPE_ANY ((G_GUINT64_CONSTANT (1) << 49) - 1) | ||||
| /** | ||||
| * GST_ELEMENT_FACTORY_TYPE_MEDIA_ANY: | ||||
| * | ||||
| * Elements matching any of the defined GST_ELEMENT_FACTORY_TYPE_MEDIA type | ||||
| s | ||||
| * | ||||
| * Note: Do not use this if you wish to not filter against any of the defin | ||||
| ed | ||||
| * media types. If you wish to do this, simply don't specify any | ||||
| * GST_ELEMENT_FACTORY_TYPE_MEDIA flag. | ||||
| * | ||||
| * Since: 0.10.31 | ||||
| */ | ||||
| #define GST_ELEMENT_FACTORY_TYPE_MEDIA_ANY (~G_GUINT64_CONSTANT (0) << 48) | ||||
| /** | ||||
| * GST_ELEMENT_FACTORY_TYPE_VIDEO_ENCODER: | ||||
| * | ||||
| * All encoders handling video or image media types | ||||
| * | ||||
| * Since: 0.10.31 | ||||
| */ | ||||
| #define GST_ELEMENT_FACTORY_TYPE_VIDEO_ENCODER (GST_ELEMENT_FACTORY_TYPE_EN | ||||
| CODER | GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO | GST_ELEMENT_FACTORY_TYPE_MED | ||||
| IA_IMAGE) | ||||
| /** | ||||
| * GST_ELEMENT_FACTORY_TYPE_AUDIO_ENCODER: | ||||
| * | ||||
| * All encoders handling audio media types | ||||
| * | ||||
| * Since: 0.10.31 | ||||
| */ | ||||
| #define GST_ELEMENT_FACTORY_TYPE_AUDIO_ENCODER (GST_ELEMENT_FACTORY_TYPE_EN | ||||
| CODER | GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO) | ||||
| /** | ||||
| * GST_ELEMENT_FACTORY_TYPE_AUDIOVIDEO_SINKS: | ||||
| * | ||||
| * All sinks handling audio, video or image media types | ||||
| * | ||||
| * Since: 0.10.31 | ||||
| */ | ||||
| #define GST_ELEMENT_FACTORY_TYPE_AUDIOVIDEO_SINKS (GST_ELEMENT_FACTORY_TYPE | ||||
| _SINK | GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO | GST_ELEMENT_FACTORY_TYPE_MED | ||||
| IA_VIDEO | GST_ELEMENT_FACTORY_TYPE_MEDIA_IMAGE) | ||||
| /** | ||||
| * GST_ELEMENT_FACTORY_TYPE_DECODABLE: | ||||
| * | ||||
| * All elements used to 'decode' streams (decoders, demuxers, parsers, depa | ||||
| yloaders) | ||||
| * | ||||
| * Since: 0.10.31 | ||||
| */ | ||||
| #define GST_ELEMENT_FACTORY_TYPE_DECODABLE \ | ||||
| (GST_ELEMENT_FACTORY_TYPE_DECODER | GST_ELEMENT_FACTORY_TYPE_DEMUXER | GS | ||||
| T_ELEMENT_FACTORY_TYPE_DEPAYLOADER | GST_ELEMENT_FACTORY_TYPE_PARSER) | ||||
| /* Element klass defines */ | ||||
| #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" | ||||
| #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" | ||||
| gboolean gst_element_factory_list_is_type (GstElementFactory *fac | ||||
| tory, | ||||
| GstElementFactoryListTy | ||||
| pe type); | ||||
| GList * gst_element_factory_list_get_elements (GstElementFactoryListT | ||||
| ype type, | ||||
| GstRank minrank); | ||||
| GList * gst_element_factory_list_filter (GList *list, const Gst | ||||
| Caps *caps, | ||||
| GstPadDirection directi | ||||
| on, | ||||
| gboolean subsetonly); | ||||
| G_END_DECLS | G_END_DECLS | |||
| #endif /* __GST_ELEMENT_FACTORY_H__ */ | #endif /* __GST_ELEMENT_FACTORY_H__ */ | |||
| End of changes. 18 change blocks. | ||||
| 59 lines changed or deleted | 246 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||