masmu / pulseaudio-dlna

A lightweight streaming server which brings DLNA / UPNP and Chromecast support to PulseAudio and Linux
GNU General Public License v3.0
1.25k stars 162 forks source link

version 4.x and switch back to default sink #61

Closed nobanzai closed 8 years ago

nobanzai commented 8 years ago

Hi, is it possible to get a switch for this new behaviour: "If a device stops playing, the streams currently playing on the corresponding sink are switched back to the default sink" Using version 4.1 with my Majik DSM every so often for no apparent reason output is switched back to my hardware sound card. It is possible then to directly switch back to padlna, but if you are not sitting near your computer, this behaviour ist really annoying. Thx and bye. Michael.

masmu commented 8 years ago

I could implement a flag to turn this feature off.

Note that often another DMC (such as BubbleUPNP or others) stops the playback and therefore it is switched back.

nobanzai commented 8 years ago

With version 0.3.5 I don't have that issue. Also playback is never interrupted with this version, which would indicate a different client trying to connect to the renderer. Whats more, I don't run other UPnP clients, when those fallback switches occur.

masmu commented 8 years ago

Thats odd. The switchback is triggered by a device which disconnects.

Could you provide a full debug log?

nobanzai commented 8 years ago

Tell me, what I should do and I will try my very best ;)

nobanzai commented 8 years ago

Just --debug?

masmu commented 8 years ago

pulseaudio-dlna --debug 2>&1 | tee -a debug.log will write a debug.log to the current directory.

Make sure that there was such a random disconnect event.

Then just upload / paste it somewhere (e.g. http://pastebin.com/) and paste the link here.

nobanzai commented 8 years ago

see http://pastebin.com/77pctGxa Two different sink switches occured during this logging period - the first one directly when playing the first song from amarok, the second one shortly before the end of the log.

masmu commented 8 years ago

Could you describe how you switched the stream in detail?

Are you using the pavucontrol or the system's audio settings for switching?

Did you switch the streams in that log multiple times?

How long does it usually take until the problem happens?

nobanzai commented 8 years ago

I didn't switch the stream myself. I got a system notification, that the renderer wasn't available and that it would switch now to the next sink. Afterwards I switched back using pavucontrol. As I wrote, the first time happened directly when starting to play the first song. The second time it happend about 10 (or a few more) minutes later.

masmu commented 8 years ago

How long does it usually take until the problem happens?

nobanzai commented 8 years ago

The first time always happens directly when starting to play the first song. The second time happens always about 10 (or a few more) minutes later. But I tried it only about three or four times!

masmu commented 8 years ago

Could you use the mp3 encoder and check if that issue persists?

pulseaudio-dlna --encoder mp3

nobanzai commented 8 years ago

I'll try it.

If it is of any interest, here is what the notification says before switching the sink:

"The device disconnected. Your streams were switched back to ICE1712 [Envy24] PCI Multi-Channel I/O Controller (M-Audio Delta Audiophile 2496) Digital Stereo (IEC958)"

and

"Switching to the audio playback device ICE1712 [Envy24] PCI Multi-Channel I/O Controller (M-Audio Delta Audiophile 2496) Digital Stereo (IEC958) which has higher preference or is specifically configured for this stream."

It does not have higher preference for category "music", though, but obviously the Majik DSM was not available for a short time.

nobanzai commented 8 years ago

Regardless of the encoder, it always switches to the M-Audio card, when I start amarok and start playing the first song. I always have to click on "revert" to get padlna as output sink. I can repeat that over and over: Quit amarok, start amarok, play a song -> sink gets switched, revert; quit amarok and so on. As I wrote, for category Music padlna is defined as the default sink, not the M-Audio card. And with padlna 0.3.5 this does not happen.

nobanzai commented 8 years ago

And yes, it also happens with encoder=mp3 and with encoder=wav.

masmu commented 8 years ago

Where does this higher music preference thing come from? Is it a feature in Amarok? I also have no idea where the "revert" button belongs to. Could you describe where i find those features, so that i have a chance to reproduce this behaviour?

masmu commented 8 years ago

In the meantime you can disable the switch-back feature yourself.

sudo gedit /usr/lib/python2.7/dist-packages/pulseaudio_dlna/streamserver.py

In line 178 you find the following code:

        if device not in self.sockets.values():
            self.server.message_queue.put(
                {'type': 'on_bridge_disconnected',
                         'stopped_bridge': device.bridge})

Change it to the following or just remove it:

        if False:
            self.server.message_queue.put(
                {'type': 'on_bridge_disconnected',
                         'stopped_bridge': device.bridge})

Save and restart pulseaudio-dlna. Leave the editor open so if you want to undo the changes, you can do it easily.

nobanzai commented 8 years ago

The "higer preference" thing comes from Desktop Settings -> Hardware -> Multimedia -> Audio and Video Settings in KDE4/5. There you can tell the underlying backend, which is the default sink and the order of the sinks. I'll try to disable the switch back later this day. Now a bike tour is planned ;)

masmu commented 8 years ago

Have fun! :smile:

No need for the patching anymore.

masmu commented 8 years ago
nobanzai commented 8 years ago

The famous beer garden survivor is back :) I just downloaded your latest version and installed it. The behaviour on playing the first song is a bit more weird than before - I had to switch three times back and forth to get sound. Without the --disable-switchback switch it also switches to a different sink every so often while playing songs - mostly between two songs. The log says: 08-02 19:56:13 pulseaudio_dlna.streamserver INFO Stream closed. Cleaning up remaining processes ... 08-02 19:56:13 pulseaudio_dlna.streamserver INFO Device "Wohnzimmer:Majik DSM:MediaRenderer" disconnected. 08-02 19:56:14 pulseaudio_dlna.pulseaudio INFO on_device_updated "/org/pulseaudio/core1/sink0" 08-02 19:56:14 pulseaudio_dlna.pulseaudio INFO The device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" was stopped.

nobanzai commented 8 years ago

Using the switch "--disable-switchback" made the situation even worse. Now sound stops without any notification. pavucontrol shows, that the sound is still playing using the Majik DSM, but you can't hear anything. Switching to the M-Audio card and switching back to the Majik DSM gives the sound back. This happens every about 10 minutes. One time I left the system alone - after another ten minutes sound came back, just to vanish again a few minutes later. Here is the according log file:

