Discussion:
pulseaudio RTP Streaming problem on X11 Desktop
freeunix freeunix
2016-05-04 15:58:01 UTC
Permalink
hi, I use the OpenBSD 5.9 amd64 snapshots.
and XDM Remote Deskop using is marvelous for OpenBSD.

Now I have any problem.(I want use audio streaming for firefox.)
I tried to use pulseaudio. but couldn't work it.

#/etc/ttys(accept ttyC0 only)
ttyC0 "/usr/libexec/getty std.9600" vt220 on secure

#/etc/X11/xdm/Xservers
:0 foregin :0

#~/.pulse/default.pa
load-module module-native-protocol-tcp auth-anonymous=1
load-module module-native-protocol-unix
load-module module-suspend-on-idle timeout=1

#~/.pulse/daemon.conf
exit-idle-time = -1

1.run pulseaudio
[ttyp0]#pulseaudio -vvvv
W: [(null)] main.c: This program is not intended to be run as root (unless --system is specified).
D: [(null)] core-util.c: setpriority() worked.
I: [(null)] core-util.c: Successfully gained nice level -11.
I: [(null)] main.c: This is PulseAudio 8.0
D: [(null)] main.c: Compilation host: x86_64-unknown-openbsd5.9
D: [(null)] main.c: Compilation CFLAGS: -O2 -pipe -Wall -W -Wextra -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -fno-common -fdiagnostics-show-option
D: [(null)] main.c: Running on host: OpenBSD amd64 5.9 GENERIC.MP#1983
D: [(null)] main.c: Found 4 CPUs.
I: [(null)] main.c: Page size is 4096 bytes
D: [(null)] main.c: Compiled with Valgrind support: no
D: [(null)] main.c: Running in valgrind mode: no
D: [(null)] main.c: Running in VM: no
D: [(null)] main.c: Optimized build: yes
D: [(null)] main.c: FASTPATH defined, only fast path asserts disabled.
I: [(null)] main.c: Machine ID is b06e5d02cf33f06492d9b3a154934270.
I: [(null)] main.c: Using runtime directory /root/.pulse/b06e5d02cf33f06492d9b3a154934270-runtime.
I: [(null)] main.c: Using state directory /root/.pulse.
I: [(null)] main.c: Using modules directory /usr/local/lib/pulse-8.0/modules.
I: [(null)] main.c: Running in system mode: no
I: [(null)] main.c: System appears to not support high resolution timers
D: [(null)] memblock.c: Using shared memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 65472
D: [(null)] memblock.c: Using shared memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 65472
I: [(null)] cpu-x86.c: CPU flags: SSE3 SSSE3 SSE4_1 SSE4_2 MMXEXT 3DNOWEXT
W: [(null)] socket-util.c: IP_TOS failed: Invalid argument
I: [(null)] module.c: Loaded "module-native-protocol-tcp" (index: #0; argument: "auth-anonymous=1").
I: [(null)] module.c: Loaded "module-native-protocol-unix" (index: #1; argument: "").
I: [(null)] module.c: Loaded "module-suspend-on-idle" (index: #2; argument: "timeout=1").
D: [(null)] dbus-util.c: Successfully connected to D-Bus session bus 680246337c1b89695cadb60257291201 as :1.14
D: [(null)] main.c: Got org.PulseAudio1!
D: [(null)] main.c: Got org.pulseaudio.Server!
I: [(null)] main.c: Daemon startup complete.

2.run pactl
[ttyp1]#pactl load-module module-null-sink sink_name=rtp
3
[ttyp0]
I: [(null)] client.c: Created 0 "Native client (UNIX socket client)"
D: [(null)] protocol-native.c: Protocol version: remote 30, local 30
D: [(null)] protocol-native.c: SHM possible: yes
D: [(null)] protocol-native.c: Negotiated SHM: yes
D: [(null)] srbchannel.c: SHM block is 65472 bytes, ringbuffer capacity is 2 * 32712 bytes
D: [(null)] protocol-native.c: Failed to create srbchannel
I: [(null)] sink.c: Created sink 0 "rtp" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [(null)] sink.c: device.description = "Null Output"
I: [(null)] sink.c: device.class = "abstract"
I: [(null)] sink.c: device.icon_name = "audio-card"
I: [(null)] source.c: Created source 0 "rtp.monitor" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [(null)] source.c: device.description = "Monitor of Null Output"
I: [(null)] source.c: device.class = "monitor"
I: [(null)] source.c: device.icon_name = "audio-input-microphone"
D: [null-sink] module-null-sink.c: Thread starting up
D: [(null)] module-suspend-on-idle.c: Sink rtp becomes idle, timeout in 1 seconds.
I: [(null)] module.c: Loaded "module-null-sink" (index: #3; argument: "sink_name=rtp").
I: [(null)] client.c: Freed 0 "pactl"
I: [(null)] protocol-native.c: Connection died.
I: [(null)] module-suspend-on-idle.c: Sink rtp idle for too long, suspending ...
D: [(null)] sink.c: Suspend cause of sink rtp is 0x0004, suspending
D: [(null)] core.c: Hmm, no streams around, trying to vacuum.

3.run pactl
[ttyp1]#pactl load-module module-rtp-send source=rtp.monitor
Failure: Module initialization failed
[ttyp0]
I: [(null)] client.c: Created 1 "Native client (UNIX socket client)"
D: [(null)] protocol-native.c: Protocol version: remote 30, local 30
D: [(null)] protocol-native.c: SHM possible: yes
D: [(null)] protocol-native.c: Negotiated SHM: yes
D: [(null)] srbchannel.c: SHM block is 65472 bytes, ringbuffer capacity is 2 * 32712 bytes
D: [(null)] protocol-native.c: Failed to create srbchannel
E: [(null)] module-rtp-send.c: IP_MULTICAST_LOOP failed: Invalid argument
E: [(null)] module.c: Failed to load module "module-rtp-send" (argument: "source=rtp.monitor"): initialization failed.
I: [(null)] client.c: Freed 1 "pactl"
I: [(null)] protocol-native.c: Connection died.

4.run start-pulseaudio-x11
[ttyp1]#start-pulseaudio-x11

[ttyp0]
I: [(null)] client.c: Created 2 "Native client (UNIX socket client)"
D: [(null)] protocol-native.c: Protocol version: remote 30, local 30
D: [(null)] protocol-native.c: SHM possible: yes
D: [(null)] protocol-native.c: Negotiated SHM: yes
D: [(null)] srbchannel.c: SHM block is 65472 bytes, ringbuffer capacity is 2 * 32712 bytes
D: [(null)] protocol-native.c: Failed to create srbchannel
I: [(null)] module.c: Loaded "module-x11-publish" (index: #5; argument: "display=192.168.0.XXX:0").
I: [(null)] client.c: Freed 2 "pactl"
I: [(null)] protocol-native.c: Connection died.
I: [(null)] client.c: Created 3 "Native client (UNIX socket client)"
D: [(null)] protocol-native.c: Protocol version: remote 30, local 30
D: [(null)] protocol-native.c: SHM possible: yes
D: [(null)] protocol-native.c: Negotiated SHM: yes
D: [(null)] srbchannel.c: SHM block is 65472 bytes, ringbuffer capacity is 2 * 32712 bytes
D: [(null)] protocol-native.c: Failed to create srbchannel
D: [(null)] module-x11-cork-request.c: XTest 2.2 supported.
I: [(null)] module.c: Loaded "module-x11-cork-request" (index: #6; argument: "display=192.168.0.XXX:0").
I: [(null)] client.c: Freed 3 "pactl"
I: [(null)] protocol-native.c: Connection died.
Alexandre Ratchov
2016-05-06 05:46:03 UTC
Permalink
Post by freeunix freeunix
hi, I use the OpenBSD 5.9 amd64 snapshots.
and XDM Remote Deskop using is marvelous for OpenBSD.
Now I have any problem.(I want use audio streaming for firefox.)
I tried to use pulseaudio. but couldn't work it.
Are both client and server running OpenBSD? If so, you could use
sndiod instead of pulseaudio to forward audio. On the system with
the sound card, setup sndiod to use the -L option, for instance
run:

rcctl set sndiod flags -L -

and on all the systems where audio programs run export
the environment variable:

AUDIODEVICE=***@hostname/0

where hostname is the network address of the system with the sound
card.

-- Alexandre

Loading...