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:
parent
9a6ae40954
commit
f493df0e3d
5
HISTORY
5
HISTORY
@ -25,3 +25,8 @@ VDR Plugin 'satip' Revision History
|
|||||||
- Added support for cDevice::Ready().
|
- Added support for cDevice::Ready().
|
||||||
- Fixed pid leaking while disabling section filters.
|
- Fixed pid leaking while disabling section filters.
|
||||||
- Fixed keepalive heartbeat.
|
- Fixed keepalive heartbeat.
|
||||||
|
|
||||||
|
2014-03-30: Version 0.2.1
|
||||||
|
|
||||||
|
- Changed implementation to report about RTP packet
|
||||||
|
errors on 5 minutes interval only.
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
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"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2014-03-28 03:28+0200\n"
|
"POT-Creation-Date: 2014-03-30 03:30+0200\n"
|
||||||
"PO-Revision-Date: 2014-03-28 03:28+0200\n"
|
"PO-Revision-Date: 2014-03-30 03:30+0200\n"
|
||||||
"Last-Translator: Frank Neumann <fnu@yavdr.org>\n"
|
"Last-Translator: Frank Neumann <fnu@yavdr.org>\n"
|
||||||
"Language-Team: German <vdr@linuxtv.org>\n"
|
"Language-Team: German <vdr@linuxtv.org>\n"
|
||||||
"Language: de\n"
|
"Language: de\n"
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
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"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2014-03-28 03:28+0200\n"
|
"POT-Creation-Date: 2014-03-30 03:30+0200\n"
|
||||||
"PO-Revision-Date: 2014-03-28 03:28+0200\n"
|
"PO-Revision-Date: 2014-03-30 03:30+0200\n"
|
||||||
"Last-Translator: Rolf Ahrenberg\n"
|
"Last-Translator: Rolf Ahrenberg\n"
|
||||||
"Language-Team: Finnish <vdr@linuxtv.org>\n"
|
"Language-Team: Finnish <vdr@linuxtv.org>\n"
|
||||||
"Language: fi\n"
|
"Language: fi\n"
|
||||||
|
2
satip.c
2
satip.c
@ -21,7 +21,7 @@
|
|||||||
#define GITVERSION ""
|
#define GITVERSION ""
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char VERSION[] = "0.2.0" GITVERSION;
|
const char VERSION[] = "0.2.1" GITVERSION;
|
||||||
static const char DESCRIPTION[] = trNOOP("SAT>IP Devices");
|
static const char DESCRIPTION[] = trNOOP("SAT>IP Devices");
|
||||||
|
|
||||||
class cPluginSatip : public cPlugin {
|
class cPluginSatip : public cPlugin {
|
||||||
|
9
socket.c
9
socket.c
@ -21,6 +21,8 @@
|
|||||||
cSatipSocket::cSatipSocket()
|
cSatipSocket::cSatipSocket()
|
||||||
: socketPortM(0),
|
: socketPortM(0),
|
||||||
socketDescM(-1),
|
socketDescM(-1),
|
||||||
|
lastErrorReportM(0),
|
||||||
|
packetErrorsM(0),
|
||||||
sequenceNumberM(-1)
|
sequenceNumberM(-1)
|
||||||
{
|
{
|
||||||
debug("cSatipSocket::%s()", __FUNCTION__);
|
debug("cSatipSocket::%s()", __FUNCTION__);
|
||||||
@ -157,7 +159,12 @@ int cSatipSocket::ReadVideo(unsigned char *bufferAddrP, unsigned int bufferLenP)
|
|||||||
if ((((sequenceNumberM + 1) % 0xFFFF) == 0) && (seq == 0xFFFF))
|
if ((((sequenceNumberM + 1) % 0xFFFF) == 0) && (seq == 0xFFFF))
|
||||||
sequenceNumberM = -1;
|
sequenceNumberM = -1;
|
||||||
else if ((sequenceNumberM >= 0) && (((sequenceNumberM + 1) % 0xFFFF) != seq)) {
|
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;
|
sequenceNumberM = seq;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
5
socket.h
5
socket.h
@ -12,9 +12,14 @@
|
|||||||
|
|
||||||
class cSatipSocket {
|
class cSatipSocket {
|
||||||
private:
|
private:
|
||||||
|
enum {
|
||||||
|
eReportIntervalS = 300 // in seconds
|
||||||
|
};
|
||||||
int socketPortM;
|
int socketPortM;
|
||||||
int socketDescM;
|
int socketDescM;
|
||||||
struct sockaddr_in sockAddrM;
|
struct sockaddr_in sockAddrM;
|
||||||
|
time_t lastErrorReportM;
|
||||||
|
int packetErrorsM;
|
||||||
int sequenceNumberM;
|
int sequenceNumberM;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user