/*
 * SI section filter to gather subtitles information. 
 * cSubFilter has been derived from VDR's cPatFilter
 *
 * $Id: subfilter.h,v 1.1 2005/02/15 10:08:00 opj Exp $
 */

#ifndef __SUBTITLES_FILTER_H
#define __SUBTITLES_FILTER_H

#include <vdr/filter.h>
#include <stdint.h>

#define MAXPMTENTRIES 64

class cSubtitleChannel;
class cSubtitlesReceiver;
class sLanguageInfo;
class cDevice;
class cSubtitlesChangedHandler;

class cSubFilter : public cFilter {
private:
  time_t lastPmtScan;
  int pmtIndex;
  int pmtPid;
  uint64_t pmtVersion[MAXPMTENTRIES];
  int numPmtEntries;

  bool PmtVersionChanged(int PmtPid, int Sid, int Version);
protected:
  virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length);
public:
  cSubFilter();
  ~cSubFilter();
  virtual void SetStatus(bool On);
  void Trigger(void);
  };
#endif // __SUBTITLES_FILTER_H