python pulseaudio-dlna --encoder=flac --disable-switchback '--filter-device=Wohnzimmer:Majik DSM:MediaRenderer' 08-02 19:59:58 pulseaudio_dlna.application INFO Using localhost: 192.168.1.41:8080 08-02 19:59:58 pulseaudio_dlna.application INFO Loaded encoders: 08-02 19:59:58 pulseaudio_dlna.application INFO 08-02 20:00:04 pulseaudio_dlna.listener INFO Discovery complete. 08-02 20:00:05 pulseaudio_dlna.pulseaudio INFO Added the device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)". 08-02 20:00:23 pulseaudio_dlna.pulseaudio INFO on_device_updated "/org/pulseaudio/core1/sink3" 08-02 20:00:23 pulseaudio_dlna.pulseaudio INFO The device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" is playing. 08-02 20:00:23 pulseaudio_dlna.streamserver INFO Requested streaming URL was: /wohnzimmermajikdsmmediarenderer_dlna.flac (HTTP/1.1) 08-02 20:00:23 pulseaudio_dlna.streamserver INFO Got request from majikdsm.hirmke.de - GET /wohnzimmermajikdsmmediarenderer_dlna.flac HTTP/1.1,200,- 08-02 20:00:23 pulseaudio_dlna.streamserver INFO Client 192.168.1.60 registered to stream /wohnzimmermajikdsmmediarenderer_dlna.flac. 08-02 20:00:23 pulseaudio_dlna.streamserver INFO Processes of /wohnzimmermajikdsmmediarenderer_dlna.flac initialized ... 08-02 20:05:12 pulseaudio_dlna.pulseaudio INFO on_playback_stream_removed "/org/pulseaudio/core1/playback_stream4" 08-02 20:05:12 pulseaudio_dlna.pulseaudio INFO The device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" was stopped. 08-02 20:05:12 pulseaudio_dlna.pulseaudio INFO on_new_playback_stream "/org/pulseaudio/core1/playback_stream5" 08-02 20:05:12 pulseaudio_dlna.pulseaudio INFO The device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" is playing. 08-02 20:05:12 pulseaudio_dlna.pulseaudio INFO on_playback_stream_removed "/org/pulseaudio/core1/playback_stream5" 08-02 20:05:12 pulseaudio_dlna.pulseaudio INFO The device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" was stopped. 08-02 20:05:12 pulseaudio_dlna.pulseaudio INFO on_new_playback_stream "/org/pulseaudio/core1/playback_stream6" 08-02 20:05:12 pulseaudio_dlna.pulseaudio INFO The device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" is playing. 08-02 20:05:12 pulseaudio_dlna.streamserver INFO Requested streaming URL was: /wohnzimmermajikdsmmediarenderer_dlna.flac (HTTP/1.1) 08-02 20:05:12 pulseaudio_dlna.streamserver INFO Got request from majikdsm.hirmke.de - GET /wohnzimmermajikdsmmediarenderer_dlna.flac HTTP/1.1,200,- 08-02 20:05:12 pulseaudio_dlna.streamserver INFO Client 192.168.1.60 unregistered stream /wohnzimmermajikdsmmediarenderer_dlna.flac using method 3. 08-02 20:05:12 pulseaudio_dlna.streamserver INFO Client 192.168.1.60 registered to stream /wohnzimmermajikdsmmediarenderer_dlna.flac. 08-02 20:05:13 pulseaudio_dlna.streamserver INFO Client 192.168.1.60 unregistered stream /wohnzimmermajikdsmmediarenderer_dlna.flac using method 3. 08-02 20:05:15 pulseaudio_dlna.streamserver INFO Stream closed. Cleaning up remaining processes ... 08-02 20:06:01 pulseaudio_dlna.pulseaudio INFO on_device_updated "/org/pulseaudio/core1/sink0" 08-02 20:06:01 pulseaudio_dlna.pulseaudio INFO The device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" was stopped. 08-02 20:06:05 pulseaudio_dlna.pulseaudio INFO on_device_updated "/org/pulseaudio/core1/sink3" 08-02 20:06:05 pulseaudio_dlna.pulseaudio INFO The device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" is playing. 08-02 20:06:05 pulseaudio_dlna.streamserver INFO Requested streaming URL was: /wohnzimmermajikdsmmediarenderer_dlna.flac (HTTP/1.1) 08-02 20:06:05 pulseaudio_dlna.streamserver INFO Got request from majikdsm.hirmke.de - GET /wohnzimmermajikdsmmediarenderer_dlna.flac HTTP/1.1,200,- 08-02 20:06:05 pulseaudio_dlna.streamserver INFO Client 192.168.1.60 registered to stream /wohnzimmermajikdsmmediarenderer_dlna.flac. 08-02 20:06:05 pulseaudio_dlna.streamserver INFO Processes of /wohnzimmermajikdsmmediarenderer_dlna.flac reinitialized ... 08-02 20:11:54 pulseaudio_dlna.pulseaudio INFO on_playback_stream_removed "/org/pulseaudio/core1/playback_stream6" 08-02 20:11:54 pulseaudio_dlna.pulseaudio INFO The device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" was stopped. 08-02 20:11:54 pulseaudio_dlna.pulseaudio INFO on_new_playback_stream "/org/pulseaudio/core1/playback_stream7" 08-02 20:11:54 pulseaudio_dlna.pulseaudio INFO The device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" is playing. 08-02 20:11:54 pulseaudio_dlna.pulseaudio INFO on_playback_stream_removed "/org/pulseaudio/core1/playback_stream7" 08-02 20:11:54 pulseaudio_dlna.pulseaudio INFO The device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" was stopped. 08-02 20:11:54 pulseaudio_dlna.pulseaudio INFO on_new_playback_stream "/org/pulseaudio/core1/playback_stream8" 08-02 20:11:54 pulseaudio_dlna.pulseaudio INFO The device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" is playing. 08-02 20:11:55 pulseaudio_dlna.streamserver INFO Requested streaming URL was: /wohnzimmermajikdsmmediarenderer_dlna.flac (HTTP/1.1) 08-02 20:11:55 pulseaudio_dlna.streamserver INFO Got request from majikdsm.hirmke.de - GET /wohnzimmermajikdsmmediarenderer_dlna.flac HTTP/1.1,200,- 08-02 20:11:55 pulseaudio_dlna.streamserver INFO Client 192.168.1.60 unregistered stream /wohnzimmermajikdsmmediarenderer_dlna.flac using method 3. 08-02 20:11:55 pulseaudio_dlna.streamserver INFO Client 192.168.1.60 registered to stream /wohnzimmermajikdsmmediarenderer_dlna.flac. 08-02 20:11:55 pulseaudio_dlna.streamserver INFO Client 192.168.1.60 unregistered stream /wohnzimmermajikdsmmediarenderer_dlna.flac using method 3. 08-02 20:11:57 pulseaudio_dlna.streamserver INFO Stream closed. Cleaning up remaining processes ... 08-02 20:21:51 pulseaudio_dlna.pulseaudio INFO on_playback_stream_removed "/org/pulseaudio/core1/playback_stream8" 08-02 20:21:51 pulseaudio_dlna.pulseaudio INFO The device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" was stopped. 08-02 20:21:51 pulseaudio_dlna.pulseaudio INFO on_new_playback_stream "/org/pulseaudio/core1/playback_stream9" 08-02 20:21:51 pulseaudio_dlna.streamserver INFO Requested streaming URL was: /wohnzimmermajikdsmmediarenderer_dlna.flac (HTTP/1.1) 08-02 20:21:51 pulseaudio_dlna.pulseaudio INFO The device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" is playing. 08-02 20:21:51 pulseaudio_dlna.streamserver INFO Got request from majikdsm.hirmke.de - GET /wohnzimmermajikdsmmediarenderer_dlna.flac HTTP/1.1,200,- 08-02 20:21:51 pulseaudio_dlna.streamserver INFO Client 192.168.1.60 registered to stream /wohnzimmermajikdsmmediarenderer_dlna.flac. 08-02 20:21:51 pulseaudio_dlna.streamserver INFO Processes of /wohnzimmermajikdsmmediarenderer_dlna.flac reinitialized ... 08-02 20:21:51 pulseaudio_dlna.pulseaudio INFO on_playback_stream_removed "/org/pulseaudio/core1/playback_stream9" 08-02 20:21:51 pulseaudio_dlna.pulseaudio INFO on_new_playback_stream "/org/pulseaudio/core1/playback_stream10" 08-02 20:27:42 pulseaudio_dlna.pulseaudio INFO on_playback_stream_removed "/org/pulseaudio/core1/playback_stream10" 08-02 20:27:42 pulseaudio_dlna.pulseaudio INFO The device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" was stopped. 08-02 20:27:42 pulseaudio_dlna.pulseaudio INFO on_new_playback_stream "/org/pulseaudio/core1/playback_stream11" 08-02 20:27:42 pulseaudio_dlna.pulseaudio INFO The device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" is playing. 08-02 20:27:42 pulseaudio_dlna.pulseaudio INFO on_playback_stream_removed "/org/pulseaudio/core1/playback_stream11" 08-02 20:27:42 pulseaudio_dlna.pulseaudio INFO The device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" was stopped. 08-02 20:27:42 pulseaudio_dlna.pulseaudio INFO on_new_playback_stream "/org/pulseaudio/core1/playback_stream12" 08-02 20:27:42 pulseaudio_dlna.pulseaudio INFO The device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" is playing. 08-02 20:27:43 pulseaudio_dlna.streamserver INFO Requested streaming URL was: /wohnzimmermajikdsmmediarenderer_dlna.flac (HTTP/1.1) 08-02 20:27:43 pulseaudio_dlna.streamserver INFO Got request from majikdsm.hirmke.de - GET /wohnzimmermajikdsmmediarenderer_dlna.flac HTTP/1.1,200,- 08-02 20:27:43 pulseaudio_dlna.streamserver INFO Client 192.168.1.60 unregistered stream /wohnzimmermajikdsmmediarenderer_dlna.flac using method 3. 08-02 20:27:43 pulseaudio_dlna.streamserver INFO Client 192.168.1.60 registered to stream /wohnzimmermajikdsmmediarenderer_dlna.flac. 08-02 20:27:43 pulseaudio_dlna.streamserver INFO Client 192.168.1.60 unregistered stream /wohnzimmermajikdsmmediarenderer_dlna.flac using method 3. 08-02 20:27:46 pulseaudio_dlna.streamserver INFO Stream closed. Cleaning up remaining processes ... 08-02 20:37:41 pulseaudio_dlna.pulseaudio INFO on_device_updated "/org/pulseaudio/core1/sink0" 08-02 20:37:41 pulseaudio_dlna.pulseaudio INFO The device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" was stopped. 08-02 20:37:44 pulseaudio_dlna.pulseaudio INFO on_device_updated "/org/pulseaudio/core1/sink3" 08-02 20:37:44 pulseaudio_dlna.pulseaudio INFO The device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" is playing. 08-02 20:37:44 pulseaudio_dlna.streamserver INFO Requested streaming URL was: /wohnzimmermajikdsmmediarenderer_dlna.flac (HTTP/1.1) 08-02 20:37:44 pulseaudio_dlna.streamserver INFO Got request from majikdsm.hirmke.de - GET /wohnzimmermajikdsmmediarenderer_dlna.flac HTTP/1.1,200,- 08-02 20:37:44 pulseaudio_dlna.streamserver INFO Client 192.168.1.60 registered to stream /wohnzimmermajikdsmmediarenderer_dlna.flac. 08-02 20:37:44 pulseaudio_dlna.streamserver INFO Processes of /wohnzimmermajikdsmmediarenderer_dlna.flac reinitialized ... 08-02 20:38:08 pulseaudio_dlna.pulseaudio INFO on_playback_stream_removed "/org/pulseaudio/core1/playback_stream12" 08-02 20:38:08 pulseaudio_dlna.pulseaudio INFO The device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" was stopped. 08-02 20:38:08 pulseaudio_dlna.pulseaudio INFO on_new_playback_stream "/org/pulseaudio/core1/playback_stream13" 08-02 20:38:08 pulseaudio_dlna.pulseaudio INFO The device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" is playing. 08-02 20:38:09 pulseaudio_dlna.pulseaudio INFO on_playback_stream_removed "/org/pulseaudio/core1/playback_stream13" 08-02 20:38:09 pulseaudio_dlna.pulseaudio INFO on_new_playback_stream "/org/pulseaudio/core1/playback_stream14" 08-02 20:38:09 pulseaudio_dlna.streamserver INFO Requested streaming URL was: /wohnzimmermajikdsmmediarenderer_dlna.flac (HTTP/1.1) 08-02 20:38:09 pulseaudio_dlna.streamserver INFO Got request from majikdsm.hirmke.de - GET /wohnzimmermajikdsmmediarenderer_dlna.flac HTTP/1.1,200,- 08-02 20:38:09 pulseaudio_dlna.streamserver INFO Client 192.168.1.60 unregistered stream /wohnzimmermajikdsmmediarenderer_dlna.flac using method 3. 08-02 20:38:09 pulseaudio_dlna.streamserver INFO Client 192.168.1.60 registered to stream /wohnzimmermajikdsmmediarenderer_dlna.flac. 08-02 20:38:09 pulseaudio_dlna.streamserver INFO Client 192.168.1.60 unregistered stream /wohnzimmermajikdsmmediarenderer_dlna.flac using method 3. 08-02 20:38:11 pulseaudio_dlna.streamserver INFO Stream closed. Cleaning up remaining processes ... 08-02 20:38:21 pulseaudio_dlna.pulseaudio INFO on_device_updated "/org/pulseaudio/core1/sink0" 08-02 20:38:21 pulseaudio_dlna.pulseaudio INFO The device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" was stopped. 08-02 20:38:24 pulseaudio_dlna.pulseaudio INFO on_device_updated "/org/pulseaudio/core1/sink3" 08-02 20:38:24 pulseaudio_dlna.pulseaudio INFO The device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" is playing. 08-02 20:38:24 pulseaudio_dlna.streamserver INFO Requested streaming URL was: /wohnzimmermajikdsmmediarenderer_dlna.flac (HTTP/1.1) 08-02 20:38:24 pulseaudio_dlna.streamserver INFO Got request from majikdsm.hirmke.de - GET /wohnzimmermajikdsmmediarenderer_dlna.flac HTTP/1.1,200,- 08-02 20:38:24 pulseaudio_dlna.streamserver INFO Client 192.168.1.60 registered to stream /wohnzimmermajikdsmmediarenderer_dlna.flac. 08-02 20:38:24 pulseaudio_dlna.streamserver INFO Processes of /wohnzimmermajikdsmmediarenderer_dlna.flac reinitialized ...

