diff options
author | Frank Schmirler <vdr@schmirler.de> | 2015-01-24 00:19:04 +0100 |
---|---|---|
committer | Frank Schmirler <vdr@schmirler.de> | 2015-01-24 00:19:04 +0100 |
commit | b33d2631df753bf4918f7967404620d5e605f967 (patch) | |
tree | 2f86dac89add017c936c2b96d2523d0c73042ead /README | |
parent | 657c8bc49c7ed331e93041064452d8f0b01206e8 (diff) | |
download | vdr-plugin-streamdev-b33d2631df753bf4918f7967404620d5e605f967.tar.gz vdr-plugin-streamdev-b33d2631df753bf4918f7967404620d5e605f967.tar.bz2 |
Fixed problems related to VTP filter streaming like ringbuffer overflows,
stuttering or aborting video stream (refs #2045)
Toerless Eckert wrote:
This patch tries to resolve problems in streamdev-client that
can occur when enabling "StreamFilters". Enabling this option
is necessary to receive certain programs with dynamic PIDs such as
some german "regional" broadcast (eg: NDR).
Problem:
Without this fix, the following behavior was observed on a Raspberry
PI running streamdev-0.6.1-git with VDR-2.6.1:
- Buffer overflows of filter data
- Stop/go video on channels
- Total stopping of video
More logs in:
http://www.vdr-portal.de/board16-video-disk-recorder/board55-vdr-plugins/125237-
streamdev-client-filter-daten-streamen-ndr-raspberry-haengt/
Analysis:
VDR expect section data from filters separately from the
main program stream. Historically, it received each filter data
via a separate file descriptor from the DVB card. In the streamdev-client
module, a socketpair is used to feed filter data to the main VDR code.
During certain operations in VDR, such as startup or channel change
(depending also on the speed of initialization of the video output driver),
VDR does not consume the filter data as fast as it is provided by
streamdev-client, resulting in overflow of the default socket buffers
used by streamdev-client.
To add to the problem of overflowing the socketpair buffers, the
streamdev-client code sends several times a second short packets into
the socketpair to determine if the receiving side (VDR) has closed
the socketpair (IsClosed(), CarbageCollect()). This further clogs
up the socketpair() buffer.
The raspberry PI socketpair buffering behavior seems to be the same
as that of other 3.x linux systems, the socket buffer size is by
default 163840, and it can be increased via sysctl net.core.wmem_max.
During startup, it can take up to 10 seconds before VDR will consume
filter data, so the socketpair buffer can fill up with 10 seconds worth
of data.
Solution
1. IsClosed()/CarbageCollect() where removed from client/filter.c
and replaced by explicitly tracking when VDR closes a filter socket.
This alone seems to already resolve the problem of hanging or stop&go
video and seems to be sufficient to receive dynamic-PID channels reliably.
2. filter.c was enhanced to request a larger socket buffer size
if config option FilterSockBufSize is set.
3. If supported (if streamdev-client runs on linux), the socketpair
queue is "flushed" to reduce the amount of "random" packet drop messages
and to rather drop sequential messages.
Diffstat (limited to 'README')
-rw-r--r-- | README | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -203,7 +203,8 @@ streamdev-server's setup menu. A negative priority gives precedence to local live TV on the server. Zero and positive values give precedence to the client. The priority for VDR clients watching live TV is configured in the plugin setup -of streamdev-client. For other client tasks (e.g. recording a client side timer)the same priority as on the client is used. With the parameter "Legacy client +of streamdev-client. For other client tasks (e.g. recording a client side timer) +the same priority as on the client is used. With the parameter "Legacy client Priority" in streamdev-server's setup menu you can configure the priority for clients which cannot be configured to use negative priorities. It is used when an old client is detected an it requests priority "0". @@ -416,6 +417,24 @@ With "Filter Streaming" enabled, the client will receive meta information like EPG data and service information, just as if the client had its own DVB card. Link channels and even a client-side EPG scan have been reported to work. +If you have TV programs with dynamically changing PIDs (such as some german +regional programs like NDR), then you need to enable "Filter Streaming" to +correctly receive them. You also need to set in VDRs DVB setup the option +"Update channels" to at least "PIDs only" (or "names and PIDs") for this +to work. + +"Filter streaming" uses internally a socketpair(2) to copy meta data to +VDR. This socketpair may require larger than default buffering. If +you see a mesage like the following in syslog, + + cStreamdevFilter::PutSection(Pid:18 Tid: 64): Dropped 2995 bytes, max queue: 328640 + +then you should increase the streamdev client "FilterSockBufSize" value. A +good value is 3072000. You will need to first configure your linux to +permit such a large buffer size: + + sysctl net.core.wmem_max=3072000 + The precedence among multiple client VDRs receiving live TV from the same server is controlled with "Live TV Priority". |