Commit Graph

45 Commits

Author SHA1 Message Date
Frank Schmirler b33d2631df 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.
2015-01-24 00:19:04 +01:00
Frank Schmirler 7b17f7725c Implemented GetCurrentlyTunedTransponder() on client (closes #2010) 2014-11-20 14:21:44 +01:00
Frank Schmirler 458a21a62a Fixed channel switch issues with priority > 0 2013-10-30 21:18:56 +01:00
Frank Schmirler a9c2adb565 Fixed priority handling, messed up when adding multi-device support 2013-10-19 01:22:45 +02:00
Frank Schmirler 525edc1ccf Implemented multi-device support for streamdev client (closes #1207) 2013-01-29 00:02:17 +01:00
Frank Schmirler 281105f0c7 Fixed compiler error in client/device.c with VDR < 1.7.22 (reported by Uwe@vdrportal) 2012-06-22 08:54:47 +02:00
Frank Schmirler 5cfa16c402 Added DeviceName() and DeviceType() to client device. The server IP and the
number of the device used on the server are returned respectively.
2012-06-07 19:23:14 +02:00
Frank Schmirler 744dc6792c Reimplemented some client device methods 2012-05-29 01:25:47 +02:00
Frank Schmirler 16f8c75918 Dropped m_UpdatePriority 2012-05-27 01:31:45 +02:00
Frank Schmirler fffd5aef4f Proper fix for "client sends ABRT after TUNE". Obsoletes many hacks in client 2012-05-21 00:42:08 +02:00
Frank Schmirler 2e8aefd2fe Added streamdev-client support for upcoming streamdev-server versions
with purely priority driven precedence.
2012-04-21 22:28:58 +02:00
Frank Schmirler a63f7247cb With VDR 1.7.25 priorities down to -99 will be used 2012-03-04 01:20:57 +01:00
Frank Schmirler 26af4459d8 Use the new streamdev-client setup option "Live TV Priority" to control
precedence among multiple clients. The VDR option "Primary Limit" which
has previouly been used for this purpose has been dropped in VDR 1.7.25.
2012-03-04 01:15:40 +01:00
Frank Schmirler ba7c61fb39 Support for non-cycle-free setups (e.g. where two VDRs mutually share
their DVB cards through streamdev-client/-server).
Must be enabled in streamdev-server setup. Obsoletes recursion patches.
2011-12-11 17:03:09 +01:00
Frank Schmirler 3440072e7e API change of VDR 1.7.22 2011-12-09 09:05:09 +01:00
Frank Schmirler 2c8377d42a added support for VDR 1.7.19 SignalStrength/SignalQuality 2011-07-06 09:13:50 +02:00
Frank Schmirler 2cb0ba6cf1 Dropped compatibility with VDR < 1.5.16 2011-03-07 22:05:36 +01:00
Frank Schmirler dc41eecffd return value of streamdev-clients cDevice::NumProvidedSystems() now
configurable in plugin setup (fixes #552)
2011-02-16 08:57:05 +01:00
Frank Schmirler 6ea5efe939 Snapshot 2010-09-15 2011-03-22 21:16:18 +02:00
schmirl ebacf759ab dropped "Synchronize EPG" feature
Modified Files:
	HISTORY README streamdev-client.c streamdev-client.h
	client/device.c client/setup.c client/setup.h client/socket.c
	client/socket.h po/de_DE.po po/fi_FI.po po/fr_FR.po
	po/it_IT.po po/lt_LT.po po/ru_RU.po po/sk_SK.po
2010-06-08 05:55:16 +00:00
schmirl dd7cc838ad switching between two encrypted channels on the same transponder didn't
always work (thanks to sk8ter@vdrportal)
2010-02-17 12:39:02 +00:00
schmirl e99ea00348 fixed regression from fix for switching between encrypted channels. It was
no longer possible to receive multiple (FTA) streams from the same
transponder
2009-10-19 06:19:10 +00:00
schmirl 64ff2c08be Added missing call to StopSectionHandler().
This method was introduced in VDR 1.5.15. Its absence could cause crashes
when shutting down VDR
2009-04-06 06:48:59 +00:00
schmirl 0e0b4b587d Added min/max priority (#508)
Modified Files:
	HISTORY README client/device.c client/setup.c client/setup.h
	po/de_DE.po po/fi_FI.po po/fr_FR.po po/it_IT.po po/ru_RU.po
2009-01-29 07:48:58 +00:00
schmirl 30aa3b0610 Problem when switching between encrypted channels still exists if CA id
is set to FTA or streamdev device. Disabled transponder check.
2009-01-14 07:35:51 +00:00
schmirl 924cf6e4d0 Workaround for problem when switching from one encrypted channel to an other
Yet it's not quite clear if this is really a proper fix. There have been
contradictory reports (#476).
2008-10-02 06:56:36 +00:00
schmirl 34a62eb2ef - added gettext support (thanks to Rolf Ahrenberg)
- added vdr-1.6.0-ignore_missing_cam patch
- dropped obsolete respect_ca patch
- removed legacy code for < VDR 1.5.9 (thanks to Rolf Ahrenberg)
2008-04-08 14:18:15 +00:00
schmirl 9c60fb4e42 - changed location of streamdevhosts.conf to VDRCONFDIR/plugins/streamdev
- changed externremux.sh's default location to VDRCONFDIR/plugins/streamdev
- added sample externremux.sh from http://www.vdr-wiki.de/
- stop providing channels after client has been disabled at runtime
- added logging of the client device's card index
- changed default suspend mode to "Always suspended"
- added "Hide Mainmenu Entry" setup option on client
2008-04-07 14:50:32 +00:00
schmirl 89735cbd95 - resurrected clients "Suspend Server" menu item as its mainmenu entry
- dropped unused code for remote timers/recordings on client side
- dropped unused files client/{assembler,menu,remote}.[hc]
- dropped unused files in libdvbmpeg (reported by tobi)
2008-04-07 14:40:39 +00:00
schmirl f51d6eb2df - removed legacy code for pre VDR 1.4
- dropped patches for pre VDR 1.4
2008-04-07 14:27:27 +00:00
schmirl 46e007f456 Workaround which fixes tuning problems for VDR 1.5.x clients. These
sometimes send ABRT after TUNE. Clean solution wanted!
Thanks to alexw (#255)
2007-12-12 12:22:45 +00:00
schmirl e9bd0c96f3 Lock in ~cStreamdevDevice when shutting down (#355).
Thanks to Petri Hintukainen.
2007-07-20 06:46:47 +00:00
schmirl d93eec41f3 Fixed segfaults due to cTSBuffer disconnect detection workarounds (#260) 2007-05-07 12:18:18 +00:00
schmirl 60b89e8646 client_device-sections-socket.patch by Petri Hintukainen
- Add separate data socket for sections data
- Sections data can be received when there is no active live view
  (-> EPG scans etc. can be executed during replay etc.)
2007-04-24 11:24:38 +00:00
schmirl 0a59f04d60 client_device-disconnect_detection-fix.patch by Petri Hintukainen
- Try to detect data stream disconnections to
  avoid 100% CPU-usage in cTSBuffer::Action()
2007-04-24 10:46:21 +00:00
schmirl d5a38b3213 client_device-vdr-1.5.1-fixes.patch by Petri Hintukainen (#219)
- VDR 1.5.0 calls some device members in different order and
  streamdev can't currently handle this.
- do not trust in OpenDvr/CloseDvr, instead keep count of active PIDs,
  open data connection when it is needed and close it only when there
  are no active PIDs
  (closing data connection unsubscribes all pids at server end)
- some sanity checks on server side
Modified Files:
	client/device.c client/device.h server/connectionVTP.c
2007-04-24 10:43:40 +00:00
schmirl e55981c9e1 client_device.patch by Petri Hintukainen
- Implement virtual IsTunedToTransponder()
- Return true from Provides... functions
Modified Files:
	client/device.c client/device.h
2007-04-23 11:42:16 +00:00
schmirl e3a4418453 Compatibility for vdr < 1.3.38 (#169) 2007-01-15 12:15:12 +00:00
schmirl 06265bab7b - detach all receivers before tuning to different transponder. Otherwise ABRT will be sent after tuning, which will destroy the LiveStreamer on the server. 2006-09-14 10:43:10 +00:00
lordjaxom 30b7dfd5db - removed assembler and thus saving one ringbuffer
- fixed destruction order on channel switch (fixes one crash that happens
  occasionally when switching)
2005-04-24 16:21:59 +00:00
lordjaxom b2b925d1a9 - transfer 2005-02-08 17:22:35 +00:00
lordjaxom 916ed238bc - transfer 2005-02-08 15:21:19 +00:00
lordjaxom 948893b25e - transfer 2005-02-08 14:19:29 +00:00
lordjaxom 04a5985dcc - updated to 1.3.19 2005-01-25 14:14:43 +00:00
lordjaxom 302fa2e672 Initial revision 2004-12-30 22:43:55 +00:00