X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/a2c5f9998376a5877aef36e410921908ab8605ba..b2dd2c67550f6230554b4e7bbe73b7f1b3fb366d:/lib/base/filepush.h diff --git a/lib/base/filepush.h b/lib/base/filepush.h index 7eb79974..75037f66 100644 --- a/lib/base/filepush.h +++ b/lib/base/filepush.h @@ -6,6 +6,13 @@ #include #include +class iFilePushScatterGather +{ +public: + virtual void getNextSourceSpan(off_t current_offset, size_t bytes_read, off_t &start, size_t &size)=0; + virtual ~iFilePushScatterGather() {} +}; + class eFilePushThread: public eThread, public Object { public: @@ -20,19 +27,27 @@ public: /* flushes the internal readbuffer */ void flush(); + void enablePVRCommit(int); - enum { evtEOF, evtReadError, evtWriteError }; + void setScatterGather(iFilePushScatterGather *); + + enum { evtEOF, evtReadError, evtWriteError, evtUser }; Signal1 m_event; + /* you can send private events if you want */ + void sendEvent(int evt); +protected: + virtual void filterRecordData(const unsigned char *data, int len); private: + iFilePushScatterGather *m_sg; int m_stop; unsigned char m_buffer[65536]; int m_buf_start, m_buf_end; int m_fd_source, m_fd_dest; + int m_send_pvr_commit; eFixedMessagePump m_messagepump; - void sendEvent(int evt); void recvEvent(const int &evt); };