allow gstreamer to signalize missing plugins to the gui (requires reconfiguring enigm...
[enigma2.git] / lib / dvb / demux.h
index 8f11e8403e6b9165bc69f9f8e3c292a39fb5b663..1c0da47c6f6b27f188b5a5f615f3a66b9a623740 100644 (file)
@@ -15,20 +15,25 @@ public:
        virtual ~eDVBDemux();
        
        RESULT setSourceFrontend(int fenum);
        virtual ~eDVBDemux();
        
        RESULT setSourceFrontend(int fenum);
+       int getSource() { return source; }
        RESULT setSourcePVR(int pvrnum);
        
        RESULT createSectionReader(eMainloop *context, ePtr<iDVBSectionReader> &reader);
        RESULT setSourcePVR(int pvrnum);
        
        RESULT createSectionReader(eMainloop *context, ePtr<iDVBSectionReader> &reader);
+       RESULT createPESReader(eMainloop *context, ePtr<iDVBPESReader> &reader);
        RESULT createTSRecorder(ePtr<iDVBTSRecorder> &recorder);
        RESULT getMPEGDecoder(ePtr<iTSMPEGDecoder> &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<void,int> &event, ePtr<eConnection> &conn);
        RESULT createTSRecorder(ePtr<iDVBTSRecorder> &recorder);
        RESULT getMPEGDecoder(ePtr<iTSMPEGDecoder> &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<void,int> &event, ePtr<eConnection> &conn);
+       
+       int getRefCount() { return ref; }
 private:
 private:
-       int adapter, demux;
+       int adapter, demux, source;
        
        int m_dvr_busy;
        friend class eDVBSectionReader;
        
        int m_dvr_busy;
        friend class eDVBSectionReader;
+       friend class eDVBPESReader;
        friend class eDVBAudio;
        friend class eDVBVideo;
        friend class eDVBPCR;
        friend class eDVBAudio;
        friend class eDVBVideo;
        friend class eDVBPCR;
@@ -43,7 +48,6 @@ private:
 class eDVBSectionReader: public iDVBSectionReader, public Object
 {
        DECLARE_REF(eDVBSectionReader);
 class eDVBSectionReader: public iDVBSectionReader, public Object
 {
        DECLARE_REF(eDVBSectionReader);
-private:
        int fd;
        Signal1<void, const __u8*> read;
        ePtr<eDVBDemux> demux;
        int fd;
        Signal1<void, const __u8*> read;
        ePtr<eDVBDemux> demux;
@@ -60,6 +64,23 @@ public:
        RESULT connectRead(const Slot1<void,const __u8*> &read, ePtr<eConnection> &conn);
 };
 
        RESULT connectRead(const Slot1<void,const __u8*> &read, ePtr<eConnection> &conn);
 };
 
+class eDVBPESReader: public iDVBPESReader, public Object
+{
+       DECLARE_REF(eDVBPESReader);
+       int m_fd;
+       Signal2<void, const __u8*, int> m_read;
+       ePtr<eDVBDemux> m_demux;
+       int m_active;
+       void data(int);
+       eSocketNotifier *m_notifier;
+public:
+       eDVBPESReader(eDVBDemux *demux, eMainloop *context, RESULT &res);
+       virtual ~eDVBPESReader();
+       RESULT start(int pid);
+       RESULT stop();
+       RESULT connectRead(const Slot2<void,const __u8*, int> &read, ePtr<eConnection> &conn);
+};
+
 class eDVBRecordFileThread;
 
 class eDVBTSRecorder: public iDVBTSRecorder, public Object
 class eDVBRecordFileThread;
 
 class eDVBTSRecorder: public iDVBTSRecorder, public Object
@@ -87,6 +108,7 @@ private:
        void stopPID(int pid);
        
        eDVBRecordFileThread *m_thread;
        void stopPID(int pid);
        
        eDVBRecordFileThread *m_thread;
+       void filepushEvent(int event);
        
        std::map<int,int> m_pids;
        Signal1<void,int> m_event;
        
        std::map<int,int> m_pids;
        Signal1<void,int> m_event;