Changeset 1005 for trunk/libffado/src/libieee1394/IsoHandlerManager.h
- Timestamp:
- 04/21/08 01:27:47 (16 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/src/libieee1394/IsoHandlerManager.h
r978 r1005 26 26 27 27 #include "config.h" 28 29 28 #include "debugmodule/debugmodule.h" 30 29 31 30 #include "libutil/Thread.h" 31 32 #include "IsoHandler.h" 32 33 33 34 #include <sys/poll.h> 34 35 #include <errno.h> 35 36 36 #include <vector> 37 #include <semaphore.h> 37 38 38 39 class Ieee1394Service; 39 class IsoHandler; 40 //class IsoHandler; 41 //enum IsoHandler::EHandlerType; 40 42 41 43 namespace Streaming { … … 57 59 { 58 60 public: 59 IsoTask(IsoHandlerManager& manager );60 virtual ~IsoTask() {};61 IsoTask(IsoHandlerManager& manager, enum IsoHandler::EHandlerType); 62 virtual ~IsoTask(); 61 63 62 64 public: … … 65 67 66 68 /** 67 * requests the thread to sync it's stream map with the manager69 * @brief requests the thread to sync it's stream map with the manager 68 70 */ 69 71 bool requestShadowMapUpdate(); 72 enum eActivityResult { 73 eAR_Activity, 74 eAR_Timeout, 75 eAR_Interrupted, 76 eAR_Error 77 }; 78 79 /** 80 * @brief signals that something happened in one of the clients of this task 81 */ 82 void signalActivity(); 83 /** 84 * @brief wait until something happened in one of the clients of this task 85 */ 86 enum eActivityResult waitForActivity(); 70 87 71 88 void setVerboseLevel(int i); … … 92 109 #endif 93 110 111 // activity signaling 112 sem_t m_activity_semaphore; 113 114 enum IsoHandler::EHandlerType m_handlerType; 94 115 // debug stuff 95 116 DECLARE_DEBUG_MODULE; … … 110 131 class IsoHandlerManager 111 132 { 112 friend class Streaming::StreamProcessorManager;113 133 friend class IsoTask; 114 friend class IsoHandler;115 134 116 135 public: … … 138 157 bool disable(IsoHandler *); ///< disables a handler 139 158 bool enable(IsoHandler *); ///< enables a handler 159 160 /** 161 * @brief signals that something happened in one of the clients 162 */ 163 void signalActivityTransmit(); 164 void signalActivityReceive(); 165 140 166 ///> disables the handler attached to the stream 141 167 bool stopHandlerForStream(Streaming::StreamProcessor *); … … 157 183 Ieee1394Service& get1394Service() {return m_service;}; 158 184 159 protected:160 185 void requestShadowMapUpdate(); 161 186 … … 195 220 bool m_realtime; 196 221 int m_priority; 197 Util::Thread * m_IsoThread; 198 IsoTask * m_IsoTask; 222 Util::Thread * m_IsoThreadTransmit; 223 IsoTask * m_IsoTaskTransmit; 224 Util::Thread * m_IsoThreadReceive; 225 IsoTask * m_IsoTaskReceive; 199 226 200 227 // debug stuff