masmu commented 8 years ago

The switchback feature does not change the behaviour of your device. It just switches the actual stream back to the systems default sink if a device disconnects. Since you disabled that feature, you would assume your device is playing because of pavucontrol's GUI, but it is not. So, this behaviour is intended.

The real question is: Why does it disconnect?

08-02 20:21:51 pulseaudio_dlna.pulseaudio INFO on_playback_stream_removed "/org/pulseaudio/core1/playback_stream8"
08-02 20:21:51 pulseaudio_dlna.pulseaudio INFO The device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" was stopped.
08-02 20:21:51 pulseaudio_dlna.pulseaudio INFO on_new_playback_stream "/org/pulseaudio/core1/playback_stream9"
08-02 20:21:51 pulseaudio_dlna.streamserver INFO Requested streaming URL was: /wohnzimmermajikdsmmediarenderer_dlna.flac (HTTP/1.1)
08-02 20:21:51 pulseaudio_dlna.pulseaudio INFO The device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" is playing.
08-02 20:21:51 pulseaudio_dlna.streamserver INFO Got request from majikdsm.hirmke.de - GET /wohnzimmermajikdsmmediarenderer_dlna.flac HTTP/1.1,200,-
08-02 20:21:51 pulseaudio_dlna.streamserver INFO Client 192.168.1.60 registered to stream /wohnzimmermajikdsmmediarenderer_dlna.flac.
08-02 20:21:51 pulseaudio_dlna.streamserver INFO Processes of /wohnzimmermajikdsmmediarenderer_dlna.flac reinitialized ...
08-02 20:21:51 pulseaudio_dlna.pulseaudio INFO on_playback_stream_removed "/org/pulseaudio/core1/playback_stream9"
08-02 20:21:51 pulseaudio_dlna.pulseaudio INFO on_new_playback_stream "/org/pulseaudio/core1/playback_stream10"

As you can see, after a specific time (i assume the length of the current song) pulseaudio is removing the actual stream and instantly adds a new one. This makes pulseaudio-dlna instructing the actual device to stop. This behaviour is missing when using this with Gnome or unity and therefore i guess it is specific to KDE or Amarok.

I made a small patch to delay the actual stream events for about 500ms, so that they would sum up in short intervals and your device is just triggered when it really has to.

Wanna try it with git? Or do you prefer line changes as i gave you yesterday?

nobanzai commented 8 years ago

I understand your explanation, but what changed in Version 0.4.x that would cause my problems? In version 0.3.x none of the described problems occur. As for the patch I don't have any preferences - I'll take what I get :)

masmu commented 8 years ago

I took a look at all code regarding the pulseaudio module and i have some assumptions, but i am not quite sure.

The patch is included in here.

Replace /usr/lib/python2.7/dist-packages/pulseaudio_dlna/pulseaudio.py with that one.

It would be great if you could paste a console.log of a run with that patch included. pulseaudio-dlna 2>&1 | tee -a debug.log

nobanzai commented 8 years ago

It has been playing for about an hour without any interrupt - longer than any version 0.4.x before, but then it happened again. The renderer vanished and dbus gave an error. The problem when starting to play still exists. Starting a player and playing the first song always switches to a different sink, because the renderer could not be found. There is an ERROR message in the debug log, too. The same happens, when I stop and restart playing - first thing to happen is a switch to a different sink. See http://pastebin.com/4QPUi6Vg

