pipelka/xbmc-addon-xvdr — Issue #39: Tuner not freed when pressing stop button during Live TV
Author: herrnst
Created: 2012-02-25 13:06:49+00:00
State: open

Hi,

I'm currently experiencing a nasty problem which appears to be caused by the XVDR XBMC-addon: After pressing the stop button while playing any arbitrary Live TV channel, there seems to be no "stop signal" being sent over to the VDR backend. The result is that the (only one) tuner card is kept busy receiving the stopped channel, and no other channel on different transponders/frequencies can be played back (message: "all receivers blocked" / "Alle Empfänger belegt"). The only way to actually use the tuner again is to restart XBMC completely. After that, any channel can be played back as usual.

Tested with these two channels at 394 and 418MHz (thus sitting on two different bouquets) (channels.conf excerpt):

Das Erste HD;ARD:418000:C0M256:C:6900:6010=27:6020=deu@3,6021=mis@3;6022=deu@106:6030;6031=deu:0:11100:41985:1051:0
ZDF HD;ZDFvision:394000:C0M256:C:6900:6110=27:6120=deu@3,6121=mis@3,6123=qaa@3;6122=deu@106:6130;6131=deu:0:11110:102:1079:0

In the syslog excerpt below, the problem can be observed as follows:

- At 13:56:02, "Das Erste HD" starts playback
- At 13:56:17, the stop button is pressed
- Starting from 13:56:23, it appears the backend still tries to send data to the client, which already stopped reception but somehow did not signal that to the backend correctly
- At 13:56:36, "ZDF HD" is selected. Interestingly, it connects with a new client ID. This then fails as all resources are still blocked by the no longer existing client ID 12.

All running software versions and "noise" below.

If you want me to test, check, or reconfigure anything, or need additional logs, please let me know!

Thanks,
Daniel

===========

Steps to reproduce:
0.) Start XBMC with working XVDR as usual, noting VDR+XVDR-plugin only has one available tuner card
1.) Start playback of any channel, preferably switch to fullscreen afterwards
2.) Press the stop button (or bring up the menu and hit the stop icon) to stop playback
3.) Browse the channel list and try to play any channel on a different frequency/transponder
4.) An info popup appears: "All receivers blocked" ("Alle Empfänger belegt")
4b.) However, playing any channel on the same transponder as the previously stopped channel works
5.) XBMC needs to be restarted, so the XVDR connection is "forced" down, thus freeing any used VDR resources. Playing any channel works afterwards

Expected:
Stopping active playback really stops reception and frees up any tuner resources on VDR, so the tuner card can be used normally afterwards.

Running software versions:
- Ubuntu Precise 12.04, 64bit
- VDR 1.7.24 (from yavdr "unstable" repository)
- Latest vdr-xvdr "c98852f" (master) as of 2012-01-31
- XBMC-PVR eden-pvr branch "beta3", "992cf35" as of 2012-02-07
- Latest xbmc-addon-xvdr "7beb24f" (master) as of 2012-02-21

===========

/var/log/syslog:

