2 * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
3 * 2000 Wim Taymans <wtay@chello.be>
5 * gst_private.h: Private header for within libgst
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
24 #ifndef __GST_PRIVATE_H__
25 #define __GST_PRIVATE_H__
31 /* This needs to be before glib.h, since it might be used in inline
33 extern const char g_log_domain_gstreamer[];
40 /* Needed for GstRegistry * */
41 #include "gstregistry.h"
42 #include "gststructure.h"
44 /* we need this in pretty much all files */
47 /* for the flags in the GstPluginDep structure below */
48 #include "gstplugin.h"
52 /* used by gstparse.c and grammar.y */
53 struct _GstParseContext {
54 GList * missing_elements;
57 /* used by gstplugin.c and gstregistrybinary.c */
59 /* details registered via gst_plugin_add_dependency() */
60 GstPluginDependencyFlags flags;
65 /* information saved from the last time the plugin was loaded (-1 = unset) */
66 guint env_hash; /* hash of content of environment variables in env_vars */
67 guint stat_hash; /* hash of stat() on all relevant files and directories */
70 struct _GstPluginPrivate {
71 GList *deps; /* list of GstPluginDep structures */
74 gboolean _priv_plugin_deps_env_vars_changed (GstPlugin * plugin);
75 gboolean _priv_plugin_deps_files_changed (GstPlugin * plugin);
77 gboolean _priv_gst_in_valgrind (void);
79 /* Initialize GStreamer private quark storage */
80 void _priv_gst_quarks_initialize (void);
82 /* Other init functions called from gst_init().
83 * FIXME 0.11: rename to _priv_gst_foo_init() so they don't get exported
84 * (can't do this now because these functions used to be in our public
85 * headers, so at least the symbols need to continue to be available unless
86 * we want enterprise edition packagers dancing on our heads) */
87 void _gst_buffer_initialize (void);
88 void _gst_buffer_list_initialize (void);
89 void _gst_event_initialize (void);
90 void _gst_format_initialize (void);
91 void _gst_message_initialize (void);
92 void _gst_plugin_initialize (void);
93 void _gst_query_initialize (void);
94 void _gst_tag_initialize (void);
95 void _gst_value_initialize (void);
97 /* Private registry functions */
98 gboolean _priv_gst_registry_remove_cache_plugins (GstRegistry *registry);
99 void _priv_gst_registry_cleanup (void);
101 /* used in both gststructure.c and gstcaps.c; numbers are completely made up */
102 #define STRUCTURE_ESTIMATED_STRING_LEN(s) (16 + (s)->fields->len * 22)
104 gboolean priv_gst_structure_append_to_gstring (const GstStructure * structure,
107 /* registry cache backends */
108 /* FIXME 0.11: use priv_ prefix */
109 gboolean gst_registry_binary_read_cache (GstRegistry * registry, const char *location);
110 gboolean gst_registry_binary_write_cache (GstRegistry * registry, const char *location);
112 /*** debugging categories *****************************************************/
114 #ifndef GST_DISABLE_GST_DEBUG
116 GST_EXPORT GstDebugCategory *GST_CAT_GST_INIT;
117 GST_EXPORT GstDebugCategory *GST_CAT_AUTOPLUG;
118 GST_EXPORT GstDebugCategory *GST_CAT_AUTOPLUG_ATTEMPT;
119 GST_EXPORT GstDebugCategory *GST_CAT_PARENTAGE;
120 GST_EXPORT GstDebugCategory *GST_CAT_STATES;
121 GST_EXPORT GstDebugCategory *GST_CAT_SCHEDULING;
122 GST_EXPORT GstDebugCategory *GST_CAT_BUFFER;
123 GST_EXPORT GstDebugCategory *GST_CAT_BUFFER_LIST;
124 GST_EXPORT GstDebugCategory *GST_CAT_BUS;
125 GST_EXPORT GstDebugCategory *GST_CAT_CAPS;
126 GST_EXPORT GstDebugCategory *GST_CAT_CLOCK;
127 GST_EXPORT GstDebugCategory *GST_CAT_ELEMENT_PADS;
128 GST_EXPORT GstDebugCategory *GST_CAT_PADS;
129 GST_EXPORT GstDebugCategory *GST_CAT_PIPELINE;
130 GST_EXPORT GstDebugCategory *GST_CAT_PLUGIN_LOADING;
131 GST_EXPORT GstDebugCategory *GST_CAT_PLUGIN_INFO;
132 GST_EXPORT GstDebugCategory *GST_CAT_PROPERTIES;
133 GST_EXPORT GstDebugCategory *GST_CAT_XML;
134 GST_EXPORT GstDebugCategory *GST_CAT_NEGOTIATION;
135 GST_EXPORT GstDebugCategory *GST_CAT_REFCOUNTING;
136 GST_EXPORT GstDebugCategory *GST_CAT_ERROR_SYSTEM;
137 GST_EXPORT GstDebugCategory *GST_CAT_EVENT;
138 GST_EXPORT GstDebugCategory *GST_CAT_MESSAGE;
139 GST_EXPORT GstDebugCategory *GST_CAT_PARAMS;
140 GST_EXPORT GstDebugCategory *GST_CAT_CALL_TRACE;
141 GST_EXPORT GstDebugCategory *GST_CAT_SIGNAL;
142 GST_EXPORT GstDebugCategory *GST_CAT_PROBE;
143 GST_EXPORT GstDebugCategory *GST_CAT_REGISTRY;
144 GST_EXPORT GstDebugCategory *GST_CAT_QOS;
145 GST_EXPORT GstDebugCategory *GST_CAT_TYPES; /* FIXME 0.11: remove? */
149 #define GST_CAT_GST_INIT NULL
150 #define GST_CAT_AUTOPLUG NULL
151 #define GST_CAT_AUTOPLUG_ATTEMPT NULL
152 #define GST_CAT_PARENTAGE NULL
153 #define GST_CAT_STATES NULL
154 #define GST_CAT_SCHEDULING NULL
155 #define GST_CAT_DATAFLOW NULL
156 #define GST_CAT_BUFFER NULL
157 #define GST_CAT_BUFFER_LIST NULL
158 #define GST_CAT_BUS NULL
159 #define GST_CAT_CAPS NULL
160 #define GST_CAT_CLOCK NULL
161 #define GST_CAT_ELEMENT_PADS NULL
162 #define GST_CAT_PADS NULL
163 #define GST_CAT_PIPELINE NULL
164 #define GST_CAT_PLUGIN_LOADING NULL
165 #define GST_CAT_PLUGIN_INFO NULL
166 #define GST_CAT_PROPERTIES NULL
167 #define GST_CAT_XML NULL
168 #define GST_CAT_NEGOTIATION NULL
169 #define GST_CAT_REFCOUNTING NULL
170 #define GST_CAT_ERROR_SYSTEM NULL
171 #define GST_CAT_EVENT NULL
172 #define GST_CAT_MESSAGE NULL
173 #define GST_CAT_PARAMS NULL
174 #define GST_CAT_CALL_TRACE NULL
175 #define GST_CAT_SIGNAL NULL
176 #define GST_CAT_PROBE NULL
177 #define GST_CAT_REGISTRY NULL
178 #define GST_CAT_QOS NULL
179 #define GST_CAT_TYPES NULL
184 #endif /* __GST_PRIVATE_H__ */