mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
feature: use object name instaed of feature name
This commit is contained in:
parent
010add200a
commit
e614c6bd81
4 changed files with 9 additions and 11 deletions
|
@ -178,8 +178,8 @@ element_factory_rank_compare_func (gconstpointer a, gconstpointer b)
|
||||||
|
|
||||||
/* make order chosen in the end more determinable */
|
/* make order chosen in the end more determinable */
|
||||||
if (rank_a == rank_b) {
|
if (rank_a == rank_b) {
|
||||||
const gchar *name_a = GST_PLUGIN_FEATURE_NAME (GST_PLUGIN_FEATURE (a));
|
const gchar *name_a = GST_OBJECT_NAME (GST_PLUGIN_FEATURE (a));
|
||||||
const gchar *name_b = GST_PLUGIN_FEATURE_NAME (GST_PLUGIN_FEATURE (b));
|
const gchar *name_b = GST_OBJECT_NAME (GST_PLUGIN_FEATURE (b));
|
||||||
|
|
||||||
return g_ascii_strcasecmp (name_a, name_b);
|
return g_ascii_strcasecmp (name_a, name_b);
|
||||||
}
|
}
|
||||||
|
|
|
@ -768,13 +768,12 @@ _create_element_and_set_preset (GstElementFactory * factory,
|
||||||
{
|
{
|
||||||
GstElement *res = NULL;
|
GstElement *res = NULL;
|
||||||
|
|
||||||
GST_DEBUG ("Creating element from factory %s",
|
GST_DEBUG ("Creating element from factory %s", GST_OBJECT_NAME (factory));
|
||||||
GST_PLUGIN_FEATURE_NAME (factory));
|
|
||||||
res = gst_element_factory_create (factory, name);
|
res = gst_element_factory_create (factory, name);
|
||||||
if (preset && GST_IS_PRESET (res) &&
|
if (preset && GST_IS_PRESET (res) &&
|
||||||
!gst_preset_load_preset (GST_PRESET (res), preset)) {
|
!gst_preset_load_preset (GST_PRESET (res), preset)) {
|
||||||
GST_WARNING ("Couldn't set preset [%s] on element [%s]",
|
GST_WARNING ("Couldn't set preset [%s] on element [%s]",
|
||||||
preset, GST_PLUGIN_FEATURE_NAME (factory));
|
preset, GST_OBJECT_NAME (factory));
|
||||||
gst_object_unref (res);
|
gst_object_unref (res);
|
||||||
res = NULL;
|
res = NULL;
|
||||||
}
|
}
|
||||||
|
@ -1475,7 +1474,7 @@ _get_formatter (GstEncodeBin * ebin, GstEncodingProfile * sprof)
|
||||||
formatterfact = (GstElementFactory *) tmpfmtr->data;
|
formatterfact = (GstElementFactory *) tmpfmtr->data;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (ebin, "Trying formatter %s",
|
GST_DEBUG_OBJECT (ebin, "Trying formatter %s",
|
||||||
GST_PLUGIN_FEATURE_NAME (formatterfact));
|
GST_OBJECT_NAME (formatterfact));
|
||||||
|
|
||||||
if ((formatter =
|
if ((formatter =
|
||||||
_create_element_and_set_preset (formatterfact, preset, NULL)))
|
_create_element_and_set_preset (formatterfact, preset, NULL)))
|
||||||
|
@ -1524,7 +1523,7 @@ _get_muxer (GstEncodeBin * ebin)
|
||||||
|
|
||||||
muxerfact = (GstElementFactory *) tmpmux->data;
|
muxerfact = (GstElementFactory *) tmpmux->data;
|
||||||
|
|
||||||
GST_DEBUG ("Trying muxer %s", GST_PLUGIN_FEATURE_NAME (muxerfact));
|
GST_DEBUG ("Trying muxer %s", GST_OBJECT_NAME (muxerfact));
|
||||||
|
|
||||||
/* See if the muxer can sink all of our stream profile caps */
|
/* See if the muxer can sink all of our stream profile caps */
|
||||||
for (tmp = profiles; tmp; tmp = tmp->next) {
|
for (tmp = profiles; tmp; tmp = tmp->next) {
|
||||||
|
|
|
@ -3110,8 +3110,7 @@ autoplug_select_cb (GstElement * decodebin, GstPad * pad,
|
||||||
GST_DEBUG_OBJECT (playbin, "select group %p for %s:%s, %" GST_PTR_FORMAT,
|
GST_DEBUG_OBJECT (playbin, "select group %p for %s:%s, %" GST_PTR_FORMAT,
|
||||||
group, GST_DEBUG_PAD_NAME (pad), caps);
|
group, GST_DEBUG_PAD_NAME (pad), caps);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (playbin, "checking factory %s",
|
GST_DEBUG_OBJECT (playbin, "checking factory %s", GST_OBJECT_NAME (factory));
|
||||||
GST_PLUGIN_FEATURE_NAME (factory));
|
|
||||||
|
|
||||||
/* if it's not a sink, we just make decodebin try it */
|
/* if it's not a sink, we just make decodebin try it */
|
||||||
if (!gst_element_factory_list_is_type (factory,
|
if (!gst_element_factory_list_is_type (factory,
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
static gboolean
|
static gboolean
|
||||||
filter_func (GstPluginFeature * feature, gpointer user_data)
|
filter_func (GstPluginFeature * feature, gpointer user_data)
|
||||||
{
|
{
|
||||||
return (g_str_has_prefix (GST_PLUGIN_FEATURE_NAME (feature), "libvisual_"));
|
return (g_str_has_prefix (GST_OBJECT_NAME (feature), "libvisual_"));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -88,7 +88,7 @@ GST_START_TEST (test_shutdown)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (l = list; l != NULL; l = l->next) {
|
for (l = list; l != NULL; l = l->next) {
|
||||||
test_shutdown_for_factory (GST_PLUGIN_FEATURE_NAME (l->data));
|
test_shutdown_for_factory (GST_OBJECT_NAME (l->data));
|
||||||
}
|
}
|
||||||
gst_plugin_feature_list_free (list);
|
gst_plugin_feature_list_free (list);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue