playback, mixerutils: gst_registry_get_default() -> gst_registry_get()
This commit is contained in:
parent
ff4efd075f
commit
26e612aeda
@ -217,7 +217,7 @@ gst_audio_default_registry_mixer_filter (GstAudioMixerFilterFunc filter_func,
|
|||||||
|
|
||||||
/* go through all elements of a certain class and check whether
|
/* go through all elements of a certain class and check whether
|
||||||
* they implement a mixer. If so, add it to the list. */
|
* 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);
|
GST_TYPE_ELEMENT_FACTORY);
|
||||||
|
|
||||||
feature_list = g_list_sort (feature_list, element_factory_rank_compare_func);
|
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
|
static void
|
||||||
gst_decode_bin_update_factories_list (GstDecodeBin * dbin)
|
gst_decode_bin_update_factories_list (GstDecodeBin * dbin)
|
||||||
{
|
{
|
||||||
if (!dbin->factories
|
guint cookie;
|
||||||
|| dbin->factories_cookie !=
|
|
||||||
gst_default_registry_get_feature_list_cookie ()) {
|
cookie = gst_registry_get_feature_list_cookie (gst_registry_get ());
|
||||||
|
if (!dbin->factories || dbin->factories_cookie != cookie) {
|
||||||
if (dbin->factories)
|
if (dbin->factories)
|
||||||
gst_plugin_feature_list_free (dbin->factories);
|
gst_plugin_feature_list_free (dbin->factories);
|
||||||
dbin->factories =
|
dbin->factories =
|
||||||
gst_element_factory_list_get_elements
|
gst_element_factory_list_get_elements
|
||||||
(GST_ELEMENT_FACTORY_TYPE_DECODABLE, GST_RANK_MARGINAL);
|
(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)
|
gst_play_bin_update_elements_list (GstPlayBin * playbin)
|
||||||
{
|
{
|
||||||
GList *res, *tmp;
|
GList *res, *tmp;
|
||||||
|
guint cookie;
|
||||||
|
|
||||||
if (!playbin->elements ||
|
cookie = gst_registry_get_feature_list_cookie (gst_registry_get ());
|
||||||
playbin->elements_cookie !=
|
if (!playbin->elements || playbin->elements_cookie != cookie) {
|
||||||
gst_default_registry_get_feature_list_cookie ()) {
|
|
||||||
if (playbin->elements)
|
if (playbin->elements)
|
||||||
gst_plugin_feature_list_free (playbin->elements);
|
gst_plugin_feature_list_free (playbin->elements);
|
||||||
res =
|
res =
|
||||||
@ -1235,7 +1235,7 @@ gst_play_bin_update_elements_list (GstPlayBin * playbin)
|
|||||||
playbin->elements = g_list_concat (res, tmp);
|
playbin->elements = g_list_concat (res, tmp);
|
||||||
playbin->elements =
|
playbin->elements =
|
||||||
g_list_sort (playbin->elements, gst_plugin_feature_rank_compare_func);
|
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
|
static gboolean
|
||||||
gst_subtitle_overlay_update_factory_list (GstSubtitleOverlay * self)
|
gst_subtitle_overlay_update_factory_list (GstSubtitleOverlay * self)
|
||||||
{
|
{
|
||||||
if (!self->factories
|
GstRegistry *registry;
|
||||||
|| self->factories_cookie !=
|
guint cookie;
|
||||||
gst_default_registry_get_feature_list_cookie ()) {
|
|
||||||
|
registry = gst_registry_get ();
|
||||||
|
cookie = gst_registry_get_feature_list_cookie (registry);
|
||||||
|
if (!self->factories || self->factories_cookie != cookie) {
|
||||||
GstCaps *subcaps;
|
GstCaps *subcaps;
|
||||||
GList *factories;
|
GList *factories;
|
||||||
|
|
||||||
subcaps = gst_caps_new_empty ();
|
subcaps = gst_caps_new_empty ();
|
||||||
|
|
||||||
factories = gst_default_registry_feature_filter (
|
factories = gst_registry_feature_filter (registry,
|
||||||
(GstPluginFeatureFilter) _factory_filter, FALSE, &subcaps);
|
(GstPluginFeatureFilter) _factory_filter, FALSE, &subcaps);
|
||||||
GST_DEBUG_OBJECT (self, "Created factory caps: %" GST_PTR_FORMAT, subcaps);
|
GST_DEBUG_OBJECT (self, "Created factory caps: %" GST_PTR_FORMAT, subcaps);
|
||||||
gst_caps_replace (&self->factory_caps, subcaps);
|
gst_caps_replace (&self->factory_caps, subcaps);
|
||||||
@ -388,7 +391,7 @@ gst_subtitle_overlay_update_factory_list (GstSubtitleOverlay * self)
|
|||||||
if (self->factories)
|
if (self->factories)
|
||||||
gst_plugin_feature_list_free (self->factories);
|
gst_plugin_feature_list_free (self->factories);
|
||||||
self->factories = factories;
|
self->factories = factories;
|
||||||
self->factories_cookie = gst_default_registry_get_feature_list_cookie ();
|
self->factories_cookie = cookie;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (self->factories != NULL);
|
return (self->factories != NULL);
|
||||||
@ -401,22 +404,24 @@ static guint32 _factory_caps_cookie = 0;
|
|||||||
GstCaps *
|
GstCaps *
|
||||||
gst_subtitle_overlay_create_factory_caps (void)
|
gst_subtitle_overlay_create_factory_caps (void)
|
||||||
{
|
{
|
||||||
|
GstRegistry *registry;
|
||||||
GList *factories;
|
GList *factories;
|
||||||
GstCaps *subcaps = NULL;
|
GstCaps *subcaps = NULL;
|
||||||
|
guint cookie;
|
||||||
|
|
||||||
|
registry = gst_registry_get ();
|
||||||
|
cookie = gst_registry_get_feature_list_cookie (registry);
|
||||||
G_LOCK (_factory_caps);
|
G_LOCK (_factory_caps);
|
||||||
if (!_factory_caps
|
if (!_factory_caps || _factory_caps_cookie != cookie) {
|
||||||
|| _factory_caps_cookie !=
|
|
||||||
gst_default_registry_get_feature_list_cookie ()) {
|
|
||||||
if (_factory_caps)
|
if (_factory_caps)
|
||||||
gst_caps_unref (_factory_caps);
|
gst_caps_unref (_factory_caps);
|
||||||
_factory_caps = gst_caps_new_empty ();
|
_factory_caps = gst_caps_new_empty ();
|
||||||
|
|
||||||
factories = gst_default_registry_feature_filter (
|
factories = gst_registry_feature_filter (registry,
|
||||||
(GstPluginFeatureFilter) _factory_filter, FALSE, &_factory_caps);
|
(GstPluginFeatureFilter) _factory_filter, FALSE, &_factory_caps);
|
||||||
GST_DEBUG ("Created factory caps: %" GST_PTR_FORMAT, _factory_caps);
|
GST_DEBUG ("Created factory caps: %" GST_PTR_FORMAT, _factory_caps);
|
||||||
gst_plugin_feature_list_free (factories);
|
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);
|
subcaps = gst_caps_ref (_factory_caps);
|
||||||
G_UNLOCK (_factory_caps);
|
G_UNLOCK (_factory_caps);
|
||||||
|
@ -280,15 +280,16 @@ gst_uri_decode_bin_autoplug_continue (GstElement * element, GstPad * pad,
|
|||||||
static void
|
static void
|
||||||
gst_uri_decode_bin_update_factories_list (GstURIDecodeBin * dec)
|
gst_uri_decode_bin_update_factories_list (GstURIDecodeBin * dec)
|
||||||
{
|
{
|
||||||
if (!dec->factories ||
|
guint32 cookie;
|
||||||
dec->factories_cookie !=
|
|
||||||
gst_default_registry_get_feature_list_cookie ()) {
|
cookie = gst_registry_get_feature_list_cookie (gst_registry_get ());
|
||||||
|
if (!dec->factories || dec->factories_cookie != cookie) {
|
||||||
if (dec->factories)
|
if (dec->factories)
|
||||||
gst_plugin_feature_list_free (dec->factories);
|
gst_plugin_feature_list_free (dec->factories);
|
||||||
dec->factories =
|
dec->factories =
|
||||||
gst_element_factory_list_get_elements
|
gst_element_factory_list_get_elements
|
||||||
(GST_ELEMENT_FACTORY_TYPE_DECODABLE, GST_RANK_MARGINAL);
|
(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",
|
"fakemp3parse", "fakemp3parse", plugin_init, VERSION, "LGPL",
|
||||||
"gst-plugins-base", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
|
"gst-plugins-base", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
|
||||||
|
|
||||||
feature = gst_default_registry_find_feature ("testmpegaudioparse",
|
feature = gst_registry_find_feature (gst_registry_get (),
|
||||||
GST_TYPE_ELEMENT_FACTORY);
|
"testmpegaudioparse", GST_TYPE_ELEMENT_FACTORY);
|
||||||
|
|
||||||
gst_plugin_feature_set_rank (feature, GST_RANK_PRIMARY + 100);
|
gst_plugin_feature_set_rank (feature, GST_RANK_PRIMARY + 100);
|
||||||
|
|
||||||
|
@ -82,7 +82,9 @@ GST_START_TEST (test_shutdown)
|
|||||||
if (factory_to_test == NULL) {
|
if (factory_to_test == NULL) {
|
||||||
GList *list, *l;
|
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) {
|
if (list == NULL) {
|
||||||
g_print ("No libvisual plugins installed.\n");
|
g_print ("No libvisual plugins installed.\n");
|
||||||
return;
|
return;
|
||||||
|
@ -45,7 +45,7 @@ setup (void)
|
|||||||
ignorelist = g_strsplit (STATE_IGNORE_ELEMENTS, " ", 0);
|
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) {
|
for (p = plugins; p; p = p->next) {
|
||||||
GstPlugin *plugin = p->data;
|
GstPlugin *plugin = p->data;
|
||||||
@ -54,7 +54,7 @@ setup (void)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
features =
|
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));
|
gst_plugin_get_name (plugin));
|
||||||
|
|
||||||
for (f = features; f; f = f->next) {
|
for (f = features; f; f = f->next) {
|
||||||
|
@ -1928,7 +1928,7 @@ init_visualization_features (void)
|
|||||||
|
|
||||||
vis_entries = g_array_new (FALSE, FALSE, sizeof (VisEntry));
|
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);
|
filter_features, FALSE, NULL);
|
||||||
|
|
||||||
for (walk = list; walk; walk = g_list_next (walk)) {
|
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));
|
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);
|
filter_features, FALSE, NULL);
|
||||||
|
|
||||||
for (walk = list; walk; walk = g_list_next (walk)) {
|
for (walk = list; walk; walk = g_list_next (walk)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user