masmu commented 8 years ago
python pulseaudio-dlna --debug --encoder=flac '--filter-device=Wohnzimmer:Majik DSM:MediaRenderer'
08-03 21:23:41 pulseaudio_dlna.application                    INFO     Using localhost: 192.168.1.41:8080
08-03 21:23:41 pulseaudio_dlna.application                    INFO     Loaded encoders:
08-03 21:23:41 pulseaudio_dlna.application                    INFO     <FlacEncoder bit-rate="None" state="True" enabled="True" mime-types="audio/flac,audio/x-flac">
08-03 21:23:42 requests.packages.urllib3.connectionpool       INFO     Starting new HTTP connection (1): 192.168.1.60
08-03 21:23:42 requests.packages.urllib3.connectionpool       DEBUG    "GET /MediaRenderer/device.xml HTTP/1.1" 200 2015
08-03 21:23:42 pulseaudio_dlna.plugins.upnp.renderer          DEBUG    Response from UPNP device (http://192.168.1.60:55178/MediaRenderer/device.xml)
<?xml version="1.0" encoding="utf-8"?><root xmlns="urn:schemas-upnp-org:device-1-0"><specVersion><major>1</major><minor>0</minor></specVersion><URLBase>http://192.168.1.60:55178/</URLBase><device><deviceType>urn:schemas-upnp-org:device:MediaRenderer:1</deviceType><presentationURL>http://192.168.1.60/index.html</presentationURL><friendlyName>Wohnzimmer:Majik DSM:MediaRenderer</friendlyName><manufacturer>Linn Products Ltd</manufacturer><manufacturerURL>http://www.linn.co.uk</manufacturerURL><modelDescription>Linn High Fidelity System Component</modelDescription><modelName>Majik DSM</modelName><modelNumber></modelNumber><modelURL>http://docs.linn.co.uk/wiki/index.php/Majik_DSM</modelURL><serialNumber>01344360</serialNumber><UDN>uuid:4c494e4e-0026-0f21-de7a-013443600171</UDN><UPC></UPC><serviceList><service><serviceType>urn:schemas-upnp-org:service:AVTransport:1</serviceType><serviceId>urn:upnp-org:serviceId:AVTransport</serviceId><SCPDURL>/MediaRenderer/AVTransport/service.xml</SCPDURL><controlURL>/MediaRenderer/AVTransport/control</controlURL><eventSubURL>/MediaRenderer/AVTransport/event</eventSubURL></service><service><serviceType>urn:schemas-upnp-org:service:RenderingControl:1</serviceType><serviceId>urn:upnp-org:serviceId:RenderingControl</serviceId><SCPDURL>/MediaRenderer/RenderingControl/service.xml</SCPDURL><controlURL>/MediaRenderer/RenderingControl/control</controlURL><eventSubURL>/MediaRenderer/RenderingControl/event</eventSubURL></service><service><serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType><serviceId>urn:upnp-org:serviceId:ConnectionManager</serviceId><SCPDURL>/MediaRenderer/ConnectionManager/service.xml</SCPDURL><controlURL>/MediaRenderer/ConnectionManager/control</controlURL><eventSubURL>/MediaRenderer/ConnectionManager/event</eventSubURL></service></serviceList><iconList><icon><mimetype>image/png</mimetype><width>120</width><height>50</height><depth>32</depth><url>http://192.168.1.60/images/Icon.png</url></icon></iconList></device></root>
08-03 21:23:42 requests.packages.urllib3.connectionpool       INFO     Starting new HTTP connection (1): 192.168.1.60
08-03 21:23:42 requests.packages.urllib3.connectionpool       DEBUG    "POST /MediaRenderer/ConnectionManager/control HTTP/1.1" 200 None
08-03 21:23:42 pulseaudio_dlna.plugins.upnp.renderer          DEBUG    sending GET_PROTOCOL_INFO to http://192.168.1.60:55178/MediaRenderer/ConnectionManager/control:
 - headers:
{u'SOAPAction': u'"urn:schemas-upnp-org:service:ConnectionManager:1#GetProtocolInfo"', u'Content-Type': u'text/xml; charset="utf-8"'}
 - data:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body>
        <u:GetProtocolInfo xmlns:u="urn:schemas-upnp-org:service:ConnectionManager:1">
        </u:GetProtocolInfo>
    </s:Body>
</s:Envelope>
 - result: 200
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetProtocolInfoResponse xmlns:u="urn:schemas-upnp-org:service:ConnectionManager:1"><Source></Source><Sink>http-get:*:audio/x-flac:*,http-get:*:audio/wav:*,http-get:*:audio/wave:*,http-get:*:audio/x-wav:*,http-get:*:audio/mpeg:*,http-get:*:audio/x-mpeg:*,http-get:*:audio/mp1:*,http-get:*:audio/aiff:*,http-get:*:audio/x-aiff:*,http-get:*:audio/x-m4a:*,http-get:*:audio/x-ms-wma:*,rtsp-rtp-udp:*:audio/x-ms-wma:*,http-get:*:audio/x-scpls:*,http-get:*:audio/x-mpegurl:*,http-get:*:audio/x-ms-asf:*,http-get:*:audio/x-ms-wax:*,http-get:*:audio/x-ms-wvx:*,http-get:*:video/x-ms-asf:*,http-get:*:video/x-ms-wax:*,http-get:*:video/x-ms-wvx:*,http-get:*:text/xml:*,http-get:*:audio/aac:*,http-get:*:audio/aacp:*,http-get:*:audio/mp4:*,http-get:*:audio/ogg:*,http-get:*:audio/x-ogg:*,http-get:*:application/ogg:*,tidalhifi.com:*:*:*,qobuz.com:*:*:*</Sink></u:GetProtocolInfoResponse></s:Body></s:Envelope>
08-03 21:23:48 pulseaudio_dlna.listener                       INFO     Discovery complete.
08-03 21:23:48 pulseaudio_dlna.pulseaudio                     INFO     Added the device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)".

The application has started up. Nothing unusual here.

08-03 21:24:31 pulseaudio_dlna.pulseaudio                     INFO     on_new_playback_stream "/org/pulseaudio/core1/playback_stream37"
08-03 21:24:31 pulseaudio_dlna.pulseaudio                     INFO     --- call_handle_sink_update /org/pulseaudio/core1/sink0
08-03 21:24:31 pulseaudio_dlna.pulseaudio                     INFO     on_playback_stream_removed "/org/pulseaudio/core1/playback_stream37"
08-03 21:24:31 pulseaudio_dlna.pulseaudio                     INFO     --- call_handle_sink_update /org/pulseaudio/core1/sink0
08-03 21:24:31 pulseaudio_dlna.pulseaudio                     INFO     on_new_playback_stream "/org/pulseaudio/core1/playback_stream38"
08-03 21:24:31 pulseaudio_dlna.pulseaudio                     INFO     --- call_handle_sink_update /org/pulseaudio/core1/sink0
08-03 21:24:31 pulseaudio_dlna.pulseaudio                     INFO     --- _handle_sink_update /org/pulseaudio/core1/sink0

New streams were added for your sink0 (i suspect this is your default sink) and is instantly removed. Looks like a system notification sound. This happens also in gnome when you do something wrong. But since this is just about sink0, it triggers no action from pulseaudio-dlna. So, this is also fine.

08-03 21:24:56 pulseaudio_dlna.streamserver                   DEBUG    Got the following GET request:
[
  [
    "icy-metadata", 
    "1"
  ], 
  [
    "host", 
    "192.168.1.41:8080"
  ], 
  [
    "range", 
    "bytes=0-"
  ], 
  [
    "connection", 
    "close"
  ], 
  [
    "user-agent", 
    "Linn DS"
  ]
]
08-03 21:24:56 pulseaudio_dlna.streamserver                   INFO     Requested streaming URL was: /wohnzimmermajikdsmmediarenderer.stream (HTTP/1.1)
08-03 21:24:56 pulseaudio_dlna.streamserver                   INFO     Error 404: File not found "/wohnzimmermajikdsmmediarenderer.stream"
08-03 21:24:56 pulseaudio_dlna.streamserver                   INFO     Got request from majikdsm.hirmke.de - 404,File not found: /wohnzimmermajikdsmmediarenderer.stream
08-03 21:24:56 pulseaudio_dlna.streamserver                   INFO     Got request from majikdsm.hirmke.de - GET /wohnzimmermajikdsmmediarenderer.stream HTTP/1.1,404,-

This is really weired. We get a request from the Majik. As you can see when looking at the timestamps and the log before, pulseaudio-dlna did not trigger that. Otherwise there would be registering and playing commands send to the Majik. Another indicator that pulseaudio-dlna has nothing to do with that, is that it is requesting an URL which was used in the 0.3 series. The 0.4 series do not use a .stream suffix anymore. Its always .flac or others depending on the used encoder. So, where does this request come from? Perhaps the Majik has some kind of auto reconnect feature? Does it remember devices? Or did you bookmark the old URL somehow?

08-03 21:25:12 pulseaudio_dlna.pulseaudio                     INFO     on_playback_stream_removed "/org/pulseaudio/core1/playback_stream38"
08-03 21:25:37 dbus.proxies                                   ERROR    Introspect error on None:/org/pulseaudio/core1/module38: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
08-03 21:25:37 dbus.proxies                                   DEBUG    Executing introspect queue due to error
08-03 21:25:37 pulseaudio_dlna.pulseaudio                     INFO     --- call_handle_sink_update /org/pulseaudio/core1/sink0
08-03 21:25:37 pulseaudio_dlna.pulseaudio                     INFO     on_new_playback_stream "/org/pulseaudio/core1/playback_stream39"
08-03 21:25:37 pulseaudio_dlna.pulseaudio                     INFO     --- call_handle_sink_update /org/pulseaudio/core1/sink6
08-03 21:25:37 pulseaudio_dlna.pulseaudio                     INFO     on_device_updated "/org/pulseaudio/core1/sink6"
08-03 21:25:37 pulseaudio_dlna.pulseaudio                     INFO     --- call_handle_sink_update /org/pulseaudio/core1/sink6
08-03 21:25:37 pulseaudio_dlna.pulseaudio                     INFO     --- _handle_sink_update /org/pulseaudio/core1/sink0
08-03 21:25:37 pulseaudio_dlna.pulseaudio                     INFO     --- _handle_sink_update /org/pulseaudio/core1/sink6

Here you should have switched the stream, since sink6 (i suspect your Majik) has updated. As a consequence the device is instructed to play. You can ignore the dbus error here. It happens in the dbus module and is handled internally. If the error would be important we would get an exception.

08-03 21:25:37 requests.packages.urllib3.connectionpool       INFO     Starting new HTTP connection (1): 192.168.1.60
08-03 21:25:37 requests.packages.urllib3.connectionpool       DEBUG    "POST /MediaRenderer/AVTransport/control HTTP/1.1" 200 None
08-03 21:25:37 pulseaudio_dlna.plugins.upnp.renderer          DEBUG    sending REGISTER to http://192.168.1.60:55178/MediaRenderer/AVTransport/control:
 - headers:
{u'SOAPAction': u'"urn:schemas-upnp-org:service:AVTransport:1#SetAVTransportURI"', u'Content-Type': u'text/xml; charset="utf-8"'}
 - data:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body>
        <u:SetAVTransportURI xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
            <InstanceID>0</InstanceID>
            <CurrentURI>http://192.168.1.41:8080/wohnzimmermajikdsmmediarenderer_dlna.flac</CurrentURI>
            <CurrentURIMetaData>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;DIDL-Lite xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" xmlns:sec="http://www.sec.co.kr/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/"&gt;
    &lt;item id="0" parentID="0" restricted="1"&gt;
        &lt;upnp:class&gt;object.item.audioItem.musicTrack&lt;/upnp:class&gt;
        &lt;dc:title&gt;Live Audio&lt;/dc:title&gt;
        &lt;dc:creator&gt;PulseAudio&lt;/dc:creator&gt;
        &lt;upnp:artist&gt;PulseAudio on susi&lt;/upnp:artist&gt;
        &lt;upnp:albumArtURI&gt;&lt;/upnp:albumArtURI&gt;
        &lt;upnp:album&gt;Stream&lt;/upnp:album&gt;
        &lt;res protocolInfo="http-get:*:audio/flac:DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000"&gt;http://192.168.1.41:8080/wohnzimmermajikdsmmediarenderer_dlna.flac&lt;/res&gt;
    &lt;/item&gt;
&lt;/DIDL-Lite&gt;
</CurrentURIMetaData>
        </u:SetAVTransportURI>
    </s:Body>
</s:Envelope>
 - result: 200
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:SetAVTransportURIResponse xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"></u:SetAVTransportURIResponse></s:Body></s:Envelope>
08-03 21:25:37 requests.packages.urllib3.connectionpool       INFO     Starting new HTTP connection (1): 192.168.1.60
08-03 21:25:37 requests.packages.urllib3.connectionpool       DEBUG    "POST /MediaRenderer/AVTransport/control HTTP/1.1" 200 None
08-03 21:25:37 pulseaudio_dlna.plugins.upnp.renderer          DEBUG    sending PLAY to http://192.168.1.60:55178/MediaRenderer/AVTransport/control:
 - headers:
{u'SOAPAction': u'"urn:schemas-upnp-org:service:AVTransport:1#Play"', u'Content-Type': u'text/xml; charset="utf-8"'}
 - data:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body>
        <u:Play xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
            <InstanceID>0</InstanceID>
            <Speed>1</Speed>
        </u:Play>
    </s:Body>
</s:Envelope>
 - result: 200
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:PlayResponse xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"></u:PlayResponse></s:Body></s:Envelope>
08-03 21:25:37 pulseaudio_dlna.pulseaudio                     INFO     The device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" is playing.

The device was successfully instructed to play. Registration and playing command send and accepted. We should get a request from your device.

08-03 21:25:37 pulseaudio_dlna.streamserver                   DEBUG    Got the following GET request:
[
  [
    "icy-metadata", 
    "1"
  ], 
  [
    "host", 
    "192.168.1.41:8080"
  ], 
  [
    "range", 
    "bytes=0-"
  ], 
  [
    "connection", 
    "close"
  ], 
  [
    "user-agent", 
    "Linn DS"
  ]
]
08-03 21:25:37 pulseaudio_dlna.streamserver                   INFO     Requested streaming URL was: /wohnzimmermajikdsmmediarenderer_dlna.flac (HTTP/1.1)
08-03 21:25:37 pulseaudio_dlna.streamserver                   INFO     Got request from majikdsm.hirmke.de - GET /wohnzimmermajikdsmmediarenderer_dlna.flac HTTP/1.1,200,-

And we got it. This time a correct URL is requested. Indicated through the .flac suffix, we can be sure this is a 0.4 series request.

08-03 21:25:38 pulseaudio_dlna.streamserver                   DEBUG    Sending header:
{
  "transferMode.dlna.org": "Streaming", 
  "Connection": "close", 
  "Content-Type": "audio/flac", 
  "Ext": "", 
  "contentFeatures.dlna.org": "DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000"
}
08-03 21:25:38 pulseaudio_dlna.streamserver                   INFO     Client 192.168.1.60 registered to stream /wohnzimmermajikdsmmediarenderer_dlna.flac.
08-03 21:25:38 pulseaudio_dlna.streamserver                   DEBUG    Starting processes "parec --format=s16le -d wohnzimmermajikdsmmediarenderer_dlna.monitor | flac - -c --channels 2 --bps 16 --sample-rate 44100 --endian little --sign signed -s"
08-03 21:25:38 pulseaudio_dlna.streamserver                   INFO     Processes of /wohnzimmermajikdsmmediarenderer_dlna.flac initialized ...

We respond and start the encoder. Life is good.

08-03 21:35:38 pulseaudio_dlna.pulseaudio                     INFO     on_playback_stream_removed "/org/pulseaudio/core1/playback_stream39"
08-03 21:35:38 pulseaudio_dlna.pulseaudio                     INFO     --- call_handle_sink_update /org/pulseaudio/core1/sink6
08-03 21:35:38 pulseaudio_dlna.pulseaudio                     INFO     on_new_playback_stream "/org/pulseaudio/core1/playback_stream40"
08-03 21:35:38 pulseaudio_dlna.pulseaudio                     INFO     --- call_handle_sink_update /org/pulseaudio/core1/sink6
08-03 21:35:38 pulseaudio_dlna.pulseaudio                     INFO     on_playback_stream_removed "/org/pulseaudio/core1/playback_stream40"
08-03 21:35:38 pulseaudio_dlna.pulseaudio                     INFO     --- call_handle_sink_update /org/pulseaudio/core1/sink6
08-03 21:35:38 pulseaudio_dlna.pulseaudio                     INFO     on_new_playback_stream "/org/pulseaudio/core1/playback_stream41"
08-03 21:35:38 pulseaudio_dlna.pulseaudio                     INFO     --- call_handle_sink_update /org/pulseaudio/core1/sink6
08-03 21:35:39 pulseaudio_dlna.pulseaudio                     INFO     --- _handle_sink_update /org/pulseaudio/core1/sink6

Some stream adding and removings, but the patch seems to work fine. Although there are several changes to the streams, just one _handle_sink_update is fired. No action was induced. That's how it should be.

