X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/ce6a641bebc8e3e3ef14b624aa67d1dca1e8310e..97d46aee1158e549c110d66a0e1c4185c3cbbdf3:/lib/dvb/demux.h diff --git a/lib/dvb/demux.h b/lib/dvb/demux.h index 8f11e840..7a697d49 100644 --- a/lib/dvb/demux.h +++ b/lib/dvb/demux.h @@ -15,20 +15,25 @@ public: virtual ~eDVBDemux(); RESULT setSourceFrontend(int fenum); + int getSource() { return source; } RESULT setSourcePVR(int pvrnum); RESULT createSectionReader(eMainloop *context, ePtr &reader); + RESULT createPESReader(eMainloop *context, ePtr &reader); RESULT createTSRecorder(ePtr &recorder); RESULT getMPEGDecoder(ePtr &reader, int primary); RESULT getSTC(pts_t &pts, int num); RESULT getCADemuxID(uint8_t &id) { id = demux; return 0; } RESULT flush(); RESULT connectEvent(const Slot1 &event, ePtr &conn); + + int getRefCount() { return ref; } private: - int adapter, demux; + int adapter, demux, source; int m_dvr_busy; friend class eDVBSectionReader; + friend class eDVBPESReader; friend class eDVBAudio; friend class eDVBVideo; friend class eDVBPCR; @@ -43,14 +48,13 @@ private: class eDVBSectionReader: public iDVBSectionReader, public Object { DECLARE_REF(eDVBSectionReader); -private: int fd; Signal1 read; ePtr demux; int active; int checkcrc; void data(int); - eSocketNotifier *notifier; + ePtr notifier; public: eDVBSectionReader(eDVBDemux *demux, eMainloop *context, RESULT &res); @@ -60,6 +64,23 @@ public: RESULT connectRead(const Slot1 &read, ePtr &conn); }; +class eDVBPESReader: public iDVBPESReader, public Object +{ + DECLARE_REF(eDVBPESReader); + int m_fd; + Signal2 m_read; + ePtr m_demux; + int m_active; + void data(int); + ePtr m_notifier; +public: + eDVBPESReader(eDVBDemux *demux, eMainloop *context, RESULT &res); + virtual ~eDVBPESReader(); + RESULT start(int pid); + RESULT stop(); + RESULT connectRead(const Slot2 &read, ePtr &conn); +}; + class eDVBRecordFileThread; class eDVBTSRecorder: public iDVBTSRecorder, public Object @@ -73,20 +94,23 @@ public: RESULT addPID(int pid); RESULT removePID(int pid); - RESULT setTimingPID(int pid); + RESULT setTimingPID(int pid, int type); RESULT setTargetFD(int fd); RESULT setTargetFilename(const char *filename); RESULT setBoundary(off_t max); RESULT stop(); - + + RESULT getCurrentPCR(pts_t &pcr); + RESULT connectEvent(const Slot1 &event, ePtr &conn); private: RESULT startPID(int pid); void stopPID(int pid); eDVBRecordFileThread *m_thread; + void filepushEvent(int event); std::map m_pids; Signal1 m_event;