2014-11-14 21:28:27 +01:00
|
|
|
/*
|
|
|
|
* rtp.h: SAT>IP plugin for the Video Disk Recorder
|
|
|
|
*
|
|
|
|
* See the README file for copyright information and how to reach the author.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __SATIP_RTP_H_
|
|
|
|
#define __SATIP_RTP_H_
|
|
|
|
|
|
|
|
#include "socket.h"
|
2014-11-16 14:38:23 +01:00
|
|
|
#include "tunerif.h"
|
2014-11-14 21:28:27 +01:00
|
|
|
#include "pollerif.h"
|
|
|
|
|
|
|
|
class cSatipRtp : public cSatipSocket, public cSatipPollerIf {
|
|
|
|
private:
|
2014-11-16 09:31:34 +01:00
|
|
|
enum {
|
2014-12-13 22:15:58 +01:00
|
|
|
eRtpPacketReadCount = 50,
|
|
|
|
eMaxUdpPacketSizeB = TS_SIZE * 7 + 12,
|
|
|
|
eReportIntervalS = 300 // in seconds
|
2014-11-16 09:31:34 +01:00
|
|
|
};
|
2014-11-16 16:02:30 +01:00
|
|
|
cSatipTunerIf &tunerM;
|
2014-11-14 21:28:27 +01:00
|
|
|
unsigned int bufferLenM;
|
|
|
|
unsigned char *bufferM;
|
2014-11-16 09:31:34 +01:00
|
|
|
time_t lastErrorReportM;
|
|
|
|
int packetErrorsM;
|
|
|
|
int sequenceNumberM;
|
2014-12-13 22:15:58 +01:00
|
|
|
int GetHeaderLenght(unsigned char *bufferP, unsigned int lengthP);
|
2014-11-14 21:28:27 +01:00
|
|
|
|
|
|
|
public:
|
2014-12-13 22:15:58 +01:00
|
|
|
cSatipRtp(cSatipTunerIf &tunerP);
|
2014-11-14 21:28:27 +01:00
|
|
|
virtual ~cSatipRtp();
|
2014-11-16 09:31:34 +01:00
|
|
|
virtual void Close(void);
|
2014-11-16 15:56:59 +01:00
|
|
|
|
|
|
|
// for internal poller interface
|
|
|
|
public:
|
|
|
|
virtual int GetFd(void);
|
2014-11-25 21:04:34 +01:00
|
|
|
virtual void Process(void);
|
2014-11-29 13:44:30 +01:00
|
|
|
virtual cString ToString(void) const;
|
2014-11-14 21:28:27 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __SATIP_RTP_H_ */
|