summaryrefslogtreecommitdiff
path: root/client/filter.c
AgeCommit message (Collapse)Author
2015-10-05client compatibility with VDR 2.3.1 (refs #2243)Frank Schmirler
2015-01-24doubled size of client's filter buffer (fixes #2045)Frank Schmirler
2015-01-24Fixed problems related to VTP filter streaming like ringbuffer overflows,Frank Schmirler
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.
2013-01-29Implemented multi-device support for streamdev client (closes #1207)Frank Schmirler
2009-02-13added comments to indicate that the VTP filter stream is proprietary formatschmirl
Modified Files: client/filter.c server/livefilter.c
2008-10-13Compatibility to VDR 1.7.1 (#483)schmirl
2008-04-07- removed legacy code for pre VDR 1.4schmirl
- dropped patches for pre VDR 1.4
2007-04-24client_filter-data-handling.patch by Petri Hintukainenschmirl
- regonize PUSI flag in TS packets (bullet-proof section start+end indicator) - Use own TS buffer to read directly from socket, no need for ring buffer anymore - Re-activate all active filters after re-connection to server - Simplify thread start/stop/running detection to current VDR style - Update "filter closed by VDR" detection (datagram sockets return different errno's than pipes) - Deliver data to first matching and active filter (do not drop data if first matching filter has been closed, there is quite likely new filter for it) - Add disconnect detection to avoid 100% CPU usage in cTSBuffer::Action() Modified Files: client/filter.c client/filter.h
2007-04-23client_section-pipe-carbage-collector.patch by Petri Hintukainenschmirl
- Run section filter carbage collector when adding new filter. Carbage collector closes all filters that have already been closed by local VDR section handler. (without this, closed section filters are removed only when they receive data from server. If they wont, ...). - Add locking to list handling (list is accessed from separate threads) Modified Files: client/filter.c client/filter.h
2007-04-23Fixed whitespaces. No functional changesschmirl
2007-04-23client_invalid-section-data_and_pipe-overflow.patch by Petri Hintukainenschmirl
- Reset section data unpacker only after first non-full TS packet (last TS packet of section is typically not full - Do not close filter if socket buffer is full (EAGAIN, EWOULDBLOCK) (closing results in 100% CPU usage in VDR section handler)
2007-04-23client_filter-close-fix.patch by Petri Hintukainenschmirl
- Do not close receiving side of section pipe. Ownership of handle has been transferred to VDR section handler when filter was opened. Closing handle twice results closing random file handle. If this handle is laready used by another section filter pipe (very likely), VDR section handler CPU usage will rise to 100%.
2007-04-23Fixed typosschmirl
2007-04-23client_section-filter-socket.patch by Petri Hintukainenschmirl
- Use datagram mode socket instead of pipe to feed section data to client VDR section handler -> preserve section data block boundaries
2007-04-23client_filter-visibility.patch by Petri Hintukainenschmirl
- Move cStreamdevFilter definition from filter.h to filter.c - Add IsClosed() and Reset() members to cStreamdevFilter: * IsClosed() returns true if filter was closed by VDR * Reset() discards (incomplete) queued section data Modified Files: client/filter.c client/filter.h
2005-11-06- adopted to VDR >= 1.3.36lordjaxom
2005-02-08- first adoptions (transfer-commit)lordjaxom
2004-12-30Initial revisionlordjaxom