00001 #ifndef DVBCAM_H 00002 #define DVBCAM_H 00003 00004 #include <deque> 00005 using namespace std; 00006 00007 #include <qmutex.h> 00008 00009 #include "mpegtables.h" 00010 00011 #include "dvbtypes.h" 00012 00013 class ChannelBase; 00014 class cCiHandler; 00015 typedef QMap<const ChannelBase*, ProgramMapTable*> pmt_list_t; 00016 00017 class DVBCam 00018 { 00019 public: 00020 DVBCam(int cardnum); 00021 ~DVBCam(); 00022 00023 bool Start(); 00024 bool Stop(); 00025 bool IsRunning() const { return ciThreadRunning; } 00026 void SetPMT(const ChannelBase *chan, const ProgramMapTable *pmt); 00027 void SetTimeOffset(double offset_in_seconds); 00028 00029 private: 00030 static void *CiHandlerThreadHelper(void*); 00031 void CiHandlerLoop(void); 00032 void HandleUserIO(void); 00033 void HandlePMT(void); 00034 00035 void SendPMT(const ProgramMapTable &pmt, uint cplm); 00036 00037 int cardnum; 00038 int numslots; 00039 cCiHandler *ciHandler; 00040 00041 bool exitCiThread; 00042 bool ciThreadRunning; 00043 00044 pthread_t ciHandlerThread; 00045 00046 pmt_list_t PMTList; 00047 pmt_list_t PMTAddList; 00048 QMutex pmt_lock; 00049 bool have_pmt; 00050 bool pmt_sent; 00051 bool pmt_updated; 00052 bool pmt_added; 00053 }; 00054 00055 #endif // DVBCAM_H 00056
1.5.5