playsink: Try include 'pitch', if no other sink is provided
authorJan Schmidt <thaytan@noraisin.net>
Tue, 30 Aug 2011 08:21:31 +0000 (18:21 +1000)
committerJan Schmidt <thaytan@noraisin.net>
Tue, 30 Aug 2011 08:21:31 +0000 (18:21 +1000)
As a default, try the pipeline 'pitch ! audioconvert ! autoaudiosink'
before trying plain autoaudiosink

gst/playback/gstplaysink.c

index 01f00a5..cd92c33 100644 (file)
@@ -1665,6 +1665,14 @@ gen_audio_chain (GstPlaySink * playsink, gboolean raw)
   } else {
     /* only try fallback if no specific sink was chosen */
     if (chain->sink == NULL) {
+      GST_DEBUG_OBJECT (playsink,
+          "trying pitch ! audioconvert ! autoaudiosink");
+      elem =
+          gst_parse_bin_from_description
+          ("pitch ! audioconvert ! autoaudiosink", TRUE, NULL);
+      chain->sink = try_element (playsink, elem, TRUE);
+    }
+    if (chain->sink == NULL) {
       GST_DEBUG_OBJECT (playsink, "trying autoaudiosink");
       elem = gst_element_factory_make ("autoaudiosink", "audiosink");
       chain->sink = try_element (playsink, elem, TRUE);