18 * License along with this library; if not, write to the |
18 * License along with this library; if not, write to the |
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
20 * Boston, MA 02111-1307, USA. |
20 * Boston, MA 02111-1307, USA. |
21 */ |
21 */ |
22 |
22 |
|
23 |
23 #ifndef __GST_PRIVATE_H__ |
24 #ifndef __GST_PRIVATE_H__ |
24 #define __GST_PRIVATE_H__ |
25 #define __GST_PRIVATE_H__ |
25 |
26 |
26 #ifdef HAVE_CONFIG_H |
27 #ifdef HAVE_CONFIG_H |
27 # ifndef GST_LICENSE /* don't include config.h twice, it has no guards */ |
|
28 # include "config.h" |
28 # include "config.h" |
29 # endif |
|
30 #endif |
29 #endif |
31 |
30 |
32 /* This needs to be before glib.h, since it might be used in inline |
31 /* This needs to be before glib.h, since it might be used in inline |
33 * functions */ |
32 * functions */ |
34 extern const char g_log_domain_gstreamer[]; |
33 extern const char g_log_domain_gstreamer[]; |
40 |
39 |
41 /* Needed for GstRegistry * */ |
40 /* Needed for GstRegistry * */ |
42 #include "gstregistry.h" |
41 #include "gstregistry.h" |
43 #include "gststructure.h" |
42 #include "gststructure.h" |
44 |
43 |
45 /* we need this in pretty much all files */ |
|
46 #include "gstinfo.h" |
|
47 |
|
48 /* for the flags in the GstPluginDep structure below */ |
|
49 #include "gstplugin.h" |
|
50 |
|
51 G_BEGIN_DECLS |
44 G_BEGIN_DECLS |
52 |
|
53 /* used by gstparse.c and grammar.y */ |
|
54 struct _GstParseContext { |
|
55 GList * missing_elements; |
|
56 }; |
|
57 |
|
58 /* used by gstplugin.c and gstregistrybinary.c */ |
|
59 typedef struct { |
|
60 /* details registered via gst_plugin_add_dependency() */ |
|
61 GstPluginDependencyFlags flags; |
|
62 gchar **env_vars; |
|
63 gchar **paths; |
|
64 gchar **names; |
|
65 |
|
66 /* information saved from the last time the plugin was loaded (-1 = unset) */ |
|
67 guint env_hash; /* hash of content of environment variables in env_vars */ |
|
68 guint stat_hash; /* hash of stat() on all relevant files and directories */ |
|
69 } GstPluginDep; |
|
70 |
|
71 struct _GstPluginPrivate { |
|
72 GList *deps; /* list of GstPluginDep structures */ |
|
73 GstStructure *cache_data; |
|
74 }; |
|
75 #ifdef __SYMBIAN32__ |
|
76 IMPORT_C |
|
77 #endif |
|
78 |
|
79 |
|
80 gboolean _priv_plugin_deps_env_vars_changed (GstPlugin * plugin); |
|
81 #ifdef __SYMBIAN32__ |
|
82 IMPORT_C |
|
83 #endif |
|
84 |
|
85 gboolean _priv_plugin_deps_files_changed (GstPlugin * plugin); |
|
86 #ifdef __SYMBIAN32__ |
|
87 IMPORT_C |
|
88 #endif |
|
89 |
|
90 |
45 |
91 gboolean _priv_gst_in_valgrind (void); |
46 gboolean _priv_gst_in_valgrind (void); |
92 |
47 |
93 /* Initialize GStreamer private quark storage */ |
48 /* Initialize GStreamer private quark storage */ |
94 #ifdef __SYMBIAN32__ |
49 #ifdef __SYMBIAN32__ |
161 void _priv_gst_registry_cleanup (void); |
111 void _priv_gst_registry_cleanup (void); |
162 |
112 |
163 /* used in both gststructure.c and gstcaps.c; numbers are completely made up */ |
113 /* used in both gststructure.c and gstcaps.c; numbers are completely made up */ |
164 #define STRUCTURE_ESTIMATED_STRING_LEN(s) (16 + (s)->fields->len * 22) |
114 #define STRUCTURE_ESTIMATED_STRING_LEN(s) (16 + (s)->fields->len * 22) |
165 |
115 |
166 #ifdef __SYMBIAN32__ |
|
167 IMPORT_C |
|
168 #endif |
|
169 gboolean priv_gst_structure_append_to_gstring (const GstStructure * structure, |
116 gboolean priv_gst_structure_append_to_gstring (const GstStructure * structure, |
170 GString * s); |
117 GString * s); |
171 |
118 |
172 /* registry cache backends */ |
119 /* registry cache backends */ |
173 /* FIXME 0.11: use priv_ prefix */ |
120 /* FIXME 0.11: use priv_ prefix */ |
174 #ifdef __SYMBIAN32__ |
121 #ifdef USE_BINARY_REGISTRY |
175 IMPORT_C |
|
176 #endif |
|
177 |
|
178 gboolean gst_registry_binary_read_cache (GstRegistry * registry, const char *location); |
122 gboolean gst_registry_binary_read_cache (GstRegistry * registry, const char *location); |
179 #ifdef __SYMBIAN32__ |
123 #ifdef __SYMBIAN32__ |
180 IMPORT_C |
124 IMPORT_C |
181 #endif |
125 #endif |
182 |
126 |
183 gboolean gst_registry_binary_write_cache (GstRegistry * registry, const char *location); |
127 gboolean gst_registry_binary_write_cache (GstRegistry * registry, const char *location); |
184 |
128 /* FIXME 0.11: this is in registry.h for backwards compatibility |
185 |
129 #else |
186 /* used in gstvalue.c and gststructure.c */ |
130 gboolean gst_registry_xml_read_cache (GstRegistry * registry, const char *location); |
187 #define GST_ASCII_IS_STRING(c) (g_ascii_isalnum((c)) || ((c) == '_') || \ |
131 #ifdef __SYMBIAN32__ |
188 ((c) == '-') || ((c) == '+') || ((c) == '/') || ((c) == ':') || \ |
132 IMPORT_C |
189 ((c) == '.')) |
133 #endif |
|
134 |
|
135 gboolean gst_registry_xml_write_cache (GstRegistry * registry, const char *location); |
|
136 */ |
|
137 #endif |
190 |
138 |
191 /*** debugging categories *****************************************************/ |
139 /*** debugging categories *****************************************************/ |
192 |
140 |
193 #ifndef GST_REMOVE_GST_DEBUG |
141 #ifndef GST_DISABLE_GST_DEBUG |
194 |
142 |
195 GST_EXPORT GstDebugCategory *GST_CAT_GST_INIT; |
143 #ifndef _MSC_VER |
196 GST_EXPORT GstDebugCategory *GST_CAT_AUTOPLUG; /* FIXME 0.11: remove? */ |
144 #define IMPORT_SYMBOL |
197 GST_EXPORT GstDebugCategory *GST_CAT_AUTOPLUG_ATTEMPT; /* FIXME 0.11: remove? */ |
145 #else /* _MSC_VER */ |
198 GST_EXPORT GstDebugCategory *GST_CAT_PARENTAGE; |
146 #ifndef LIBGSTREAMER_EXPORTS |
199 GST_EXPORT GstDebugCategory *GST_CAT_STATES; |
147 #define IMPORT_SYMBOL __declspec(dllimport) |
200 GST_EXPORT GstDebugCategory *GST_CAT_SCHEDULING; |
148 #else |
201 GST_EXPORT GstDebugCategory *GST_CAT_BUFFER; |
149 #define IMPORT_SYMBOL |
202 GST_EXPORT GstDebugCategory *GST_CAT_BUFFER_LIST; |
150 #endif |
203 GST_EXPORT GstDebugCategory *GST_CAT_BUS; |
151 #endif |
204 GST_EXPORT GstDebugCategory *GST_CAT_CAPS; |
152 |
205 GST_EXPORT GstDebugCategory *GST_CAT_CLOCK; |
153 #include <gst/gstinfo.h> |
206 GST_EXPORT GstDebugCategory *GST_CAT_ELEMENT_PADS; |
154 |
207 GST_EXPORT GstDebugCategory *GST_CAT_PADS; |
155 extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_GST_INIT; |
208 GST_EXPORT GstDebugCategory *GST_CAT_PERFORMANCE; |
156 extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_AUTOPLUG; |
209 GST_EXPORT GstDebugCategory *GST_CAT_PIPELINE; |
157 extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_AUTOPLUG_ATTEMPT; |
210 GST_EXPORT GstDebugCategory *GST_CAT_PLUGIN_LOADING; |
158 extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_PARENTAGE; |
211 GST_EXPORT GstDebugCategory *GST_CAT_PLUGIN_INFO; |
159 extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_STATES; |
212 GST_EXPORT GstDebugCategory *GST_CAT_PROPERTIES; |
160 extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_SCHEDULING; |
213 GST_EXPORT GstDebugCategory *GST_CAT_XML; |
161 extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_BUFFER; |
214 GST_EXPORT GstDebugCategory *GST_CAT_NEGOTIATION; |
162 extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_BUS; |
215 GST_EXPORT GstDebugCategory *GST_CAT_REFCOUNTING; |
163 extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_CAPS; |
216 GST_EXPORT GstDebugCategory *GST_CAT_ERROR_SYSTEM; |
164 extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_CLOCK; |
217 GST_EXPORT GstDebugCategory *GST_CAT_EVENT; |
165 extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_ELEMENT_PADS; |
218 GST_EXPORT GstDebugCategory *GST_CAT_MESSAGE; |
166 extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_PADS; |
219 GST_EXPORT GstDebugCategory *GST_CAT_PARAMS; |
167 extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_PIPELINE; |
220 GST_EXPORT GstDebugCategory *GST_CAT_CALL_TRACE; |
168 extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_PLUGIN_LOADING; |
221 GST_EXPORT GstDebugCategory *GST_CAT_SIGNAL; |
169 extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_PLUGIN_INFO; |
222 GST_EXPORT GstDebugCategory *GST_CAT_PROBE; |
170 extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_PROPERTIES; |
223 GST_EXPORT GstDebugCategory *GST_CAT_REGISTRY; |
171 extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_XML; |
224 GST_EXPORT GstDebugCategory *GST_CAT_QOS; |
172 extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_NEGOTIATION; |
225 GST_EXPORT GstDebugCategory *GST_CAT_TYPES; /* FIXME 0.11: remove? */ |
173 extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_REFCOUNTING; |
|
174 extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_ERROR_SYSTEM; |
|
175 extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_EVENT; |
|
176 extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_MESSAGE; |
|
177 extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_PARAMS; |
|
178 extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_CALL_TRACE; |
|
179 extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_SIGNAL; |
|
180 extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_PROBE; |
|
181 extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_REGISTRY; |
|
182 extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_QOS; |
|
183 extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_TYPES; /* FIXME 0.11: remove? */ |
226 |
184 |
227 #else |
185 #else |
228 |
186 |
229 #define GST_CAT_GST_INIT NULL |
187 #define GST_CAT_GST_INIT NULL |
230 #define GST_CAT_AUTOPLUG NULL |
188 #define GST_CAT_AUTOPLUG NULL |
232 #define GST_CAT_PARENTAGE NULL |
190 #define GST_CAT_PARENTAGE NULL |
233 #define GST_CAT_STATES NULL |
191 #define GST_CAT_STATES NULL |
234 #define GST_CAT_SCHEDULING NULL |
192 #define GST_CAT_SCHEDULING NULL |
235 #define GST_CAT_DATAFLOW NULL |
193 #define GST_CAT_DATAFLOW NULL |
236 #define GST_CAT_BUFFER NULL |
194 #define GST_CAT_BUFFER NULL |
237 #define GST_CAT_BUFFER_LIST NULL |
|
238 #define GST_CAT_BUS NULL |
195 #define GST_CAT_BUS NULL |
239 #define GST_CAT_CAPS NULL |
196 #define GST_CAT_CAPS NULL |
240 #define GST_CAT_CLOCK NULL |
197 #define GST_CAT_CLOCK NULL |
241 #define GST_CAT_ELEMENT_PADS NULL |
198 #define GST_CAT_ELEMENT_PADS NULL |
242 #define GST_CAT_PADS NULL |
199 #define GST_CAT_PADS NULL |
243 #define GST_CAT_PERFORMANCE NULL |
|
244 #define GST_CAT_PIPELINE NULL |
200 #define GST_CAT_PIPELINE NULL |
245 #define GST_CAT_PLUGIN_LOADING NULL |
201 #define GST_CAT_PLUGIN_LOADING NULL |
246 #define GST_CAT_PLUGIN_INFO NULL |
202 #define GST_CAT_PLUGIN_INFO NULL |
247 #define GST_CAT_PROPERTIES NULL |
203 #define GST_CAT_PROPERTIES NULL |
248 #define GST_CAT_XML NULL |
204 #define GST_CAT_XML NULL |