X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/b36d3153538679a8fcbebcf884e4eb1533c5cd13..fa664bead71329a67c53bc1814a3d68d397045d1:/lib/base/filepush.h?ds=sidebyside diff --git a/lib/base/filepush.h b/lib/base/filepush.h index e471b296..71ee9979 100644 --- a/lib/base/filepush.h +++ b/lib/base/filepush.h @@ -2,9 +2,11 @@ #define __lib_base_filepush_h #include +#include #include #include #include +#include class iFilePushScatterGather { @@ -15,11 +17,13 @@ public: class eFilePushThread: public eThread, public Object { + int prio_class, prio; public: - eFilePushThread(); + 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 pause(); void seek(int whence, off_t where); @@ -29,22 +33,32 @@ public: void flush(); void enablePVRCommit(int); + /* stream mode will wait on EOF until more data is available. */ + void setStreamMode(int); + void setScatterGather(iFilePushScatterGather *); enum { evtEOF, evtReadError, evtWriteError, evtUser }; Signal1 m_event; - + + void installSigUSR1Handler(); + void before_set_thread_alive(); + /* you can send private events if you want */ void sendEvent(int evt); protected: - virtual void filterRecordData(const char *data, int len); + virtual int filterRecordData(const unsigned char *data, int len, size_t ¤t_span_remaining); 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_buf_start, m_buf_end, m_filter_end; + int m_fd_dest; int m_send_pvr_commit; + int m_stream_mode; + int m_blocksize; + + eRawFile m_raw_source; eFixedMessagePump m_messagepump;