2 * Copyright (C) 2006 Josep Torra <josep@fluendo.com>
3 * Copyright (C) 2006 Mathieu Garcia <matthieu@fluendo.com>
4 * Copyright (C) 2006 Stefan Kost <ensonic@sonicpulse.de>
6 * gstregistrybinary.h: Header for registry handling
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
23 #ifndef __GST_REGISTRYCHUNKS_H__
24 #define __GST_REGISTRYCHUNKS_H__
26 #include <gst/gstpad.h>
27 #include <gst/gstregistry.h>
30 * we reference strings directly from the plugins and in this case set CONST to
31 * avoid freeing them. If g_free() should be used, the MALLOC flag is set,
32 * otherwise g_slice_free1() will be used!
35 GST_REGISTRY_CHUNK_FLAG_NONE = 0,
36 GST_REGISTRY_CHUNK_FLAG_CONST = 1,
37 GST_REGISTRY_CHUNK_FLAG_MALLOC = 2,
43 * Header for binary blobs
45 typedef struct _GstRegistryChunk
53 typedef struct _GstRegistryChunkGlobalHeader
55 guint32 filter_env_hash;
56 } GstRegistryChunkGlobalHeader;
59 * GstRegistryChunkPluginElement:
61 * @n_deps: Says how many dependency structures follows.
63 * @nfeatures: says how many binary plugin feature structures we will have
64 * right after the structure itself.
66 * A structure containing (staticely) every information needed for a plugin
69 typedef struct _GstRegistryChunkPluginElement
77 } GstRegistryChunkPluginElement;
79 /* GstRegistryChunkDep:
81 typedef struct _GstRegistryChunkDep
90 } GstRegistryChunkDep;
93 * GstRegistryChunkPluginFeature:
94 * @rank: rank of the feature
96 * A structure containing the plugin features
98 typedef struct _GstRegistryChunkPluginFeature
101 } GstRegistryChunkPluginFeature;
104 * GstRegistryChunkElementFactory:
105 * @npadtemplates: stores the number of GstRegistryChunkPadTemplate structures
106 * following the structure
107 * @ninterfaces: stores the number of interface names following the structure
108 * @nuriprotocols: stores the number of protocol strings following the structure
110 * A structure containing the element factory fields
112 typedef struct _GstRegistryChunkElementFactory
114 GstRegistryChunkPluginFeature plugin_feature;
119 } GstRegistryChunkElementFactory;
122 * GstRegistryChunkTypeFindFactory:
123 * @nextensions: stores the number of typefind extensions
125 * A structure containing the type find factory fields
127 typedef struct _GstRegistryChunkTypeFindFactory
129 GstRegistryChunkPluginFeature plugin_feature;
132 } GstRegistryChunkTypeFindFactory;
135 * GstRegistryChunkDeviceProviderFactory:
137 * A structure containing the device provider factory fields
139 typedef struct _GstRegistryChunkDeviceProviderFactory
141 GstRegistryChunkPluginFeature plugin_feature;
143 } GstRegistryChunkDeviceProviderFactory;
146 * GstRegistryChunkPadTemplate:
148 * A structure containing the static pad templates of a plugin feature
150 typedef struct _GstRegistryChunkPadTemplate
152 guint direction; /* Either 0:"sink" or 1:"src" */
153 GstPadPresence presence;
154 } GstRegistryChunkPadTemplate;
159 _priv_gst_registry_chunks_save_plugin (GList ** list, GstRegistry * registry,
163 _priv_gst_registry_chunks_load_plugin (GstRegistry * registry, gchar ** in,
164 gchar *end, GstPlugin **out_plugin);
167 _priv_gst_registry_chunks_save_global_header (GList ** list,
168 GstRegistry * registry, guint32 filter_env_hash);
171 _priv_gst_registry_chunks_load_global_header (GstRegistry * registry,
172 gchar ** in, gchar *end, guint32 * filter_env_hash);
175 _priv_gst_registry_chunk_free (GstRegistryChunk *chunk);
179 #endif /* __GST_REGISTRYCHUNKS_H__ */