GNOME Bugzilla – Bug 795591
pulsesink: PA_CONTEXT_NOAUTOSPAWN option in pulsesink
Last modified: 2018-05-04 00:04:04 UTC
Hi, I have a question about PA_CONTEXT_NOAUTOSPAWN options in pulsesink. Here is my environment. - yocto build - use pulseaudio 10.0 and 'allow-autospawn-for-root' is on - use gstreamer(gst-plugins-good) 1.10.4 i played some sounds with paplay. pulseaudio was executed by paplay and it worked fine. but i tried playing sound with gst-launch, some errors were printed out like below. i think the reason why connecting fail is that pulsesink use PA_CONTEXT_NOAUTOSPAWN when it try connecting pulseaudio. gst-launch works fine when i remove NOAUTOSPAWN option in pulsesink. error message root@mv8890:~# gst-launch-1.0 audiotestsrc ! pulsesink Setting pipeline to PAUSED ... ERROR: Pipeline doesn't want to pause. ERROR: from element /GstPipeline:pipeline0/GstPulseSink:pulsesink0: Failed to connect: Connection refused Additional debug info: ../../../gst-plugins-good-1.10.4/ext/pulse/pulsesink.c(615): gst_pulseringbuffer_open_device (): /GstPipeline:pipe line0/GstPulseSink:pulsesink0 Setting pipeline to NULL ... Freeing pipeline ... difference pulsesink(not working) : pa_context_connect (pctx->context, psink->server, PA_CONTEXT_NOAUTOSPAWN, NULL) - NOAUTOSPAWN paplay(working) : pa_context_connect(context, server, 0, NULL) - no options here my questions. Q1. Is there a reason that have to use NOAUTOSPAWN options in pulsesink? if it doesn't need to anymore, i can raise a commit to fix. Q2. If the option can't be changed, how can i run pulseaudio with pulsesink?
Created attachment 371632 [details] [review] removed autospawn mode
(In reply to LEE from comment #0) > > here my questions. > Q1. Is there a reason that have to use NOAUTOSPAWN options in pulsesink? if > it doesn't need to anymore, i can raise a commit to fix. The policy is that pulsesink should not autospawn the pulseaudio daemon. This is part of automatic discovery of the sound backend based on what services *are running*. If not you would have jackaudiosink, pulsesink, artsd, pipewiresink all starting their own daemons when trying to figure out what backend to connect to. > Q2. If the option can't be changed, how can i run pulseaudio with pulsesink? Pulseaudio should be started as part of the boot process of the machine if you want to use it.
Ok, i understood. :) Thanks for your reply.