30 #include <sys/types.h> /* off_t */ |
30 #include <sys/types.h> /* off_t */ |
31 #include <sys/stat.h> /* off_t */ |
31 #include <sys/stat.h> /* off_t */ |
32 #include <gmodule.h> |
32 #include <gmodule.h> |
33 #include <gst/gstobject.h> |
33 #include <gst/gstobject.h> |
34 #include <gst/gstmacros.h> |
34 #include <gst/gstmacros.h> |
|
35 #include <gst/gststructure.h> |
35 |
36 |
36 G_BEGIN_DECLS |
37 G_BEGIN_DECLS |
37 |
38 |
38 typedef struct _GstPlugin GstPlugin; |
39 typedef struct _GstPlugin GstPlugin; |
39 typedef struct _GstPluginClass GstPluginClass; |
40 typedef struct _GstPluginClass GstPluginClass; |
|
41 typedef struct _GstPluginPrivate GstPluginPrivate; |
40 typedef struct _GstPluginDesc GstPluginDesc; |
42 typedef struct _GstPluginDesc GstPluginDesc; |
41 |
43 |
42 /** |
44 /** |
43 * gst_plugin_error_quark: |
45 * gst_plugin_error_quark: |
44 * |
46 * |
78 { |
80 { |
79 GST_PLUGIN_FLAG_CACHED = (1<<0) |
81 GST_PLUGIN_FLAG_CACHED = (1<<0) |
80 } GstPluginFlags; |
82 } GstPluginFlags; |
81 |
83 |
82 /** |
84 /** |
|
85 * GstPluginDependencyFlags: |
|
86 * @GST_PLUGIN_DEPENDENCY_FLAG_NONE : no special flags |
|
87 * @GST_PLUGIN_DEPENDENCY_FLAG_RECURSE : recurse into subdirectories |
|
88 * @GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_DEFAULT_ONLY : use paths |
|
89 * argument only if none of the environment variables is set |
|
90 * @GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_SUFFIX : interpret |
|
91 * filename argument as filter suffix and check all matching files in |
|
92 * the directory |
|
93 * |
|
94 * Flags used in connection with gst_plugin_add_dependency(). |
|
95 * |
|
96 * Since: 0.10.22 |
|
97 */ |
|
98 typedef enum { |
|
99 GST_PLUGIN_DEPENDENCY_FLAG_NONE = 0, |
|
100 GST_PLUGIN_DEPENDENCY_FLAG_RECURSE = (1 << 0), |
|
101 GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_DEFAULT_ONLY = (1 << 1), |
|
102 GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_SUFFIX = (1 << 2) |
|
103 } GstPluginDependencyFlags; |
|
104 |
|
105 /** |
83 * GstPluginInitFunc: |
106 * GstPluginInitFunc: |
84 * @plugin: The plugin object that can be used to register #GstPluginFeatures for this plugin. |
107 * @plugin: The plugin object that can be used to register #GstPluginFeatures for this plugin. |
85 * |
108 * |
86 * A plugin should provide a pointer to a function of this type in the |
109 * A plugin should provide a pointer to a function of this type in the |
87 * plugin_desc struct. |
110 * plugin_desc struct. |
88 * This function will be called by the loader at startup. |
111 * This function will be called by the loader at startup. |
89 * |
112 * |
90 * Returns: %TRUE if plugin initialised successfully |
113 * Returns: %TRUE if plugin initialised successfully |
91 */ |
114 */ |
92 typedef gboolean (*GstPluginInitFunc) (GstPlugin *plugin); |
115 typedef gboolean (*GstPluginInitFunc) (GstPlugin *plugin); |
|
116 |
|
117 /** |
|
118 * GstPluginInitFullFunc: |
|
119 * @plugin: The plugin object that can be used to register #GstPluginFeatures for this plugin. |
|
120 * @user_data: The user data. |
|
121 * |
|
122 * A plugin should provide a pointer to a function of either #GstPluginInitFunc |
|
123 * or this type in the plugin_desc struct. |
|
124 * The function will be called by the loader at startup. This version allows |
|
125 * user data to be passed to init function (useful for bindings). |
|
126 * |
|
127 * Returns: %TRUE if plugin initialised successfully |
|
128 * |
|
129 * Since: 0.10.24 |
|
130 * |
|
131 */ |
|
132 typedef gboolean (*GstPluginInitFullFunc) (GstPlugin *plugin, gpointer user_data); |
93 |
133 |
94 /** |
134 /** |
95 * GstPluginDesc: |
135 * GstPluginDesc: |
96 * @major_version: the major version number of core that plugin was compiled for |
136 * @major_version: the major version number of core that plugin was compiled for |
97 * @minor_version: the minor version number of core that plugin was compiled for |
137 * @minor_version: the minor version number of core that plugin was compiled for |
158 off_t file_size; |
198 off_t file_size; |
159 time_t file_mtime; |
199 time_t file_mtime; |
160 gboolean registered; /* TRUE when the registry has seen a filename |
200 gboolean registered; /* TRUE when the registry has seen a filename |
161 * that matches the plugin's basename */ |
201 * that matches the plugin's basename */ |
162 |
202 |
163 gpointer _gst_reserved[GST_PADDING]; |
203 GstPluginPrivate *priv; |
|
204 gpointer _gst_reserved[GST_PADDING - 1]; |
164 }; |
205 }; |
165 |
206 |
166 struct _GstPluginClass { |
207 struct _GstPluginClass { |
167 GstObjectClass object_class; |
208 GstObjectClass object_class; |
168 |
209 |
182 * @package: the package-name (e.g. PACKAGE_NAME from config.h) |
223 * @package: the package-name (e.g. PACKAGE_NAME from config.h) |
183 * @origin: a description from where the package comes from (e.g. the homepage URL) |
224 * @origin: a description from where the package comes from (e.g. the homepage URL) |
184 * |
225 * |
185 * This macro needs to be used to define the entry point and meta data of a |
226 * This macro needs to be used to define the entry point and meta data of a |
186 * plugin. One would use this macro to export a plugin, so that it can be used |
227 * plugin. One would use this macro to export a plugin, so that it can be used |
187 * by other applications |
228 * by other applications. |
|
229 * |
|
230 * The macro uses a define named PACKAGE for the #GstPluginDesc,source field. |
188 */ |
231 */ |
189 #define GST_PLUGIN_DEFINE(major,minor,name,description,init,version,license,package,origin) \ |
232 #define GST_PLUGIN_DEFINE(major,minor,name,description,init,version,license,package,origin) \ |
190 GST_PLUGIN_EXPORT GstPluginDesc gst_plugin_desc = { \ |
233 GST_PLUGIN_EXPORT GstPluginDesc gst_plugin_desc = { \ |
191 major, \ |
234 major, \ |
192 minor, \ |
235 minor, \ |
215 * |
258 * |
216 * This macro needs to be used to define the entry point and meta data of a |
259 * This macro needs to be used to define the entry point and meta data of a |
217 * local plugin. One would use this macro to define a local plugin that can only |
260 * local plugin. One would use this macro to define a local plugin that can only |
218 * be used by the own application. |
261 * be used by the own application. |
219 * |
262 * |
|
263 * The macro uses a define named PACKAGE for the #GstPluginDesc.source field. |
|
264 * |
220 * Deprecated: Use gst_plugin_register_static() instead. This macro was |
265 * Deprecated: Use gst_plugin_register_static() instead. This macro was |
221 * deprecated because it uses constructors, which is a compiler feature not |
266 * deprecated because it uses constructors, which is a compiler feature not |
222 * available on all compilers. |
267 * available on all compilers. |
|
268 * |
223 */ |
269 */ |
224 /* We don't have deprecation guards here on purpose, it's enough to have |
270 /* We don't have deprecation guards here on purpose, it's enough to have |
225 * deprecation guards around _gst_plugin_register_static(), and will result in |
271 * deprecation guards around _gst_plugin_register_static(), and will result in |
226 * much better error messages when compiling with -DGST_DISABLE_DEPRECATED */ |
272 * much better error messages when compiling with -DGST_DISABLE_DEPRECATED */ |
227 #define GST_PLUGIN_DEFINE_STATIC(major,minor,name,description,init,version,license,package,origin) \ |
273 #define GST_PLUGIN_DEFINE_STATIC(major,minor,name,description,init,version,license,package,origin) \ |
272 |
318 |
273 |
319 |
274 GType gst_plugin_get_type (void); |
320 GType gst_plugin_get_type (void); |
275 |
321 |
276 #ifndef GST_DISABLE_DEPRECATED |
322 #ifndef GST_DISABLE_DEPRECATED |
|
323 #ifdef __SYMBIAN32__ |
|
324 IMPORT_C |
|
325 #endif |
277 void _gst_plugin_register_static (GstPluginDesc *desc); |
326 void _gst_plugin_register_static (GstPluginDesc *desc); |
278 #endif |
327 #endif |
279 |
328 |
|
329 #ifdef __SYMBIAN32__ |
|
330 IMPORT_C |
|
331 #endif |
280 gboolean gst_plugin_register_static (gint major_version, |
332 gboolean gst_plugin_register_static (gint major_version, |
281 gint minor_version, |
333 gint minor_version, |
282 const gchar *name, |
334 const gchar *name, |
283 gchar *description, |
335 gchar *description, |
284 GstPluginInitFunc init_func, |
336 GstPluginInitFunc init_func, |
364 #ifdef __SYMBIAN32__ |
443 #ifdef __SYMBIAN32__ |
365 IMPORT_C |
444 IMPORT_C |
366 #endif |
445 #endif |
367 |
446 |
368 |
447 |
|
448 void gst_plugin_add_dependency (GstPlugin * plugin, |
|
449 const gchar ** env_vars, |
|
450 const gchar ** paths, |
|
451 const gchar ** names, |
|
452 GstPluginDependencyFlags flags); |
|
453 #ifdef __SYMBIAN32__ |
|
454 IMPORT_C |
|
455 #endif |
|
456 |
|
457 |
|
458 void gst_plugin_add_dependency_simple (GstPlugin * plugin, |
|
459 const gchar * env_vars, |
|
460 const gchar * paths, |
|
461 const gchar * names, |
|
462 GstPluginDependencyFlags flags); |
|
463 #ifdef __SYMBIAN32__ |
|
464 IMPORT_C |
|
465 #endif |
|
466 |
|
467 |
369 void gst_plugin_list_free (GList *list); |
468 void gst_plugin_list_free (GList *list); |
370 |
469 |
371 G_END_DECLS |
470 G_END_DECLS |
372 |
471 |
373 #endif /* __GST_PLUGIN_H__ */ |
472 #endif /* __GST_PLUGIN_H__ */ |