Feb 25 13:56:02 barias vdr: [1261] loading /var/lib/vdr/plugins/xvdr/allowed_hosts.conf
Feb 25 13:56:02 barias vdr: [1261] XVDR: Client with ID 13 connected: 127.0.0.1:42920
Feb 25 13:56:02 barias vdr: [23860] XVDR: Welcome client 'XBMC Media Center' with protocol version '3'
Feb 25 13:56:02 barias vdr: [23860] XVDR: Preferred language: deu,ger / type: 0
Feb 25 13:56:02 barias vdr: [23860] XVDR: --------------------------------------
Feb 25 13:56:02 barias vdr: [23860] XVDR: Channel streaming request: 1 - Das Erste HD
Feb 25 13:56:02 barias vdr: [23860] XVDR: Found available device 1
Feb 25 13:56:02 barias vdr: [23862] cLiveStreamer stream processor thread started (pid=1193, tid=23862)
Feb 25 13:56:02 barias vdr: [23860] XVDR: Successfully switched to channel 1 - Das Erste HD
Feb 25 13:56:02 barias vdr: [23863] receiver on device 1 thread started (pid=1193, tid=23863)
Feb 25 13:56:02 barias vdr: [23860] XVDR: Started streaming of channel Das Erste HD (timeout 10 seconds, priority 50)
Feb 25 13:56:02 barias vdr: [23861] XVDR: LiveQueue started
Feb 25 13:56:02 barias vdr: [23864] TS buffer on device 1 thread started (pid=1193, tid=23864)
Feb 25 13:56:02 barias vdr: [23862] XVDR: --------------------------------------
Feb 25 13:56:02 barias vdr: [23862] XVDR: NEW AUDIO INFORMATION:
Feb 25 13:56:02 barias vdr: [23862] XVDR: Channels: 2
Feb 25 13:56:02 barias vdr: [23862] XVDR: Samplerate: 48000 Hz
Feb 25 13:56:02 barias vdr: [23862] XVDR: Bitrate: 256000 bps
Feb 25 13:56:02 barias vdr: [23862] XVDR: --------------------------------------
Feb 25 13:56:02 barias vdr: [23862] XVDR: --------------------------------------
Feb 25 13:56:02 barias vdr: [23862] XVDR: NEW AUDIO INFORMATION:
Feb 25 13:56:02 barias vdr: [23862] XVDR: Channels: 2
Feb 25 13:56:02 barias vdr: [23862] XVDR: Samplerate: 48000 Hz
Feb 25 13:56:02 barias vdr: [23862] XVDR: Bitrate: 256000 bps
Feb 25 13:56:02 barias vdr: [23862] XVDR: --------------------------------------
Feb 25 13:56:02 barias vdr: [23862] XVDR: --------------------------------------
Feb 25 13:56:02 barias vdr: [23862] XVDR: NEW AUDIO INFORMATION:
Feb 25 13:56:02 barias vdr: [23862] XVDR: Channels: 6
Feb 25 13:56:02 barias vdr: [23862] XVDR: Samplerate: 48000 Hz
Feb 25 13:56:02 barias vdr: [23862] XVDR: Bitrate: 448000 bps
Feb 25 13:56:02 barias vdr: [23862] XVDR: --------------------------------------
Feb 25 13:56:02 barias vdr: [23862] XVDR: --------------------------------------
Feb 25 13:56:02 barias vdr: [23862] XVDR: NEW PICTURE INFORMATION:
Feb 25 13:56:02 barias vdr: [23862] XVDR: Picture Width: 1280
Feb 25 13:56:02 barias vdr: [23862] XVDR: Picture Height: 720
Feb 25 13:56:02 barias vdr: [23862] XVDR: Display Aspect Ratio: 1.78
Feb 25 13:56:02 barias vdr: [23862] XVDR: --------------------------------------
Feb 25 13:56:03 barias vdr: [23862] XVDR: streaming of channel started
Feb 25 13:56:17 barias vdr: [1261] XVDR: Checking for channel updates ...
Feb 25 13:56:17 barias vdr: [1261] XVDR: Client 12: 424 channels, no change
Feb 25 13:56:17 barias vdr: [1261] XVDR: Done.
Feb 25 13:56:23 barias vdr: [23862] XVDR: timeout. signal lost!
Feb 25 13:56:23 barias vdr: [23862] XVDR: signal restored
Feb 25 13:56:24 barias vdr: [23862] XVDR: --------------------------------------
Feb 25 13:56:24 barias vdr: [23862] XVDR: NEW PICTURE INFORMATION:
Feb 25 13:56:24 barias vdr: [23862] XVDR: Picture Width: 1280
Feb 25 13:56:24 barias vdr: [23862] XVDR: Picture Height: 720
Feb 25 13:56:24 barias vdr: [23862] XVDR: Display Aspect Ratio: 1.78
Feb 25 13:56:24 barias vdr: [23862] XVDR: --------------------------------------
Feb 25 13:56:33 barias vdr: [23862] XVDR: timeout. signal lost!
Feb 25 13:56:33 barias vdr: [23862] XVDR: signal restored
Feb 25 13:56:34 barias vdr: [23862] XVDR: --------------------------------------
Feb 25 13:56:34 barias vdr: [23862] XVDR: NEW PICTURE INFORMATION:
Feb 25 13:56:34 barias vdr: [23862] XVDR: Picture Width: 1280
Feb 25 13:56:34 barias vdr: [23862] XVDR: Picture Height: 720
Feb 25 13:56:34 barias vdr: [23862] XVDR: Display Aspect Ratio: 1.78
Feb 25 13:56:34 barias vdr: [23862] XVDR: --------------------------------------
Feb 25 13:56:36 barias vdr: [1261] loading /var/lib/vdr/plugins/xvdr/allowed_hosts.conf
Feb 25 13:56:36 barias vdr: [1261] XVDR: Client with ID 14 connected: 127.0.0.1:42921
Feb 25 13:56:36 barias vdr: [23907] XVDR: Welcome client 'XBMC Media Center' with protocol version '3'
Feb 25 13:56:36 barias vdr: [23907] XVDR: Preferred language: deu,ger / type: 0
Feb 25 13:56:36 barias vdr: [23907] XVDR: --------------------------------------
Feb 25 13:56:36 barias vdr: [23907] XVDR: Channel streaming request: 2 - ZDF HD
Feb 25 13:56:36 barias vdr: [23907] XVDR-Error: Can't get device for channel 2 - ZDF HD