Now calling DeviceClear() in cTransfer::Receive() if the output device blocks, instead of not retrying for 10 seconds

This commit is contained in:
Klaus Schmidinger 2013-03-01 10:02:01 +01:00
parent 5c47a0033e
commit df4e5a1072
4 changed files with 9 additions and 15 deletions

View File

@ -694,6 +694,8 @@ Oliver Endriss <o.endriss@gmx.de>
for reporting a crash in a plugin using cDeviceHook when VDR ends for reporting a crash in a plugin using cDeviceHook when VDR ends
for reporting that "include" needs to be removed from the DVBDIR setting in the VDR for reporting that "include" needs to be removed from the DVBDIR setting in the VDR
Makefile Makefile
for helping to debug a problem with reduced number of retries in Transfer Mode on
SD-FF cards
Reinhard Walter Buchner <rw.buchner@freenet.de> Reinhard Walter Buchner <rw.buchner@freenet.de>
for adding some satellites to 'sources.conf' for adding some satellites to 'sources.conf'
@ -1009,6 +1011,7 @@ Andreas Mair <amair.sob@googlemail.com>
but one of them ends in an additional digit, as in "abc" and "abc2" but one of them ends in an additional digit, as in "abc" and "abc2"
for reporting multiple occurrences of the same directory in the recordings list ini for reporting multiple occurrences of the same directory in the recordings list ini
case there are directories that only differ in non-alphanumeric characters case there are directories that only differ in non-alphanumeric characters
for reporting a problem with reduced number of retries in Transfer Mode on SD-FF cards
Olivier Jacques <jacquesolivier@hotmail.com>) Olivier Jacques <jacquesolivier@hotmail.com>)
for translating OSD texts to the French language for translating OSD texts to the French language

View File

@ -7675,3 +7675,5 @@ Video Disk Recorder Revision History
- Updated the Dutch OSD texts (thanks to Carel Willemse). - Updated the Dutch OSD texts (thanks to Carel Willemse).
- Removed all "fuzzy" translations from the files ar.po, hu_HU.po and sr_SR.po, because - Removed all "fuzzy" translations from the files ar.po, hu_HU.po and sr_SR.po, because
more often than not they are just wrong. more often than not they are just wrong.
- Now calling DeviceClear() in cTransfer::Receive() if the output device blocks, instead
of not retrying for 10 seconds (reported by Andreas Mair, with help from Oliver Endriss).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: transfer.c 2.7 2013/01/20 13:40:30 kls Exp $ * $Id: transfer.c 2.8 2013/03/01 09:50:15 kls Exp $
*/ */
#include "transfer.h" #include "transfer.h"
@ -15,7 +15,6 @@ cTransfer::cTransfer(const cChannel *Channel)
:cReceiver(Channel, TRANSFERPRIORITY) :cReceiver(Channel, TRANSFERPRIORITY)
{ {
patPmtGenerator.SetChannel(Channel); patPmtGenerator.SetChannel(Channel);
retriesExceeded = false;
} }
cTransfer::~cTransfer() cTransfer::~cTransfer()
@ -38,7 +37,6 @@ void cTransfer::Activate(bool On)
#define MAXRETRIES 5 // max. number of retries for a single TS packet #define MAXRETRIES 5 // max. number of retries for a single TS packet
#define RETRYWAIT 5 // time (in ms) between two retries #define RETRYWAIT 5 // time (in ms) between two retries
#define RETRYPAUSE 10000 // time (in ms) for which to pause retrying once a packet has not been accepted
void cTransfer::Receive(uchar *Data, int Length) void cTransfer::Receive(uchar *Data, int Length)
{ {
@ -48,17 +46,11 @@ void cTransfer::Receive(uchar *Data, int Length)
// now and then there may be conditions where the packet just can't be // now and then there may be conditions where the packet just can't be
// handled when offered the first time, so that's why we try several times: // handled when offered the first time, so that's why we try several times:
for (int i = 0; i < MAXRETRIES; i++) { for (int i = 0; i < MAXRETRIES; i++) {
if (PlayTs(Data, Length) > 0) { if (PlayTs(Data, Length) > 0)
if (retriesExceeded && timer.TimedOut())
retriesExceeded = false;
return;
}
if (retriesExceeded) // no retries once a packet has not been accepted
return; return;
cCondWait::SleepMs(RETRYWAIT); cCondWait::SleepMs(RETRYWAIT);
} }
retriesExceeded = true; DeviceClear();
timer.Set(RETRYPAUSE); // wait a while before retrying
esyslog("ERROR: TS packet not accepted in Transfer Mode"); esyslog("ERROR: TS packet not accepted in Transfer Mode");
} }
} }

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: transfer.h 2.3 2013/01/20 13:12:38 kls Exp $ * $Id: transfer.h 2.4 2013/03/01 09:49:46 kls Exp $
*/ */
#ifndef __TRANSFER_H #ifndef __TRANSFER_H
@ -13,13 +13,10 @@
#include "player.h" #include "player.h"
#include "receiver.h" #include "receiver.h"
#include "remux.h" #include "remux.h"
#include "tools.h"
class cTransfer : public cReceiver, public cPlayer { class cTransfer : public cReceiver, public cPlayer {
private: private:
cPatPmtGenerator patPmtGenerator; cPatPmtGenerator patPmtGenerator;
bool retriesExceeded;
cTimeMs timer;
protected: protected:
virtual void Activate(bool On); virtual void Activate(bool On);
virtual void Receive(uchar *Data, int Length); virtual void Receive(uchar *Data, int Length);