08-03 22:01:47 pulseaudio_dlna.pulseaudio                     INFO     on_playback_stream_removed "/org/pulseaudio/core1/playback_stream41"
08-03 22:01:47 pulseaudio_dlna.pulseaudio                     INFO     --- call_handle_sink_update /org/pulseaudio/core1/sink6
08-03 22:01:47 pulseaudio_dlna.pulseaudio                     INFO     on_new_playback_stream "/org/pulseaudio/core1/playback_stream42"
08-03 22:01:47 pulseaudio_dlna.pulseaudio                     INFO     --- call_handle_sink_update /org/pulseaudio/core1/sink6
08-03 22:01:47 pulseaudio_dlna.pulseaudio                     INFO     on_playback_stream_removed "/org/pulseaudio/core1/playback_stream42"
08-03 22:01:47 pulseaudio_dlna.pulseaudio                     INFO     --- call_handle_sink_update /org/pulseaudio/core1/sink6
08-03 22:01:47 pulseaudio_dlna.pulseaudio                     INFO     on_new_playback_stream "/org/pulseaudio/core1/playback_stream43"
08-03 22:01:47 pulseaudio_dlna.pulseaudio                     INFO     --- call_handle_sink_update /org/pulseaudio/core1/sink6
08-03 22:01:47 pulseaudio_dlna.pulseaudio                     INFO     --- _handle_sink_update /org/pulseaudio/core1/sink6
08-03 22:21:03 pulseaudio_dlna.pulseaudio                     INFO     on_playback_stream_removed "/org/pulseaudio/core1/playback_stream43"
08-03 22:21:03 pulseaudio_dlna.pulseaudio                     INFO     --- call_handle_sink_update /org/pulseaudio/core1/sink6
08-03 22:21:03 pulseaudio_dlna.pulseaudio                     INFO     on_new_playback_stream "/org/pulseaudio/core1/playback_stream44"
08-03 22:21:03 pulseaudio_dlna.pulseaudio                     INFO     --- call_handle_sink_update /org/pulseaudio/core1/sink6
08-03 22:21:03 pulseaudio_dlna.pulseaudio                     INFO     on_playback_stream_removed "/org/pulseaudio/core1/playback_stream44"
08-03 22:21:03 pulseaudio_dlna.pulseaudio                     INFO     --- call_handle_sink_update /org/pulseaudio/core1/sink6
08-03 22:21:03 pulseaudio_dlna.pulseaudio                     INFO     on_new_playback_stream "/org/pulseaudio/core1/playback_stream45"
08-03 22:21:03 pulseaudio_dlna.pulseaudio                     INFO     --- call_handle_sink_update /org/pulseaudio/core1/sink6
08-03 22:21:04 pulseaudio_dlna.pulseaudio                     INFO     --- _handle_sink_update /org/pulseaudio/core1/sink6

More additional adding and removing, but the patch is still working fine. No action was induced.

08-03 22:24:53 pulseaudio_dlna.streamserver                   INFO     Client 192.168.1.60 unregistered stream /wohnzimmermajikdsmmediarenderer_dlna.flac using method 3.
08-03 22:24:54 pulseaudio_dlna.streamserver                   DEBUG    Socket died, releasing request thread.
08-03 22:24:55 pulseaudio_dlna.streamserver                   INFO     Stream closed. Cleaning up remaining processes ...
08-03 22:24:55 pulseaudio_dlna.streamserver                   INFO     Device "Wohnzimmer:Majik DSM:MediaRenderer" disconnected.

The device disconnected. Method 3 means that pulseaudio-dlna failed to READ from the socket. There was no error with WRITING to it. Looks like a bug to me, I have a patch for that.

The rest looks like it is working as intended.

I have modified 2 files. Replace /usr/lib/python2.7/dist-packages/pulseaudio_dlna/pulseaudio.py with that one and replace /usr/lib/python2.7/dist-packages/pulseaudio_dlna/streamserver.py with that one.

Then try again and please paste a new log for that.

I expect that the Majik now plays forever. But i guess i need your assistance for the issue with the misterious request.

nobanzai commented 8 years ago

With "misterious request" you mean the 0.3.x url you mentioned above? I suspect it lives somewhere in my client pulseaudio config. I'll try to get rid of the complete config before using your new files. And thx for your patience!

nobanzai commented 8 years ago

I deleted the .config/pulse directory and the mysterious URL doesn't reappear. The first time, I started padlna, I got the following behaviour.

nobanzai commented 8 years ago

Happend again - sound just vanished without switching the sink. See log at http://pastebin.com/fkik5NAt.

masmu commented 8 years ago

Currently i am a bit in a hurry. Could you do one more test with the --disable-switchback option and paste another log? So i can take a look at them tomorrow.

Btw: In log 4 there is no disconnect event. The device did not disconnect and no action at all was performed by pulseaudio-dlna. Looks great to be honest! So i cannot understand why the device vanished. For log 3 i need a bit more time.

nobanzai commented 8 years ago

No worries - I always can use version 0.3.5 as a fallback :) And yes, I will test it with --disable-fallback. But for the moment I can tell you, that in two hours it happened only two times that the sound vanished. In both cases there was no sink switch - just the sound went away.

masmu commented 8 years ago
nobanzai commented 8 years ago

Thx for the new version. I start testing it now.

nobanzai commented 8 years ago

After abot 20 minutes sound stopped and didn't come back until I restarted padlna. See http://pastebin.com/75TG0KaK I'll try it a second time without --disable-fallback, after that with --disable-fallback.

masmu commented 8 years ago
python pulseaudio-dlna --debug --encoder=flac '--filter-device=Wohnzimmer:Majik DSM:MediaRenderer'
08-07 22:07:02 pulseaudio_dlna.application                    INFO     Using localhost: 192.168.1.41:8080
08-07 22:07:02 pulseaudio_dlna.application                    INFO     Loaded encoders:
08-07 22:07:02 pulseaudio_dlna.application                    INFO     <FlacEncoder bit-rate="None" state="True" enabled="True" mime-types="audio/flac,audio/x-flac">
08-07 22:07:04 requests.packages.urllib3.connectionpool       INFO     Starting new HTTP connection (1): 192.168.1.60
08-07 22:07:04 requests.packages.urllib3.connectionpool       DEBUG    "GET /MediaRenderer/device.xml HTTP/1.1" 200 2015
08-07 22:07:04 pulseaudio_dlna.plugins.upnp.renderer          DEBUG    Response from UPNP device (http://192.168.1.60:55178/MediaRenderer/device.xml)
<?xml version="1.0" encoding="utf-8"?><root xmlns="urn:schemas-upnp-org:device-1-0"><specVersion><major>1</major><minor>0</minor></specVersion><URLBase>http://192.168.1.60:55178/</URLBase><device><deviceType>urn:schemas-upnp-org:device:MediaRenderer:1</deviceType><presentationURL>http://192.168.1.60/index.html</presentationURL><friendlyName>Wohnzimmer:Majik DSM:MediaRenderer</friendlyName><manufacturer>Linn Products Ltd</manufacturer><manufacturerURL>http://www.linn.co.uk</manufacturerURL><modelDescription>Linn High Fidelity System Component</modelDescription><modelName>Majik DSM</modelName><modelNumber></modelNumber><modelURL>http://docs.linn.co.uk/wiki/index.php/Majik_DSM</modelURL><serialNumber>01344360</serialNumber><UDN>uuid:4c494e4e-0026-0f21-de7a-013443600171</UDN><UPC></UPC><serviceList><service><serviceType>urn:schemas-upnp-org:service:AVTransport:1</serviceType><serviceId>urn:upnp-org:serviceId:AVTransport</serviceId><SCPDURL>/MediaRenderer/AVTransport/service.xml</SCPDURL><controlURL>/MediaRenderer/AVTransport/control</controlURL><eventSubURL>/MediaRenderer/AVTransport/event</eventSubURL></service><service><serviceType>urn:schemas-upnp-org:service:RenderingControl:1</serviceType><serviceId>urn:upnp-org:serviceId:RenderingControl</serviceId><SCPDURL>/MediaRenderer/RenderingControl/service.xml</SCPDURL><controlURL>/MediaRenderer/RenderingControl/control</controlURL><eventSubURL>/MediaRenderer/RenderingControl/event</eventSubURL></service><service><serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType><serviceId>urn:upnp-org:serviceId:ConnectionManager</serviceId><SCPDURL>/MediaRenderer/ConnectionManager/service.xml</SCPDURL><controlURL>/MediaRenderer/ConnectionManager/control</controlURL><eventSubURL>/MediaRenderer/ConnectionManager/event</eventSubURL></service></serviceList><iconList><icon><mimetype>image/png</mimetype><width>120</width><height>50</height><depth>32</depth><url>http://192.168.1.60/images/Icon.png</url></icon></iconList></device></root>
08-07 22:07:04 requests.packages.urllib3.connectionpool       INFO     Starting new HTTP connection (1): 192.168.1.60
08-07 22:07:04 requests.packages.urllib3.connectionpool       DEBUG    "POST /MediaRenderer/ConnectionManager/control HTTP/1.1" 200 None
08-07 22:07:04 pulseaudio_dlna.plugins.upnp.renderer          DEBUG    sending GET_PROTOCOL_INFO to http://192.168.1.60:55178/MediaRenderer/ConnectionManager/control:
 - headers:
{u'SOAPAction': u'"urn:schemas-upnp-org:service:ConnectionManager:1#GetProtocolInfo"', u'Content-Type': u'text/xml; charset="utf-8"'}
 - data:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body>
        <u:GetProtocolInfo xmlns:u="urn:schemas-upnp-org:service:ConnectionManager:1">
        </u:GetProtocolInfo>
    </s:Body>
</s:Envelope>
 - result: 200
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetProtocolInfoResponse xmlns:u="urn:schemas-upnp-org:service:ConnectionManager:1"><Source></Source><Sink>http-get:*:audio/x-flac:*,http-get:*:audio/wav:*,http-get:*:audio/wave:*,http-get:*:audio/x-wav:*,http-get:*:audio/mpeg:*,http-get:*:audio/x-mpeg:*,http-get:*:audio/mp1:*,http-get:*:audio/aiff:*,http-get:*:audio/x-aiff:*,http-get:*:audio/x-m4a:*,http-get:*:audio/x-ms-wma:*,rtsp-rtp-udp:*:audio/x-ms-wma:*,http-get:*:audio/x-scpls:*,http-get:*:audio/x-mpegurl:*,http-get:*:audio/x-ms-asf:*,http-get:*:audio/x-ms-wax:*,http-get:*:audio/x-ms-wvx:*,http-get:*:video/x-ms-asf:*,http-get:*:video/x-ms-wax:*,http-get:*:video/x-ms-wvx:*,http-get:*:text/xml:*,http-get:*:audio/aac:*,http-get:*:audio/aacp:*,http-get:*:audio/mp4:*,http-get:*:audio/ogg:*,http-get:*:audio/x-ogg:*,http-get:*:application/ogg:*,tidalhifi.com:*:*:*,qobuz.com:*:*:*</Sink></u:GetProtocolInfoResponse></s:Body></s:Envelope>
08-07 22:07:09 pulseaudio_dlna.listener                       INFO     Discovery complete.

Normal startup.

08-07 22:07:09 pulseaudio_dlna.streamserver                   DEBUG    Got the following GET request:
[
  [
    "icy-metadata", 
    "1"
  ], 
  [
    "host", 
    "192.168.1.41:8080"
  ], 
  [
    "range", 
    "bytes=0-"
  ], 
  [
    "connection", 
    "close"
  ], 
  [
    "user-agent", 
    "Linn DS"
  ]
]
08-07 22:07:09 pulseaudio_dlna.streamserver                   INFO     Requested streaming URL was: /wohnzimmermajikdsmmediarenderer_dlna.flac (HTTP/1.1)
08-07 22:07:09 pulseaudio_dlna.streamserver                   INFO     Error 404: File not found "/wohnzimmermajikdsmmediarenderer_dlna.flac"
08-07 22:07:09 pulseaudio_dlna.streamserver                   INFO     Got request from majikdsm.hirmke.de - 404,File not found: /wohnzimmermajikdsmmediarenderer_dlna.flac
08-07 22:07:09 pulseaudio_dlna.streamserver                   INFO     Got request from majikdsm.hirmke.de - GET /wohnzimmermajikdsmmediarenderer_dlna.flac HTTP/1.1,404,-

We got a request from the device. Thats odd, since we did't instructed the device to do so. I assume this is a device specific behavior. What we did before was: We just requested the device properties and some how this triggers a request from the device. Anyway ... should not hurt, everything is catched and logged.

08-07 22:07:10 pulseaudio_dlna.pulseaudio                     INFO     Added the device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)".
08-07 22:07:10 pulseaudio_dlna.pulseaudio                     INFO     on_device_updated "/org/pulseaudio/core1/sink2"
08-07 22:07:10 pulseaudio_dlna.pulseaudio                     INFO     _handle_sink_update /org/pulseaudio/core1/sink2

