diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2003-02-16 18:00:00 +0100 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2003-02-16 18:00:00 +0100 |
commit | b6e4637356502e707fdfc4b97ed1856e08de3df1 (patch) | |
tree | d974f0cc0e63083c75e51958cf8ce0e25bd7060e /transfer.c | |
parent | b09aaa00a58ec72d0331a01f31b3df16d43ce90b (diff) | |
download | vdr-patch-lnbsharing-b6e4637356502e707fdfc4b97ed1856e08de3df1.tar.gz vdr-patch-lnbsharing-b6e4637356502e707fdfc4b97ed1856e08de3df1.tar.bz2 |
Version 1.1.25vdr-1.1.25
- Fixed high CPU load during replay (thanks to Marcel Wiesweg for pointing out this
one).
- Fixed margin handling in cRingBufferLinear.
- Now polling the output device in 'Transfer Mode' and retrying to put packets
into the ring buffer.
- Resetting the CAM slot in case communication breaks down.
- Improved keyboard detection (thanks to Werner Fink).
- Updated 'channels.conf.terr' (thanks to Andy Carter).
- Fixed broken support for raw OSDs of plugins (thanks to Marcel Wiesweg for
reporting this one).
- Broken CAM connections are now restored automatically.
Diffstat (limited to 'transfer.c')
-rw-r--r-- | transfer.c | 34 |
1 files changed, 22 insertions, 12 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: transfer.c 1.9 2003/01/26 09:59:35 kls Exp $ + * $Id: transfer.c 1.10 2003/02/15 14:12:41 kls Exp $ */ #include "transfer.h" @@ -50,9 +50,16 @@ void cTransfer::Activate(bool On) void cTransfer::Receive(uchar *Data, int Length) { if (IsAttached()) { - int p = ringBuffer->Put(Data, Length); - if (p != Length && active) - esyslog("ERROR: ring buffer overflow (%d bytes dropped)", Length - p); + int i = 0; + while (active && Length > 0) { + if (i++ > 10) { + esyslog("ERROR: ring buffer overflow (%d bytes dropped)", Length); + break; + } + int p = ringBuffer->Put(Data, Length); + Length -= p; + Data += p; + } } } @@ -90,14 +97,17 @@ void cTransfer::Action(void) if (p) { StripAudioPackets(p, Result, audioTrack); while (Result > 0 && active) { - int w = PlayVideo(p, Result); - if (w > 0) { - p += w; - Result -= w; - } - else if (w < 0 && FATALERRNO) { - LOG_ERROR; - break; + cPoller Poller; + if (DevicePoll(Poller, 100)) { + int w = PlayVideo(p, Result); + if (w > 0) { + p += w; + Result -= w; + } + else if (w < 0 && FATALERRNO) { + LOG_ERROR; + break; + } } } } |