2008-01-30 23:41:58 +01:00
|
|
|
/*
|
|
|
|
* pidscanner.h: IPTV plugin for the Video Disk Recorder
|
|
|
|
*
|
|
|
|
* See the README file for copyright information and how to reach the author.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __PIDSCANNER_H
|
|
|
|
#define __PIDSCANNER_H
|
|
|
|
|
2008-02-02 21:51:47 +01:00
|
|
|
#include <vdr/tools.h>
|
2008-01-30 23:41:58 +01:00
|
|
|
#include <vdr/channels.h>
|
|
|
|
|
2015-03-08 13:33:18 +01:00
|
|
|
#include "log.h"
|
|
|
|
|
2008-01-30 23:41:58 +01:00
|
|
|
class cPidScanner {
|
|
|
|
private:
|
2014-01-14 17:30:14 +01:00
|
|
|
enum {
|
|
|
|
PIDSCANNER_APID_COUNT = 5, /* minimum count of audio pid samples for pid detection */
|
|
|
|
PIDSCANNER_VPID_COUNT = 5, /* minimum count of video pid samples for pid detection */
|
|
|
|
PIDSCANNER_PID_DELTA_COUNT = 100, /* minimum count of pid samples for audio/video only pid detection */
|
|
|
|
PIDSCANNER_TIMEOUT_IN_MS = 15000 /* 15s timeout for detection */
|
|
|
|
};
|
2013-02-23 14:31:11 +01:00
|
|
|
cTimeMs timeoutM;
|
|
|
|
tChannelID channelIdM;
|
|
|
|
bool processM;
|
|
|
|
int vPidM;
|
|
|
|
int aPidM;
|
|
|
|
int numVpidsM;
|
|
|
|
int numApidsM;
|
2008-01-30 23:41:58 +01:00
|
|
|
|
|
|
|
public:
|
|
|
|
cPidScanner(void);
|
|
|
|
~cPidScanner();
|
2013-02-23 14:31:11 +01:00
|
|
|
void SetChannel(const tChannelID &channelIdP);
|
|
|
|
void Process(const uint8_t* bufP);
|
2015-03-08 13:33:18 +01:00
|
|
|
void Open() { debug1("%s", __PRETTY_FUNCTION__); timeoutM.Set(PIDSCANNER_TIMEOUT_IN_MS); }
|
|
|
|
void Close() { debug1("%s", __PRETTY_FUNCTION__); timeoutM.Set(0); }
|
2008-01-30 23:41:58 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __PIDSCANNER_H
|