We found the device, it is recognized that there are streams for that sink2 (Majik) and therefore we instruct the device to play.

08-07 22:07:10 pulseaudio_dlna.pulseaudio                     INFO     Instructing the device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" to play ...
08-07 22:07:10 requests.packages.urllib3.connectionpool       INFO     Starting new HTTP connection (1): 192.168.1.60
08-07 22:07:10 requests.packages.urllib3.connectionpool       DEBUG    "POST /MediaRenderer/AVTransport/control HTTP/1.1" 200 None
08-07 22:07:10 pulseaudio_dlna.plugins.upnp.renderer          DEBUG    sending REGISTER to http://192.168.1.60:55178/MediaRenderer/AVTransport/control:
 - headers:
{u'SOAPAction': u'"urn:schemas-upnp-org:service:AVTransport:1#SetAVTransportURI"', u'Content-Type': u'text/xml; charset="utf-8"'}
 - data:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body>
        <u:SetAVTransportURI xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
            <InstanceID>0</InstanceID>
            <CurrentURI>http://192.168.1.41:8080/wohnzimmermajikdsmmediarenderer_dlna.flac</CurrentURI>
            <CurrentURIMetaData>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;DIDL-Lite xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" xmlns:sec="http://www.sec.co.kr/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/"&gt;
    &lt;item id="0" parentID="0" restricted="1"&gt;
        &lt;upnp:class&gt;object.item.audioItem.musicTrack&lt;/upnp:class&gt;
        &lt;dc:title&gt;Live Audio&lt;/dc:title&gt;
        &lt;dc:creator&gt;PulseAudio&lt;/dc:creator&gt;
        &lt;upnp:artist&gt;PulseAudio on susi&lt;/upnp:artist&gt;
        &lt;upnp:albumArtURI&gt;&lt;/upnp:albumArtURI&gt;
        &lt;upnp:album&gt;Stream&lt;/upnp:album&gt;
        &lt;res protocolInfo="http-get:*:audio/flac:DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000"&gt;http://192.168.1.41:8080/wohnzimmermajikdsmmediarenderer_dlna.flac&lt;/res&gt;
    &lt;/item&gt;
&lt;/DIDL-Lite&gt;
</CurrentURIMetaData>
        </u:SetAVTransportURI>
    </s:Body>
</s:Envelope>
 - result: 200
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:SetAVTransportURIResponse xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"></u:SetAVTransportURIResponse></s:Body></s:Envelope>
08-07 22:07:10 requests.packages.urllib3.connectionpool       INFO     Starting new HTTP connection (1): 192.168.1.60
08-07 22:07:10 requests.packages.urllib3.connectionpool       DEBUG    "POST /MediaRenderer/AVTransport/control HTTP/1.1" 200 None
08-07 22:07:10 pulseaudio_dlna.plugins.upnp.renderer          DEBUG    sending PLAY to http://192.168.1.60:55178/MediaRenderer/AVTransport/control:
 - headers:
{u'SOAPAction': u'"urn:schemas-upnp-org:service:AVTransport:1#Play"', u'Content-Type': u'text/xml; charset="utf-8"'}
 - data:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body>
        <u:Play xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
            <InstanceID>0</InstanceID>
            <Speed>1</Speed>
        </u:Play>
    </s:Body>
</s:Envelope>
 - result: 200
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:PlayResponse xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"></u:PlayResponse></s:Body></s:Envelope>
08-07 22:07:10 pulseaudio_dlna.pulseaudio                     INFO     The device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" is playing.

We should get a request now ...

08-07 22:07:10 pulseaudio_dlna.streamserver                   DEBUG    Got the following GET request:
[
  [
    "icy-metadata", 
    "1"
  ], 
  [
    "host", 
    "192.168.1.41:8080"
  ], 
  [
    "range", 
    "bytes=0-"
  ], 
  [
    "connection", 
    "close"
  ], 
  [
    "user-agent", 
    "Linn DS"
  ]
]
08-07 22:07:10 pulseaudio_dlna.streamserver                   INFO     Requested streaming URL was: /wohnzimmermajikdsmmediarenderer_dlna.flac (HTTP/1.1)

... here it is ...

08-07 22:07:10 pulseaudio_dlna.streamserver                   INFO     Got request from majikdsm.hirmke.de - GET /wohnzimmermajikdsmmediarenderer_dlna.flac HTTP/1.1,200,-
08-07 22:07:10 pulseaudio_dlna.streamserver                   DEBUG    Sending header:
{
  "transferMode.dlna.org": "Streaming", 
  "Connection": "close", 
  "Content-Type": "audio/flac", 
  "Ext": "", 
  "contentFeatures.dlna.org": "DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000"
}
08-07 22:07:10 pulseaudio_dlna.streamserver                   INFO     Client 192.168.1.60 registered to stream /wohnzimmermajikdsmmediarenderer_dlna.flac.
08-07 22:07:10 pulseaudio_dlna.streamserver                   DEBUG    Starting processes "parec --format=s16le -d wohnzimmermajikdsmmediarenderer_dlna.monitor | flac - -c --channels 2 --bps 16 --sample-rate 44100 --endian little --sign signed -s"
08-07 22:07:10 pulseaudio_dlna.streamserver                   INFO     Processes of /wohnzimmermajikdsmmediarenderer_dlna.flac initialized ...

So, at 22:07:10 (+ a little bit of delay) your device should really start to play.

