After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 434260 - PulseAudio plugin takes long to determine whether PulseAudio server is running.
PulseAudio plugin takes long to determine whether PulseAudio server is running.
Status: RESOLVED NOTGNOME
Product: GStreamer
Classification: Platform
Component: gst-plugins
0.10.12
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-04-29 03:10 UTC by gattahernan
Modified: 2007-04-29 04:32 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
Output of strace gst-launch playbin uri="cdda://" 2> ~/Desktop/strace.txt (124.61 KB, text/plain)
2007-04-29 03:12 UTC, gattahernan
Details

Description gattahernan 2007-04-29 03:10:08 UTC
Whenever I launch a GStreamer-based application and the Audio output settings are set to Autodetect, GStreamer first tries to see if pulseaudiosink is a good output and it takes around ten seconds to figure out that the PulseAudio server is not running to then fall into a plugin that works. Setting the output plugin to ALSA for example, works instantly. The PulseAudio plugin has a Rank of 256 while alsasink has 253, so the first is chosen probed first.
Comment 1 gattahernan 2007-04-29 03:11:15 UTC
Here's the output when GST_DEBUG is set to autodetect:5,pulse:5

   1.
      Setting pipeline to PAUSED ...
   2.
      0:00:02.573913000 13188 0x804e050 DEBUG           autodetect gstautoaudiosink.c:268:gst_auto_audio_sink_detect:<audiosink> Creating new kid
   3.
      0:00:02.574640000 13188 0x804e050 LOG             autodetect gstautoaudiosink.c:195:gst_auto_audio_sink_find_best:<audiosink> Trying to find usable audio devices ...
   4.
      0:00:02.875399000 13188 0x804e050 DEBUG           autodetect gstautoaudiosink.c:204:gst_auto_audio_sink_find_best:<audiosink> Testing pulsesink
   5.
      0:00:13.111420000 13188 0x804e050 WARN                 pulse pulsesink.c:326:gst_pulsesink_open:<audiosink-actual-sink-pulse> error: Failed to connect: Connection refused
   6.
      0:00:13.111673000 13188 0x804e050 DEBUG           autodetect gstautoaudiosink.c:217:gst_auto_audio_sink_find_best:<audiosink> error message error message from element 'audiosink-actual-sink-pulse': GstMessageError, gerror=(GstGError)(NULL), debug=(string)"pulsesink.c\(326\):\ gst_pulsesink_open\ \(\):\ /audiosink-actual-sink-pulse"
   7.
      0:00:13.328954000 13188 0x804e050 DEBUG           autodetect gstautoaudiosink.c:204:gst_auto_audio_sink_find_best:<audiosink> Testing jackaudiosink
   8.
      0:00:13.329919000 13188 0x804e050 DEBUG           autodetect gstautoaudiosink.c:217:gst_auto_audio_sink_find_best:<audiosink> error message error message from element 'audiosink-actual-sink-jackaudio': GstMessageError, gerror=(GstGError)(NULL), debug=(string)"gstjackaudiosink.c\(363\):\ gst_jack_ring_buffer_open_device\ \(\):\ /audiosink-actual-sink-jackaudio:\012Cannot\ connect\ to\ the\ Jack\ server\ \(status\ 17\)"
   9.
      0:00:13.498492000 13188 0x804e050 DEBUG           autodetect gstautoaudiosink.c:204:gst_auto_audio_sink_find_best:<audiosink> Testing alsadmixsink
  10.
      0:00:13.702348000 13188 0x804e050 DEBUG           autodetect gstautoaudiosink.c:209:gst_auto_audio_sink_find_best:<audiosink> This worked!
  11.
      0:00:13.702579000 13188 0x804e050 DEBUG           autodetect gstautoaudiosink.c:229:gst_auto_audio_sink_find_best:<audiosink> done trying
  12.
      0:00:13.706017000 13188 0x804e050 DEBUG           autodetect gstautoaudiosink.c:278:gst_auto_audio_sink_detect:<audiosink> Re-assigning ghostpad
  13.
      0:00:13.710489000 13188 0x804e050 DEBUG           autodetect gstautoaudiosink.c:282:gst_auto_audio_sink_detect:<audiosink> done changing auto audio sink
  14.
      Pipeline is PREROLLING ...
  15.
      Pipeline is PREROLLED ...
  16.
      Setting pipeline to PLAYING ...
  17.
      New clock: GstAudioSinkClock
  18.
      Caught interrupt -- handling interrupt.
  19.
      Interrupt: Setting pipeline to PAUSED ...
  20.
      Execution ended after 5934853000 ns.
  21.
      Setting pipeline to PAUSED ...
  22.
      Setting pipeline to READY ...
  23.
      Setting pipeline to NULL ...
  24.
      FREEING pipeline ... 
Comment 2 gattahernan 2007-04-29 03:12:17 UTC
Created attachment 87215 [details]
Output of strace gst-launch playbin uri="cdda://" 2> ~/Desktop/strace.txt
Comment 3 gattahernan 2007-04-29 03:15:31 UTC
It stops here:

send(7, "<\377\1\0\0\1\0\0\0\0\0\0\tlocalhost\rno-domain"..., 52, MSG_NOSIGNAL) = 52

And does it twice.
Comment 4 David Schleef 2007-04-29 04:21:05 UTC
It appears that hostname lookups for localhost are timing out.  Which probably means that you don't have '127.0.0.1   localhost' in your /etc/hosts.

That being said, I don't know why pulseaudiosink would need to look up localhost.
Comment 5 David Schleef 2007-04-29 04:32:34 UTC
Oh yeah -- pulseaudiosink bugs aren't recorded here, since it's maintained outside the GStreamer project (for now).