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 795591 - pulsesink: PA_CONTEXT_NOAUTOSPAWN option in pulsesink
pulsesink: PA_CONTEXT_NOAUTOSPAWN option in pulsesink
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.10.4
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-04-26 23:43 UTC by LEE
Modified: 2018-05-04 00:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
removed autospawn mode (1.17 KB, patch)
2018-05-03 07:00 UTC, LEE
none Details | Review

Description LEE 2018-04-26 23:43:26 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?
Comment 1 LEE 2018-05-03 07:00:42 UTC
Created attachment 371632 [details] [review]
removed autospawn mode
Comment 2 Wim Taymans 2018-05-03 07:36:59 UTC
(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.
Comment 3 LEE 2018-05-04 00:04:04 UTC
Ok, i understood. :)

Thanks for your reply.