summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2017-12-07 15:05:48 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2017-12-07 15:05:48 +0100
commite757f10e440a160c9657b89b51388311d95ff123 (patch)
tree989d801547aa65b60d1c8cbf38388259d69ca96f
parentc8682653974caa80c027b097d37f74a1a84022fe (diff)
downloadvdr-e757f10e440a160c9657b89b51388311d95ff123.tar.gz
vdr-e757f10e440a160c9657b89b51388311d95ff123.tar.bz2
If TS packets are not accepted by the output device in Transfer Mode, this is now reported only once per minute in the log file
-rw-r--r--HISTORY4
-rw-r--r--transfer.c12
-rw-r--r--transfer.h4
3 files changed, 16 insertions, 4 deletions
diff --git a/HISTORY b/HISTORY
index 3dbdb129..904505c0 100644
--- a/HISTORY
+++ b/HISTORY
@@ -9162,7 +9162,7 @@ Video Disk Recorder Revision History
a subdirectory.
- SVDRP peering can now be limited to the default SVDRP host (see MANUAL for details).
-2017-12-05: Version 2.3.9
+2017-12-07: Version 2.3.9
- Updated the Italian OSD texts (thanks to Diego Pierotto).
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
@@ -9221,3 +9221,5 @@ Video Disk Recorder Revision History
(suggested by Dietmar Spingler).
- Fixed a lengthy write lock on the Recordings list in case of moving a folder with
more than one recording (thanks to Matthias Senzel).
+- If TS packets are not accepted by the output device in Transfer Mode, this is now
+ reported only once per minute in the log file.
diff --git a/transfer.c b/transfer.c
index d0e7ed46..88931e58 100644
--- a/transfer.c
+++ b/transfer.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: transfer.c 4.1 2015/09/05 11:43:58 kls Exp $
+ * $Id: transfer.c 4.2 2017/12/07 15:00:33 kls Exp $
*/
#include "transfer.h"
@@ -14,6 +14,8 @@
cTransfer::cTransfer(const cChannel *Channel)
:cReceiver(Channel, TRANSFERPRIORITY)
{
+ lastErrorReport = 0;
+ numLostPackets = 0;
patPmtGenerator.SetChannel(Channel);
}
@@ -37,6 +39,7 @@ void cTransfer::Activate(bool On)
#define MAXRETRIES 20 // max. number of retries for a single TS packet
#define RETRYWAIT 5 // time (in ms) between two retries
+#define ERRORDELTA 60 // seconds before reporting lost TS packets again
void cTransfer::Receive(const uchar *Data, int Length)
{
@@ -51,7 +54,12 @@ void cTransfer::Receive(const uchar *Data, int Length)
cCondWait::SleepMs(RETRYWAIT);
}
DeviceClear();
- esyslog("ERROR: TS packet not accepted in Transfer Mode");
+ numLostPackets++;
+ if (time(NULL) - lastErrorReport > ERRORDELTA) {
+ esyslog("ERROR: %d TS packet(s) not accepted in Transfer Mode", numLostPackets);
+ numLostPackets = 0;
+ lastErrorReport = time(NULL);
+ }
}
}
diff --git a/transfer.h b/transfer.h
index 21d9dd86..a10ed7b2 100644
--- a/transfer.h
+++ b/transfer.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: transfer.h 4.1 2015/09/05 11:43:08 kls Exp $
+ * $Id: transfer.h 4.2 2017/12/07 14:56:22 kls Exp $
*/
#ifndef __TRANSFER_H
@@ -16,6 +16,8 @@
class cTransfer : public cReceiver, public cPlayer {
private:
+ time_t lastErrorReport;
+ int numLostPackets;
cPatPmtGenerator patPmtGenerator;
protected:
virtual void Activate(bool On);