summaryrefslogtreecommitdiffstats
path: root/gst/autodetect
diff options
context:
space:
mode:
authorJan Schmidt <thaytan@mad.scientist.com>2006-05-16 14:07:29 +0000
committerJan Schmidt <thaytan@mad.scientist.com>2006-05-16 14:07:29 +0000
commit6ac3f840db01e2f0f1433f8a6ce4232d8ccac853 (patch)
treebfaaeee438a58b4dc610583711a2c614a4f04b0c /gst/autodetect
parent1215828fae9fe1614cb709374a6c163c29aaf299 (diff)
gst/autodetect/: Make the name of the child element be based on the name of the parent, so that debug output is more ...
Original commit message from CVS: * gst/autodetect/gstautoaudiosink.c: (gst_auto_audio_sink_find_best): * gst/autodetect/gstautovideosink.c: (gst_auto_video_sink_find_best): Make the name of the child element be based on the name of the parent, so that debug output is more useful. * gst/id3demux/id3v2frames.c: (find_utf16_bom), (parse_insert_string_field), (parse_split_strings): Rework string parsing to always walk over BOM markers in UTF16 strings, using the endianness indicated by the innermost one, then trying the opposite endianness if that fails to convert to valid UTF-8. Fixes #341774
Diffstat (limited to 'gst/autodetect')
-rw-r--r--gst/autodetect/gstautoaudiosink.c5
-rw-r--r--gst/autodetect/gstautovideosink.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/gst/autodetect/gstautoaudiosink.c b/gst/autodetect/gstautoaudiosink.c
index 5743ef33..5e70ac79 100644
--- a/gst/autodetect/gstautoaudiosink.c
+++ b/gst/autodetect/gstautoaudiosink.c
@@ -159,6 +159,8 @@ gst_auto_audio_sink_find_best (GstAutoAudioSink * sink)
GstMessage *message = NULL;
GSList *errors = NULL;
GstBus *bus = gst_bus_new ();
+ gchar *child_name = g_strdup_printf ("%s-actual-sink",
+ GST_OBJECT_NAME (sink));
list = gst_registry_feature_filter (gst_registry_get_default (),
(GstPluginFeatureFilter) gst_auto_audio_sink_factory_filter, FALSE, sink);
@@ -178,7 +180,7 @@ gst_auto_audio_sink_find_best (GstAutoAudioSink * sink)
GstElementFactory *f = GST_ELEMENT_FACTORY (item->data);
GstElement *el;
- if ((el = gst_element_factory_create (f, "actual-sink"))) {
+ if ((el = gst_element_factory_create (f, child_name))) {
/* FIXME: no element actually has this property as far as I can tell.
* also, this is a nasty uncheckable way of supporting something that
* amounts to being an interface. */
@@ -247,6 +249,7 @@ done:
("Failed to find a supported audio sink"));
}
}
+ g_free (child_name);
gst_object_unref (bus);
gst_plugin_feature_list_free (list);
g_slist_foreach (errors, (GFunc) gst_mini_object_unref, NULL);
diff --git a/gst/autodetect/gstautovideosink.c b/gst/autodetect/gstautovideosink.c
index 15d89091..779acf12 100644
--- a/gst/autodetect/gstautovideosink.c
+++ b/gst/autodetect/gstautovideosink.c
@@ -155,6 +155,8 @@ gst_auto_video_sink_find_best (GstAutoVideoSink * sink)
{
GstElement *choice = NULL;
GList *list, *walk;
+ gchar *child_name = g_strdup_printf ("%s-actual-sink",
+ GST_OBJECT_NAME (sink));
list = gst_registry_feature_filter (gst_registry_get_default (),
(GstPluginFeatureFilter) gst_auto_video_sink_factory_filter, FALSE, sink);
@@ -165,7 +167,7 @@ gst_auto_video_sink_find_best (GstAutoVideoSink * sink)
GstElement *el;
GST_DEBUG_OBJECT (sink, "Trying %s", GST_PLUGIN_FEATURE (f)->name);
- if ((el = gst_element_factory_create (f, "actual-sink"))) {
+ if ((el = gst_element_factory_create (f, child_name))) {
GstStateChangeReturn ret;
GST_DEBUG_OBJECT (sink, "Changing state to READY");
@@ -188,6 +190,7 @@ gst_auto_video_sink_find_best (GstAutoVideoSink * sink)
}
done:
+ g_free (child_name);
gst_plugin_feature_list_free (list);
return choice;