1
0
mirror of https://github.com/rofafor/vdr-plugin-satip.git synced 2023-10-10 13:37:42 +02:00

Changed implementation to report about RTP packet errors on 5 minutes interval only.

This commit is contained in:
Rolf Ahrenberg 2014-03-30 14:56:11 +03:00
parent 9a6ae40954
commit f493df0e3d
6 changed files with 25 additions and 8 deletions

View File

@ -25,3 +25,8 @@ VDR Plugin 'satip' Revision History
- Added support for cDevice::Ready().
- Fixed pid leaking while disabling section filters.
- Fixed keepalive heartbeat.
2014-03-30: Version 0.2.1
- Changed implementation to report about RTP packet
errors on 5 minutes interval only.

View File

@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-satip 0.2.0\n"
"Project-Id-Version: vdr-satip 0.2.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2014-03-28 03:28+0200\n"
"PO-Revision-Date: 2014-03-28 03:28+0200\n"
"POT-Creation-Date: 2014-03-30 03:30+0200\n"
"PO-Revision-Date: 2014-03-30 03:30+0200\n"
"Last-Translator: Frank Neumann <fnu@yavdr.org>\n"
"Language-Team: German <vdr@linuxtv.org>\n"
"Language: de\n"

View File

@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-satip 0.2.0\n"
"Project-Id-Version: vdr-satip 0.2.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2014-03-28 03:28+0200\n"
"PO-Revision-Date: 2014-03-28 03:28+0200\n"
"POT-Creation-Date: 2014-03-30 03:30+0200\n"
"PO-Revision-Date: 2014-03-30 03:30+0200\n"
"Last-Translator: Rolf Ahrenberg\n"
"Language-Team: Finnish <vdr@linuxtv.org>\n"
"Language: fi\n"

View File

@ -21,7 +21,7 @@
#define GITVERSION ""
#endif
const char VERSION[] = "0.2.0" GITVERSION;
const char VERSION[] = "0.2.1" GITVERSION;
static const char DESCRIPTION[] = trNOOP("SAT>IP Devices");
class cPluginSatip : public cPlugin {

View File

@ -21,6 +21,8 @@
cSatipSocket::cSatipSocket()
: socketPortM(0),
socketDescM(-1),
lastErrorReportM(0),
packetErrorsM(0),
sequenceNumberM(-1)
{
debug("cSatipSocket::%s()", __FUNCTION__);
@ -157,7 +159,12 @@ int cSatipSocket::ReadVideo(unsigned char *bufferAddrP, unsigned int bufferLenP)
if ((((sequenceNumberM + 1) % 0xFFFF) == 0) && (seq == 0xFFFF))
sequenceNumberM = -1;
else if ((sequenceNumberM >= 0) && (((sequenceNumberM + 1) % 0xFFFF) != seq)) {
error("missed %d RTP packets", seq - sequenceNumberM - 1);
packetErrorsM++;
if (time(NULL) - lastErrorReportM > eReportIntervalS) {
info("detected %d RTP packet errors", packetErrorsM);
packetErrorsM = 0;
lastErrorReportM = time(NULL);
}
sequenceNumberM = seq;
}
else

View File

@ -12,9 +12,14 @@
class cSatipSocket {
private:
enum {
eReportIntervalS = 300 // in seconds
};
int socketPortM;
int socketDescM;
struct sockaddr_in sockAddrM;
time_t lastErrorReportM;
int packetErrorsM;
int sequenceNumberM;
public: