From: Tim-Philipp Müller Date: Thu, 11 May 2006 18:06:18 +0000 (+0000) Subject: gst/playback/gstplaybin.c: Make playbin automatically plug an 'audioresample' element... X-Git-Tag: 1.19.3~511^2~11920 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7cae9d887f378d74d8d6e7a81571dc2a43868e65;p=platform%2Fupstream%2Fgstreamer.git gst/playback/gstplaybin.c: Make playbin automatically plug an 'audioresample' element before the audio sink as well. ... Original commit message from CVS: * gst/playback/gstplaybin.c: (gen_audio_element): Make playbin automatically plug an 'audioresample' element before the audio sink as well. This solves problems with sinks that only accept a very specific sample rate, like esdsink (e.g. #340379). --- diff --git a/ChangeLog b/ChangeLog index f1ff870..7fc10a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2006-05-11 Tim-Philipp Müller + * gst/playback/gstplaybin.c: (gen_audio_element): + Make playbin automatically plug an 'audioresample' + element before the audio sink as well. This solves + problems with sinks that only accept a very specific + sample rate, like esdsink (e.g. #340379). + +2006-05-11 Tim-Philipp Müller + * gst/playback/gstplaybasebin.c: (gen_source_element): Make http sources send special headers so that we receive icecast metadata if the http stream is an icecast stream diff --git a/gst/playback/gstplaybin.c b/gst/playback/gstplaybin.c index 33260c0..dcac5d9 100644 --- a/gst/playback/gstplaybin.c +++ b/gst/playback/gstplaybin.c @@ -751,10 +751,9 @@ gen_audio_element (GstPlayBin * play_bin) { GstElement *element; GstElement *conv; + GstElement *scale; GstElement *sink; GstElement *volume; - - /* GstElement *scale; */ GstPad *pad; element = g_hash_table_lookup (play_bin->cache, "abin"); @@ -765,11 +764,11 @@ gen_audio_element (GstPlayBin * play_bin) conv = gst_element_factory_make ("audioconvert", "aconv"); if (conv == NULL) goto no_audioconvert; -/* + scale = gst_element_factory_make ("audioresample", "aresample"); if (scale == NULL) goto no_audioresample; -*/ + volume = gst_element_factory_make ("volume", "volume"); g_object_set (G_OBJECT (volume), "volume", play_bin->volume, NULL); play_bin->volume_element = volume; @@ -793,12 +792,12 @@ gen_audio_element (GstPlayBin * play_bin) g_hash_table_insert (play_bin->cache, "audio_sink", sink); gst_bin_add (GST_BIN (element), conv); - /* gst_bin_add (GST_BIN (element), scale); */ + gst_bin_add (GST_BIN (element), scale); gst_bin_add (GST_BIN (element), volume); gst_bin_add (GST_BIN (element), sink); - gst_element_link_pads (conv, "src", /*scale, "sink"); - gst_element_link_pads (scale, "src", */ volume, "sink"); + gst_element_link_pads (conv, "src", scale, "sink"); + gst_element_link_pads (scale, "src", volume, "sink"); gst_element_link_pads (volume, "src", sink, "sink"); pad = gst_element_get_pad (conv, "sink"); @@ -822,17 +821,15 @@ no_audioconvert: gst_object_unref (element); return NULL; } -/* + no_audioresample: { GST_ELEMENT_ERROR (play_bin, CORE, MISSING_PLUGIN, (_("Missing element '%s' - check your GStreamer installation."), - "audioresample"), - ("possibly a liboil version mismatch?")); + "audioresample"), ("possibly a liboil version mismatch?")); gst_object_unref (element); return NULL; } -*/ } /* make the element (bin) that contains the elements needed to perform