00001 #line 574 "./lpsrc/flx_demux.pak"
00002 #ifndef __PFILEIO__
00003 #define __PFILEIO__
00004 #include <flx_demux_config.hpp>
00005
00006 #include "demux_demuxer.hpp"
00007 #include "pthread_sleep_queue.hpp"
00008 #include "pthread_mutex.hpp"
00009
00010
00011 #include "pthread_work_fifo.hpp"
00012 namespace flx { namespace demux {
00013
00014
00015
00016
00017
00018
00019 class DEMUX_EXTERN fileio_request : public flx::pthread::worker_task
00020 {
00021 long offset;
00022
00023 int fd;
00024 bool read_flag;
00025
00026 int err;
00027 public:
00028
00029 sel_param pb;
00030
00031 virtual ~fileio_request();
00032 fileio_request();
00033 fileio_request(int f, char* buf, long len, long off, bool rd);
00034
00035 virtual void doit();
00036 };
00037
00038
00039
00040
00041 class DEMUX_EXTERN pasync_fileio : public flx::pthread::worker_fifo
00042 {
00043 public:
00044 pasync_fileio(int n,int m) : worker_fifo(n,m) {}
00045
00046 void add_fileio_request(fileio_request* req) { add_worker_task(req); }
00047 };
00048
00049 }}
00050 #endif // __PFILEIO__
00051