1
0
mirror of https://github.com/rofafor/vdr-plugin-satip.git synced 2023-10-10 13:37:42 +02:00
vdr-plugin-satip/data.h
nafets227 fbf43d4d49 Simplified RTP timeout handling
(Replay of Subversion #53)
2014-11-09 22:24:22 +01:00

57 lines
1.2 KiB
C++

/*
* tuner.h: SAT>IP plugin for the Video Disk Recorder
*
* See the README file for copyright information and how to reach the author.
*
*/
#ifndef __SATIP_DATA_H
#define __SATIP_DATA_H
#include <curl/curl.h>
#include <curl/easy.h>
#ifndef CURLOPT_RTSPHEADER
#error "libcurl is missing required RTSP support"
#endif
#include <vdr/thread.h>
#include <vdr/tools.h>
#include "deviceif.h"
#include "statistics.h"
#include "socket.h"
class cSatipTunerDataThread: public cThread {
public:
typedef void (*fCallback)(void *parm);
cSatipTunerDataThread(cSatipDeviceIf &deviceP, cSatipTunerStatistics &statisticsP, unsigned int packetLenP);
~cSatipTunerDataThread(void);
void Start(cSatipSocket *rtpSocketP);
// returns number of milliseconds since last time we received Data
int LastReceivedMs();
void ResetLastReceivedMs();
void Cancel(int WaitSeconds = 0);
void Flush();
protected:
void Action(void);
private:
cSatipTunerDataThread(cSatipTunerDataThread &toCopy); // Prohibit copying
cSatipDeviceIf *deviceM;
cSatipTunerStatistics *statisticsM;
unsigned int packetBufferLenM;
unsigned char *packetBufferM;
cSatipSocket *rtpSocketM;
cTimeMs timeDataReceivedM;
cCondWait sleepM;
cMutex mutexM;
};
#endif // __SATIP_DATA_H