registry: API: Add gst_{default,}_registry_get_feature_list_cookie()

This returns the internal feature list cookie, which changes every
time a feature is added or removed. This can be used by elements
to check if they should update their cached feature lists.
This commit is contained in:
Sebastian Dröge 2009-11-10 18:03:43 +01:00
parent 1a50186630
commit 039ef83523
4 changed files with 35 additions and 0 deletions

View file

@ -1945,6 +1945,7 @@ gst_buffering_mode_get_type
GstRegistry
gst_registry_get_default
gst_registry_get_feature_list
gst_registry_get_feature_list_cookie
gst_registry_get_feature_list_by_plugin
gst_registry_get_path_list
gst_registry_get_plugin_list
@ -1972,6 +1973,7 @@ gst_default_registry_add_path
gst_default_registry_find_plugin
gst_default_registry_find_feature
gst_default_registry_get_plugin_list
gst_default_registry_get_feature_list_cookie
gst_default_registry_feature_filter
<SUBSECTION Standard>
GstRegistryClass

View file

@ -1653,3 +1653,21 @@ gst_update_registry (void)
return res;
}
/**
* gst_registry_get_feature_list_cookie:
*
* Returns the registrys feature list cookie. This changes
* every time a feature is added or removed from the registry.
*
* Returns: the feature list cookie.
*
* Since: 0.10.26
*/
guint32
gst_registry_get_feature_list_cookie (GstRegistry * registry)
{
g_return_val_if_fail (GST_IS_REGISTRY (registry), 0);
return registry->priv->cookie;
}

View file

@ -107,6 +107,7 @@ GList* gst_registry_feature_filter (GstRegistry *registry,
GList * gst_registry_get_feature_list (GstRegistry *registry,
GType type);
GList * gst_registry_get_feature_list_by_plugin (GstRegistry *registry, const gchar *name);
guint32 gst_registry_get_feature_list_cookie (GstRegistry *registry);
GstPlugin* gst_registry_find_plugin (GstRegistry *registry, const gchar *name);
GstPluginFeature* gst_registry_find_feature (GstRegistry *registry, const gchar *name, GType type);
@ -204,6 +205,19 @@ gboolean gst_registry_xml_write_cache (GstRegistry * registry, const char *lo
#define gst_default_registry_feature_filter(filter,first,user_data) \
gst_registry_feature_filter (gst_registry_get_default(),filter,first,user_data)
/**
* gst_default_registry_get_feature_list_cookie:
*
* Returns the default registrys feature list cookie. This changes
* every time a feature is added or removed from the registry.
*
* Returns: the feature list cookie.
*
* Since: 0.10.26
*/
#define gst_default_registry_get_feature_list_cookie() \
gst_registry_get_feature_list_cookie (gst_registry_get_default())
gboolean gst_default_registry_check_feature_version (const gchar *feature_name,
guint min_major,
guint min_minor,

View file

@ -827,6 +827,7 @@ EXPORTS
gst_registry_get_default
gst_registry_get_feature_list
gst_registry_get_feature_list_by_plugin
gst_registry_get_feature_list_cookie
gst_registry_get_path_list
gst_registry_get_plugin_list
gst_registry_get_type