servicemp3.cpp: more simple/flexible streaming detection
[enigma2.git] / lib / base / filepush.h
index d3f32d75cb3b2bc1d93673562bbe7062bd9d5dd8..a4457f67d3ec9f11b38f8121c68c4d13d4b01c29 100644 (file)
@@ -19,14 +19,15 @@ class eFilePushThread: public eThread, public Object
 {
        int prio_class, prio;
 public:
-       eFilePushThread(int prio_class=IOPRIO_CLASS_BE, int prio_level=0);
+       eFilePushThread(int prio_class=IOPRIO_CLASS_BE, int prio_level=0, int blocksize=188);
        void thread();
        void stop();
        void start(int sourcefd, int destfd);
        int start(const char *filename, int destfd);
-       
+
+       void start(ePtr<iTsSource> &source, int destfd);
+
        void pause();
-       void seek(int whence, off_t where);
        void resume();
        
                /* flushes the internal readbuffer */ 
@@ -47,20 +48,22 @@ public:
                /* you can send private events if you want */
        void sendEvent(int evt);
 protected:
-       virtual void filterRecordData(const unsigned char *data, int len);
+       virtual int filterRecordData(const unsigned char *data, int len, size_t &current_span_remaining);
 private:
        iFilePushScatterGather *m_sg;
        int m_stop;
        unsigned char m_buffer[65536];
-       int m_buf_start, m_buf_end;
+       int m_buf_start, m_buf_end, m_filter_end;
        int m_fd_dest;
        int m_send_pvr_commit;
        int m_stream_mode;
+       int m_blocksize;
+       off_t m_current_position;
+
+       ePtr<iTsSource> m_source;
 
-       eRawFile m_raw_source;
-       
        eFixedMessagePump<int> m_messagepump;
-       
+
        void recvEvent(const int &evt);
 };