mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 17:18:15 +00:00
playback, mixerutils: gst_registry_get_default() -> gst_registry_get()
This commit is contained in:
parent
ff4efd075f
commit
26e612aeda
10 changed files with 39 additions and 30 deletions
|
@ -217,7 +217,7 @@ gst_audio_default_registry_mixer_filter (GstAudioMixerFilterFunc filter_func,
|
|||
|
||||
/* 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);
|
||||
|
|
|
@ -919,15 +919,16 @@ gst_decode_bin_class_init (GstDecodeBinClass * klass)
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1220,10 +1220,10 @@ static void
|
|||
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 =
|
||||
|
@ -1235,7 +1235,7 @@ gst_play_bin_update_elements_list (GstPlayBin * playbin)
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -372,15 +372,18 @@ _factory_filter (GstPluginFeature * feature, GstCaps ** subcaps)
|
|||
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);
|
||||
|
@ -388,7 +391,7 @@ gst_subtitle_overlay_update_factory_list (GstSubtitleOverlay * self)
|
|||
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);
|
||||
|
@ -401,22 +404,24 @@ static guint32 _factory_caps_cookie = 0;
|
|||
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);
|
||||
|
|
|
@ -280,15 +280,16 @@ gst_uri_decode_bin_autoplug_continue (GstElement * element, GstPad * pad,
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -323,8 +323,8 @@ GST_START_TEST (test_mp3_parser_loop)
|
|||
"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);
|
||||
|
||||
|
|
|
@ -82,7 +82,9 @@ GST_START_TEST (test_shutdown)
|
|||
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;
|
||||
|
|
|
@ -45,7 +45,7 @@ setup (void)
|
|||
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;
|
||||
|
@ -54,7 +54,7 @@ setup (void)
|
|||
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) {
|
||||
|
|
|
@ -1928,7 +1928,7 @@ init_visualization_features (void)
|
|||
|
||||
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)) {
|
||||
|
|
|
@ -1073,7 +1073,7 @@ init_visualization_features (void)
|
|||
|
||||
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)) {
|
||||
|
|
Loading…
Reference in a new issue