mirror of
https://github.com/rofafor/vdr-plugin-satip.git
synced 2023-10-10 13:37:42 +02:00
Added logging of maximum processing time in cPoller().
This commit is contained in:
parent
e0727516ce
commit
cdb2e0e3b4
@ -92,3 +92,8 @@ void cSatipMsearch::Process(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cString cSatipMsearch::ToString(void) const
|
||||||
|
{
|
||||||
|
return "MSearch";
|
||||||
|
}
|
||||||
|
@ -32,6 +32,7 @@ public:
|
|||||||
public:
|
public:
|
||||||
virtual int GetFd(void);
|
virtual int GetFd(void);
|
||||||
virtual void Process(void);
|
virtual void Process(void);
|
||||||
|
virtual cString ToString(void) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __SATIP_MSEARCH_H_ */
|
#endif /* __SATIP_MSEARCH_H_ */
|
||||||
|
11
poller.c
11
poller.c
@ -69,6 +69,7 @@ void cSatipPoller::Action(void)
|
|||||||
{
|
{
|
||||||
debug("cSatipPoller::%s(): entering", __FUNCTION__);
|
debug("cSatipPoller::%s(): entering", __FUNCTION__);
|
||||||
struct epoll_event events[eMaxFileDescriptors];
|
struct epoll_event events[eMaxFileDescriptors];
|
||||||
|
int maxElapsed = 0;
|
||||||
// Increase priority
|
// Increase priority
|
||||||
SetPriority(-1);
|
SetPriority(-1);
|
||||||
// Do the thread loop
|
// Do the thread loop
|
||||||
@ -77,8 +78,16 @@ void cSatipPoller::Action(void)
|
|||||||
ERROR_IF_FUNC((nfds == -1), "epoll_wait() failed", break, ;);
|
ERROR_IF_FUNC((nfds == -1), "epoll_wait() failed", break, ;);
|
||||||
for (int i = 0; i < nfds; ++i) {
|
for (int i = 0; i < nfds; ++i) {
|
||||||
cSatipPollerIf* poll = reinterpret_cast<cSatipPollerIf *>(events[i].data.ptr);
|
cSatipPollerIf* poll = reinterpret_cast<cSatipPollerIf *>(events[i].data.ptr);
|
||||||
if (poll)
|
if (poll) {
|
||||||
|
int elapsed;
|
||||||
|
cTimeMs processing(0);
|
||||||
poll->Process();
|
poll->Process();
|
||||||
|
elapsed = processing.Elapsed();
|
||||||
|
if (elapsed > maxElapsed) {
|
||||||
|
maxElapsed = elapsed;
|
||||||
|
debug("cSatipPoller::%s(): Processing %s took %d ms", __FUNCTION__, *(poll->ToString()), maxElapsed);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
debug("cSatipPoller::%s(): exiting", __FUNCTION__);
|
debug("cSatipPoller::%s(): exiting", __FUNCTION__);
|
||||||
|
@ -14,6 +14,7 @@ public:
|
|||||||
virtual ~cSatipPollerIf() {}
|
virtual ~cSatipPollerIf() {}
|
||||||
virtual int GetFd(void) = 0;
|
virtual int GetFd(void) = 0;
|
||||||
virtual void Process(void) = 0;
|
virtual void Process(void) = 0;
|
||||||
|
virtual cString ToString(void) const = 0;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
cSatipPollerIf(const cSatipPollerIf&);
|
cSatipPollerIf(const cSatipPollerIf&);
|
||||||
|
5
rtcp.c
5
rtcp.c
@ -91,3 +91,8 @@ void cSatipRtcp::Process(void)
|
|||||||
error("Error %d reading from RTCP socket [device %d]", errno, tunerM.GetId());
|
error("Error %d reading from RTCP socket [device %d]", errno, tunerM.GetId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cString cSatipRtcp::ToString(void) const
|
||||||
|
{
|
||||||
|
return cString::sprintf("RTCP [device %d]", tunerM.GetId());
|
||||||
|
}
|
||||||
|
1
rtcp.h
1
rtcp.h
@ -27,6 +27,7 @@ public:
|
|||||||
public:
|
public:
|
||||||
virtual int GetFd(void);
|
virtual int GetFd(void);
|
||||||
virtual void Process(void);
|
virtual void Process(void);
|
||||||
|
virtual cString ToString(void) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __SATIP_RTCP_H_ */
|
#endif /* __SATIP_RTCP_H_ */
|
||||||
|
5
rtp.c
5
rtp.c
@ -121,3 +121,8 @@ void cSatipRtp::Process(void)
|
|||||||
error("Error %d reading from RTP socket [device %d]", errno, tunerM.GetId());
|
error("Error %d reading from RTP socket [device %d]", errno, tunerM.GetId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cString cSatipRtp::ToString(void) const
|
||||||
|
{
|
||||||
|
return cString::sprintf("RTP [device %d]", tunerM.GetId());
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user