/* go through all elements of a certain class and check whether
* they implement a mixer. If so, add it to the list. */
- feature_list = gst_registry_get_feature_list (gst_registry_get_default (),
+ feature_list = gst_registry_get_feature_list (gst_registry_get (),
GST_TYPE_ELEMENT_FACTORY);
feature_list = g_list_sort (feature_list, element_factory_rank_compare_func);
static void
gst_decode_bin_update_factories_list (GstDecodeBin * dbin)
{
- if (!dbin->factories
- || dbin->factories_cookie !=
- gst_default_registry_get_feature_list_cookie ()) {
+ guint cookie;
+
+ cookie = gst_registry_get_feature_list_cookie (gst_registry_get ());
+ if (!dbin->factories || dbin->factories_cookie != cookie) {
if (dbin->factories)
gst_plugin_feature_list_free (dbin->factories);
dbin->factories =
gst_element_factory_list_get_elements
(GST_ELEMENT_FACTORY_TYPE_DECODABLE, GST_RANK_MARGINAL);
- dbin->factories_cookie = gst_default_registry_get_feature_list_cookie ();
+ dbin->factories_cookie = cookie;
}
}
gst_play_bin_update_elements_list (GstPlayBin * playbin)
{
GList *res, *tmp;
+ guint cookie;
- if (!playbin->elements ||
- playbin->elements_cookie !=
- gst_default_registry_get_feature_list_cookie ()) {
+ cookie = gst_registry_get_feature_list_cookie (gst_registry_get ());
+ if (!playbin->elements || playbin->elements_cookie != cookie) {
if (playbin->elements)
gst_plugin_feature_list_free (playbin->elements);
res =
playbin->elements = g_list_concat (res, tmp);
playbin->elements =
g_list_sort (playbin->elements, gst_plugin_feature_rank_compare_func);
- playbin->elements_cookie = gst_default_registry_get_feature_list_cookie ();
+ playbin->elements_cookie = cookie;
}
}
static gboolean
gst_subtitle_overlay_update_factory_list (GstSubtitleOverlay * self)
{
- if (!self->factories
- || self->factories_cookie !=
- gst_default_registry_get_feature_list_cookie ()) {
+ GstRegistry *registry;
+ guint cookie;
+
+ registry = gst_registry_get ();
+ cookie = gst_registry_get_feature_list_cookie (registry);
+ if (!self->factories || self->factories_cookie != cookie) {
GstCaps *subcaps;
GList *factories;
subcaps = gst_caps_new_empty ();
- factories = gst_default_registry_feature_filter (
+ factories = gst_registry_feature_filter (registry,
(GstPluginFeatureFilter) _factory_filter, FALSE, &subcaps);
GST_DEBUG_OBJECT (self, "Created factory caps: %" GST_PTR_FORMAT, subcaps);
gst_caps_replace (&self->factory_caps, subcaps);
if (self->factories)
gst_plugin_feature_list_free (self->factories);
self->factories = factories;
- self->factories_cookie = gst_default_registry_get_feature_list_cookie ();
+ self->factories_cookie = cookie;
}
return (self->factories != NULL);
GstCaps *
gst_subtitle_overlay_create_factory_caps (void)
{
+ GstRegistry *registry;
GList *factories;
GstCaps *subcaps = NULL;
+ guint cookie;
+ registry = gst_registry_get ();
+ cookie = gst_registry_get_feature_list_cookie (registry);
G_LOCK (_factory_caps);
- if (!_factory_caps
- || _factory_caps_cookie !=
- gst_default_registry_get_feature_list_cookie ()) {
+ if (!_factory_caps || _factory_caps_cookie != cookie) {
if (_factory_caps)
gst_caps_unref (_factory_caps);
_factory_caps = gst_caps_new_empty ();
- factories = gst_default_registry_feature_filter (
+ factories = gst_registry_feature_filter (registry,
(GstPluginFeatureFilter) _factory_filter, FALSE, &_factory_caps);
GST_DEBUG ("Created factory caps: %" GST_PTR_FORMAT, _factory_caps);
gst_plugin_feature_list_free (factories);
- _factory_caps_cookie = gst_default_registry_get_feature_list_cookie ();
+ _factory_caps_cookie = cookie;
}
subcaps = gst_caps_ref (_factory_caps);
G_UNLOCK (_factory_caps);
static void
gst_uri_decode_bin_update_factories_list (GstURIDecodeBin * dec)
{
- if (!dec->factories ||
- dec->factories_cookie !=
- gst_default_registry_get_feature_list_cookie ()) {
+ guint32 cookie;
+
+ cookie = gst_registry_get_feature_list_cookie (gst_registry_get ());
+ if (!dec->factories || dec->factories_cookie != cookie) {
if (dec->factories)
gst_plugin_feature_list_free (dec->factories);
dec->factories =
gst_element_factory_list_get_elements
(GST_ELEMENT_FACTORY_TYPE_DECODABLE, GST_RANK_MARGINAL);
- dec->factories_cookie = gst_default_registry_get_feature_list_cookie ();
+ dec->factories_cookie = cookie;
}
}
"fakemp3parse", "fakemp3parse", plugin_init, VERSION, "LGPL",
"gst-plugins-base", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
- feature = gst_default_registry_find_feature ("testmpegaudioparse",
- GST_TYPE_ELEMENT_FACTORY);
+ feature = gst_registry_find_feature (gst_registry_get (),
+ "testmpegaudioparse", GST_TYPE_ELEMENT_FACTORY);
gst_plugin_feature_set_rank (feature, GST_RANK_PRIMARY + 100);
if (factory_to_test == NULL) {
GList *list, *l;
- list = gst_default_registry_feature_filter (filter_func, FALSE, NULL);
+ list = gst_registry_feature_filter (gst_registry_get (), filter_func,
+ FALSE, NULL);
+
if (list == NULL) {
g_print ("No libvisual plugins installed.\n");
return;
ignorelist = g_strsplit (STATE_IGNORE_ELEMENTS, " ", 0);
}
- plugins = gst_registry_get_plugin_list (gst_registry_get_default ());
+ plugins = gst_registry_get_plugin_list (gst_registry_get ());
for (p = plugins; p; p = p->next) {
GstPlugin *plugin = p->data;
continue;
features =
- gst_registry_get_feature_list_by_plugin (gst_registry_get_default (),
+ gst_registry_get_feature_list_by_plugin (gst_registry_get (),
gst_plugin_get_name (plugin));
for (f = features; f; f = f->next) {
vis_entries = g_array_new (FALSE, FALSE, sizeof (VisEntry));
- list = gst_registry_feature_filter (gst_registry_get_default (),
+ list = gst_registry_feature_filter (gst_registry_get (),
filter_features, FALSE, NULL);
for (walk = list; walk; walk = g_list_next (walk)) {
vis_entries = g_array_new (FALSE, FALSE, sizeof (VisEntry));
- list = gst_registry_feature_filter (gst_registry_get_default (),
+ list = gst_registry_feature_filter (gst_registry_get (),
filter_features, FALSE, NULL);
for (walk = list; walk; walk = g_list_next (walk)) {