08-07 22:16:49 pulseaudio_dlna.pulseaudio                     INFO     on_playback_stream_removed "/org/pulseaudio/core1/playback_stream2"
08-07 22:16:50 pulseaudio_dlna.pulseaudio                     INFO     on_new_playback_stream "/org/pulseaudio/core1/playback_stream3"
08-07 22:16:50 pulseaudio_dlna.pulseaudio                     INFO     on_playback_stream_removed "/org/pulseaudio/core1/playback_stream3"
08-07 22:16:50 pulseaudio_dlna.pulseaudio                     INFO     on_new_playback_stream "/org/pulseaudio/core1/playback_stream4"
08-07 22:16:50 pulseaudio_dlna.pulseaudio                     INFO     _handle_sink_update /org/pulseaudio/core1/sink2
08-07 22:26:26 pulseaudio_dlna.pulseaudio                     INFO     on_playback_stream_removed "/org/pulseaudio/core1/playback_stream4"
08-07 22:26:26 pulseaudio_dlna.pulseaudio                     INFO     on_new_playback_stream "/org/pulseaudio/core1/playback_stream5"
08-07 22:26:27 pulseaudio_dlna.pulseaudio                     INFO     on_playback_stream_removed "/org/pulseaudio/core1/playback_stream5"
08-07 22:26:27 pulseaudio_dlna.pulseaudio                     INFO     on_new_playback_stream "/org/pulseaudio/core1/playback_stream6"
08-07 22:26:27 pulseaudio_dlna.pulseaudio                     INFO     _handle_sink_update /org/pulseaudio/core1/sink2

Various stream removings and re-addings ... but the fix works ...

08-07 22:29:01 pulseaudio_dlna.pulseaudio                     INFO     on_device_updated "/org/pulseaudio/core1/sink0"
08-07 22:29:01 pulseaudio_dlna.pulseaudio                     INFO     _handle_sink_update /org/pulseaudio/core1/sink0
08-07 22:29:01 pulseaudio_dlna.pulseaudio                     INFO     Instructing the device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" to stop ...

Its 22:29:01 ... so, i assume thats are the 20 minutes you were talking about. Your default sink (sink0) was updated and this triggers the device to stop. I really would like to know what you did, so that your default sink was changed. Did you set your default sink? Changing volume? There must be something you did, help me out here ;)

08-07 22:29:01 requests.packages.urllib3.connectionpool       INFO     Starting new HTTP connection (1): 192.168.1.60
08-07 22:29:01 requests.packages.urllib3.connectionpool       DEBUG    "POST /MediaRenderer/AVTransport/control HTTP/1.1" 200 None
08-07 22:29:01 pulseaudio_dlna.plugins.upnp.renderer          DEBUG    sending STOP to http://192.168.1.60:55178/MediaRenderer/AVTransport/control:
 - headers:
{u'SOAPAction': u'"urn:schemas-upnp-org:service:AVTransport:1#Stop"', u'Content-Type': u'text/xml; charset="utf-8"'}
 - data:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body>
        <u:Stop xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
            <InstanceID>0</InstanceID>
        </u:Stop>
    </s:Body>
</s:Envelope>
 - result: 200
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:StopResponse xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"></u:StopResponse></s:Body></s:Envelope>
08-07 22:29:01 pulseaudio_dlna.pulseaudio                     INFO     The device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" was stopped.

The device was stopped as instructed.

08-07 22:29:05 pulseaudio_dlna.pulseaudio                     INFO     on_device_updated "/org/pulseaudio/core1/sink2"
08-07 22:29:06 pulseaudio_dlna.pulseaudio                     INFO     _handle_sink_update /org/pulseaudio/core1/sink2

Did you switch the streams here?

08-07 22:29:06 pulseaudio_dlna.pulseaudio                     INFO     Instructing the device "Wohnzimmer:Majik DSM:MediaRenderer (DLNA)" to play ...
nobanzai commented 8 years ago

Did you set your default sink? Changing volume? There must be something you did, help me out here ;)

I didn't do anything at 22:29! Really, I swear ;) Sat there and listened to the music, which all of a sudden stopped. I even haven't been near my computer at that time.

Did you switch the streams here?

No, I stopped and restartet padlna a bit later, because with no other action I could get sound back.

I wouldn't say anything if version 0.3.x wouldn't work that perfect 8-<

masmu commented 8 years ago

I made a branch for testing purposes. The following will install a local copy of pulseaudio-dlna, which should not interfere with the packaged one.

Could you check it out and provide another debug.log?

1) Make sure you installed the dependencies (if you installed 0.4.4 you should have installed them)

Otherwise: sudo apt-get install python2.7 python-pip python-setuptools python-dbus python-beautifulsoup python-docopt python-requests python-setproctitle python-gobject python-protobuf python-notify2 python-psutil vorbis-tools sox lame flac faac opus-tools

2) Install virtualenv & python-dev

All Ubuntu versions prior to 14.10 Utopic need to install: sudo apt-get install python-virtualenv python-dev

All Ubuntu versions above install: sudo apt-get install virtualenv python-dev

3) Checkout the code, run it and write a debug.log.

git clone https://github.com/masmu/pulseaudio-dlna.git
cd pulseaudio_dlna/
git checkout bug/sound-vanishes
make
bin/pulseaudio-dlna --debug 2>&1 | tee -a debug.log

Just a note: You have to change to the project folder of that local copy and run it prefixed with bin/. Otherwise you will launch the packaged version which is installed to your system.

nobanzai commented 8 years ago

Just a hint: I don't use Ubuntu, my systems are openSuSE 13.2 and openSuSE Tumbleweed. I cloned the afore mentioned branch, installed all dependencies and built padlna. Now I'll start testing.

nobanzai commented 8 years ago

sound has stopped and I didn't get any message in the debug log. See http://pastebin.com/b6qETbV5 At 22:46 sound stopped. Pulseaudio volume control showed it still playing. I had to switch the sink manually back and forth to get sound back. And - as I said - no error message showing the real reason 8-(

masmu commented 8 years ago

Are you sure you are using the correct branch? I am missing my console logs i put into that branch, so i get a more detailed view of what is going on.

nobanzai commented 8 years ago

Uhm, I'm never sure ;) I double check it.

nobanzai commented 8 years ago

Seems to be the correct branch. From my history file: cd /usr/src/packages/BUILD mkdir pulseaudio-dlna/ cd pulseaudio-dlna/ git clone https://github.com/masmu/pulseaudio-dlna.git ls cd pulseaudio-dlna/ ls git checkout bug/sound-vanishes make <- error because of missing deps zypper in python-virtualenv zypper in python-devel make

masmu commented 8 years ago

Ok, this sounds like a build system to me i have no idea about.

Try it my way.

Make sure you have the following installed:

The following is distribution independent and works on all systems which have to needed dependencies installed.

git clone https://github.com/masmu/pulseaudio-dlna.git
cd pulseaudio_dlna/
git checkout bug/sound-vanishes
make
bin/pulseaudio-dlna --debug 2>&1 | tee -a debug.log
nobanzai commented 8 years ago

Sry, I don't understand. What is the difference between your way and what I did? I thought I did exactly what you suggested. Besides I don't have "pulseaudio_dlna/" after the git clone command, but only "pulseaudio-dlna/".

nobanzai commented 8 years ago

Uhm, did you mean the following command order?

git clone https://github.com/masmu/pulseaudio-dlna.git cd pulseaudio-dlna/ cd pulseaudio_dlna/ git checkout bug/sound-vanishes cd .. make bin/pulseaudio-dlna --debug 2>&1 | tee -a debug.log

masmu commented 8 years ago

Yes. Looks good. Sorry for missing the 2nd directory switch ...

nobanzai commented 8 years ago

Ok, did it. I will test it tomorrow. Thx for your patience!

masmu commented 8 years ago

I checked it here. I don't need the second switch. Just the commands i send you before.

You are welcome!

nobanzai commented 8 years ago

Seems I got one of your "desired" DEBUG messages - see http://pastebin.com/WUgjgjw4. Some explanation: padlna ran since yesterday 23:43 and survived a hibernate/resume cycle till 12:03 today. When playing the first song at 12:03 the sink was switched automatically to my M-Audio card. I switched it back to padlna. After that, padlna played a few songs without interruption. At 12:19 you can see a few DEBUG and ERROR messages in the log, but that didn't lead to an interruption. At 12.20 logging stopped all of a sudden, but padlna played more songs until about 12:50. At that point music stopped completely. I couldn't get it back and had to restart padlna. With that behaviour it seems to me that padlna hangs internally at some point, which leads to the situation that no sound can be heard, although Pulseaudio volume control tells me, that it is playing the song.