1
0
mirror of https://github.com/rofafor/vdr-plugin-iptv.git synced 2023-10-10 13:37:03 +02:00
vdr-plugin-iptv/sectionfilter.h

63 lines
1.4 KiB
C
Raw Normal View History

/*
* sectionfilter.h: IPTV plugin for the Video Disk Recorder
*
* See the README file for copyright information and how to reach the author.
*
*/
#ifndef __IPTV_SECTIONFILTER_H
#define __IPTV_SECTIONFILTER_H
2009-02-27 15:05:19 +01:00
#include <vdr/device.h>
#include "common.h"
2007-10-05 21:00:44 +02:00
#include "statistics.h"
2007-10-05 21:00:44 +02:00
class cIptvSectionFilter : public cIptvSectionStatistics {
private:
enum dmx_limits {
DMX_MAX_FILTER_SIZE = 18,
DMX_MAX_SECTION_SIZE = 4096,
2009-02-27 15:05:19 +01:00
DMX_MAX_SECFEED_SIZE = (DMX_MAX_SECTION_SIZE + TS_SIZE)
};
2007-09-24 19:20:58 +02:00
int pusi_seen;
int feedcc;
int doneq;
uint8_t *secbuf;
uint8_t secbuf_base[DMX_MAX_SECFEED_SIZE];
uint16_t secbufp;
uint16_t seclen;
uint16_t tsfeedp;
uint16_t pid;
2009-02-27 15:05:19 +01:00
int devid;
2007-09-24 19:20:58 +02:00
int id;
int socket[2];
2007-09-24 19:20:58 +02:00
uint8_t filter_value[DMX_MAX_FILTER_SIZE];
uint8_t filter_mask[DMX_MAX_FILTER_SIZE];
uint8_t filter_mode[DMX_MAX_FILTER_SIZE];
2009-02-27 15:05:19 +01:00
2007-09-24 19:20:58 +02:00
uint8_t maskandmode[DMX_MAX_FILTER_SIZE];
uint8_t maskandnotmode[DMX_MAX_FILTER_SIZE];
2009-02-27 15:05:19 +01:00
inline uint16_t GetLength(const uint8_t *Data);
void New(void);
int Filter(void);
inline int Feed(void);
int CopyDump(const uint8_t *buf, uint8_t len);
public:
2007-09-24 19:20:58 +02:00
// constructor & destructor
2009-06-19 12:28:53 +02:00
cIptvSectionFilter(int Index, int DeviceIndex, uint16_t Pid,
uint8_t Tid, uint8_t Mask);
2007-09-24 19:20:58 +02:00
virtual ~cIptvSectionFilter();
2009-02-27 15:05:19 +01:00
void Process(const uint8_t* Data);
int GetReadDesc(void);
2009-03-20 23:56:37 +01:00
uint16_t GetPid(void) const { return pid; }
};
#endif // __IPTV_SECTIONFILTER_H