Changeset 637
- Timestamp:
- 09/16/11 18:14:36 (8 months ago)
- Location:
- trunk/sources/thelib
- Files:
-
- 72 edited
-
include/netio/epoll/inboundnamedpipecarrier.h (modified) (1 diff)
-
include/netio/epoll/iohandler.h (modified) (1 diff)
-
include/netio/epoll/iotimer.h (modified) (1 diff)
-
include/netio/epoll/stdiocarrier.h (modified) (1 diff)
-
include/netio/epoll/tcpacceptor.h (modified) (1 diff)
-
include/netio/epoll/tcpcarrier.h (modified) (1 diff)
-
include/netio/epoll/tcpconnector.h (modified) (1 diff)
-
include/netio/epoll/udpcarrier.h (modified) (1 diff)
-
include/netio/kqueue/inboundnamedpipecarrier.h (modified) (1 diff)
-
include/netio/kqueue/iohandler.h (modified) (1 diff)
-
include/netio/kqueue/iotimer.h (modified) (1 diff)
-
include/netio/kqueue/stdiocarrier.h (modified) (1 diff)
-
include/netio/kqueue/tcpacceptor.h (modified) (1 diff)
-
include/netio/kqueue/tcpcarrier.h (modified) (1 diff)
-
include/netio/kqueue/tcpconnector.h (modified) (1 diff)
-
include/netio/kqueue/udpcarrier.h (modified) (1 diff)
-
include/netio/select/inboundnamedpipecarrier.h (modified) (1 diff)
-
include/netio/select/iohandler.h (modified) (1 diff)
-
include/netio/select/iotimer.h (modified) (1 diff)
-
include/netio/select/stdiocarrier.h (modified) (1 diff)
-
include/netio/select/tcpacceptor.h (modified) (1 diff)
-
include/netio/select/tcpcarrier.h (modified) (1 diff)
-
include/netio/select/tcpconnector.h (modified) (1 diff)
-
include/netio/select/udpcarrier.h (modified) (1 diff)
-
include/protocols/baseprotocol.h (modified) (22 diffs)
-
include/protocols/mms/innetaacstream.h (modified) (1 diff)
-
include/protocols/mms/innetmp3stream.h (modified) (1 diff)
-
include/protocols/rtmp/basertmpprotocol.h (modified) (1 diff)
-
include/protocols/rtmp/streaming/baseoutnetrtmpstream.h (modified) (1 diff)
-
include/protocols/rtmp/streaming/innetrtmpstream.h (modified) (1 diff)
-
include/protocols/rtp/rtspprotocol.h (modified) (1 diff)
-
include/protocols/rtp/streaming/innetrtpstream.h (modified) (1 diff)
-
include/protocols/rtp/streaming/outnetrtpudph264stream.h (modified) (1 diff)
-
include/protocols/ts/innettsstream.h (modified) (1 diff)
-
include/streaming/baseinstream.h (modified) (8 diffs)
-
include/streaming/baseoutstream.h (modified) (1 diff)
-
include/streaming/basestream.h (modified) (1 diff)
-
include/streaming/innetrawstream.h (modified) (1 diff)
-
include/streaming/outnetrawstream.h (modified) (1 diff)
-
src/netio/epoll/inboundnamedpipecarrier.cpp (modified) (1 diff)
-
src/netio/epoll/iotimer.cpp (modified) (1 diff)
-
src/netio/epoll/stdiocarrier.cpp (modified) (1 diff)
-
src/netio/epoll/tcpacceptor.cpp (modified) (1 diff)
-
src/netio/epoll/tcpcarrier.cpp (modified) (1 diff)
-
src/netio/epoll/udpcarrier.cpp (modified) (1 diff)
-
src/netio/kqueue/inboundnamedpipecarrier.cpp (modified) (1 diff)
-
src/netio/kqueue/iotimer.cpp (modified) (1 diff)
-
src/netio/kqueue/stdiocarrier.cpp (modified) (1 diff)
-
src/netio/kqueue/tcpacceptor.cpp (modified) (1 diff)
-
src/netio/kqueue/tcpcarrier.cpp (modified) (1 diff)
-
src/netio/kqueue/udpcarrier.cpp (modified) (1 diff)
-
src/netio/select/inboundnamedpipecarrier.cpp (modified) (1 diff)
-
src/netio/select/iotimer.cpp (modified) (1 diff)
-
src/netio/select/stdiocarrier.cpp (modified) (1 diff)
-
src/netio/select/tcpacceptor.cpp (modified) (1 diff)
-
src/netio/select/tcpcarrier.cpp (modified) (1 diff)
-
src/netio/select/udpcarrier.cpp (modified) (1 diff)
-
src/protocols/baseprotocol.cpp (modified) (4 diffs)
-
src/protocols/mms/innetaacstream.cpp (modified) (1 diff)
-
src/protocols/mms/innetmp3stream.cpp (modified) (1 diff)
-
src/protocols/rtmp/basertmpprotocol.cpp (modified) (3 diffs)
-
src/protocols/rtmp/streaming/baseoutnetrtmpstream.cpp (modified) (1 diff)
-
src/protocols/rtmp/streaming/innetrtmpstream.cpp (modified) (1 diff)
-
src/protocols/rtp/rtspprotocol.cpp (modified) (2 diffs)
-
src/protocols/rtp/streaming/innetrtpstream.cpp (modified) (1 diff)
-
src/protocols/rtp/streaming/outnetrtpudph264stream.cpp (modified) (1 diff)
-
src/protocols/ts/innettsstream.cpp (modified) (1 diff)
-
src/streaming/baseinstream.cpp (modified) (1 diff)
-
src/streaming/baseoutstream.cpp (modified) (1 diff)
-
src/streaming/basestream.cpp (modified) (1 diff)
-
src/streaming/innetrawstream.cpp (modified) (1 diff)
-
src/streaming/outnetrawstream.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/thelib/include/netio/epoll/inboundnamedpipecarrier.h
r193 r637 37 37 virtual bool OnEvent(struct epoll_event &event); 38 38 virtual operator string(); 39 virtual void GetStats(Variant &info );39 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 40 40 }; 41 41 -
trunk/sources/thelib/include/netio/epoll/iohandler.h
r193 r637 62 62 static string IOHTToString(IOHandlerType type); 63 63 virtual operator string() = 0; 64 virtual void GetStats(Variant &info ) = 0;64 virtual void GetStats(Variant &info, uint32_t namespaceId = 0) = 0; 65 65 }; 66 66 -
trunk/sources/thelib/include/netio/epoll/iotimer.h
r193 r637 36 36 bool EnqueueForTimeEvent(uint32_t seconds); 37 37 virtual operator string(); 38 virtual void GetStats(Variant &info );38 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 39 39 }; 40 40 -
trunk/sources/thelib/include/netio/epoll/stdiocarrier.h
r193 r637 38 38 virtual bool SignalOutputData(); 39 39 virtual operator string(); 40 virtual void GetStats(Variant &info );40 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 41 41 }; 42 42 -
trunk/sources/thelib/include/netio/epoll/tcpacceptor.h
r616 r637 54 54 vector<uint64_t> &GetProtocolChain(); 55 55 virtual operator string(); 56 virtual void GetStats(Variant &info );56 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 57 57 bool Enable(); 58 58 void Enable(bool enabled); -
trunk/sources/thelib/include/netio/epoll/tcpcarrier.h
r271 r637 45 45 virtual bool SignalOutputData(); 46 46 virtual operator string(); 47 virtual void GetStats(Variant &info );47 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 48 48 49 49 sockaddr_in &GetFarEndpointAddress(); -
trunk/sources/thelib/include/netio/epoll/tcpconnector.h
r452 r637 164 164 } 165 165 166 virtual void GetStats(Variant &info ) {166 virtual void GetStats(Variant &info, uint32_t namespaceId = 0) { 167 167 168 168 } -
trunk/sources/thelib/include/netio/epoll/udpcarrier.h
r628 r637 45 45 virtual bool SignalOutputData(); 46 46 virtual operator string(); 47 virtual void GetStats(Variant &info );47 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 48 48 49 49 Variant &GetParameters(); -
trunk/sources/thelib/include/netio/kqueue/inboundnamedpipecarrier.h
r193 r637 37 37 virtual bool OnEvent(struct kevent &event); 38 38 virtual operator string(); 39 virtual void GetStats(Variant &info );39 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 40 40 }; 41 41 -
trunk/sources/thelib/include/netio/kqueue/iohandler.h
r193 r637 62 62 static string IOHTToString(IOHandlerType type); 63 63 virtual operator string() = 0; 64 virtual void GetStats(Variant &info ) = 0;64 virtual void GetStats(Variant &info, uint32_t namespaceId = 0) = 0; 65 65 }; 66 66 -
trunk/sources/thelib/include/netio/kqueue/iotimer.h
r193 r637 36 36 bool EnqueueForTimeEvent(uint32_t seconds); 37 37 virtual operator string(); 38 virtual void GetStats(Variant &info );38 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 39 39 }; 40 40 -
trunk/sources/thelib/include/netio/kqueue/stdiocarrier.h
r193 r637 38 38 virtual bool SignalOutputData(); 39 39 virtual operator string(); 40 virtual void GetStats(Variant &info );40 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 41 41 }; 42 42 -
trunk/sources/thelib/include/netio/kqueue/tcpacceptor.h
r616 r637 54 54 vector<uint64_t> &GetProtocolChain(); 55 55 virtual operator string(); 56 virtual void GetStats(Variant &info );56 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 57 57 bool Enable(); 58 58 void Enable(bool enabled); -
trunk/sources/thelib/include/netio/kqueue/tcpcarrier.h
r271 r637 43 43 virtual bool SignalOutputData(); 44 44 virtual operator string(); 45 virtual void GetStats(Variant &info );45 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 46 46 47 47 sockaddr_in &GetFarEndpointAddress(); -
trunk/sources/thelib/include/netio/kqueue/tcpconnector.h
r452 r637 165 165 } 166 166 167 virtual void GetStats(Variant &info ) {167 virtual void GetStats(Variant &info, uint32_t namespaceId = 0) { 168 168 169 169 } -
trunk/sources/thelib/include/netio/kqueue/udpcarrier.h
r628 r637 43 43 virtual bool SignalOutputData(); 44 44 virtual operator string(); 45 virtual void GetStats(Variant &info );45 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 46 46 47 47 Variant &GetParameters(); -
trunk/sources/thelib/include/netio/select/inboundnamedpipecarrier.h
r193 r637 37 37 virtual bool OnEvent(select_event &event); 38 38 virtual operator string(); 39 virtual void GetStats(Variant &info );39 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 40 40 }; 41 41 -
trunk/sources/thelib/include/netio/select/iohandler.h
r275 r637 94 94 static string IOHTToString(IOHandlerType type); 95 95 virtual operator string() = 0; 96 virtual void GetStats(Variant &info ) = 0;96 virtual void GetStats(Variant &info, uint32_t namespaceId = 0) = 0; 97 97 }; 98 98 -
trunk/sources/thelib/include/netio/select/iotimer.h
r193 r637 36 36 bool EnqueueForTimeEvent(uint32_t seconds); 37 37 virtual operator string(); 38 virtual void GetStats(Variant &info );38 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 39 39 }; 40 40 -
trunk/sources/thelib/include/netio/select/stdiocarrier.h
r193 r637 38 38 virtual bool SignalOutputData(); 39 39 virtual operator string(); 40 virtual void GetStats(Variant &info );40 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 41 41 }; 42 42 -
trunk/sources/thelib/include/netio/select/tcpacceptor.h
r616 r637 55 55 vector<uint64_t> &GetProtocolChain(); 56 56 virtual operator string(); 57 virtual void GetStats(Variant &info );57 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 58 58 bool Enable(); 59 59 void Enable(bool enabled); -
trunk/sources/thelib/include/netio/select/tcpcarrier.h
r271 r637 47 47 virtual bool SignalOutputData(); 48 48 virtual operator string(); 49 virtual void GetStats(Variant &info );49 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 50 50 51 51 sockaddr_in &GetFarEndpointAddress(); -
trunk/sources/thelib/include/netio/select/tcpconnector.h
r452 r637 158 158 } 159 159 160 virtual void GetStats(Variant &info ) {160 virtual void GetStats(Variant &info, uint32_t namespaceId = 0) { 161 161 162 162 } -
trunk/sources/thelib/include/netio/select/udpcarrier.h
r628 r637 43 43 virtual bool SignalOutputData(); 44 44 virtual operator string(); 45 virtual void GetStats(Variant &info );45 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 46 46 47 47 Variant &GetParameters(); -
trunk/sources/thelib/include/protocols/baseprotocol.h
r496 r637 34 34 @class BaseProtocol 35 35 @brief The base class on which all atomic protocols must derive from. 36 */36 */ 37 37 class DLLEXP BaseProtocol { 38 38 private: … … 61 61 /*! 62 62 @abstract Returns the type of the protocol 63 */63 */ 64 64 uint64_t GetType(); 65 65 66 66 /*! 67 67 @brief Returns the id of the protocol. Each protocol instance has an id. The id is unique across all protocols, no matter the type 68 */68 */ 69 69 uint32_t GetId(); 70 70 71 71 /*! 72 72 @brief Returns the creation timestamp expressed in milliseconds for 1970 epoch 73 */73 */ 74 74 double GetSpawnTimestamp(); 75 75 76 76 /*! 77 77 @brief Gets the far protocol 78 */78 */ 79 79 BaseProtocol *GetFarProtocol(); 80 80 … … 82 82 @brief Sets the far protocol 83 83 @param pProtocol 84 */84 */ 85 85 void SetFarProtocol(BaseProtocol *pProtocol); 86 86 87 87 /*! 88 88 @brief Break the far side of the protocol chain by making far protocol NULL 89 */89 */ 90 90 void ResetFarProtocol(); 91 91 92 92 /*! 93 93 @brief Gets the near protocol 94 */94 */ 95 95 BaseProtocol *GetNearProtocol(); 96 96 … … 98 98 @brief Sets the near protocol 99 99 @param pProtocol 100 */100 */ 101 101 void SetNearProtocol(BaseProtocol *pProtocol); 102 102 103 103 /*! 104 104 @brief Break the near side of the protocol chain by making near protocol NULL 105 */105 */ 106 106 void ResetNearProtocol(); 107 107 … … 112 112 @param deleteNear: Indicates which protocol to delete. 113 113 @discussion Normally, if this protocol will be deleted, all the stack will be deleted. Using the DeleteNearProtocol and DeleteFarProtocol, we can tell where the protocol deletion will stop. 114 */114 */ 115 115 void DeleteNearProtocol(bool deleteNear); 116 116 /*! … … 118 118 @param deleteNear: Indicates which protocol to delete. 119 119 @discussion Normally, if this protocol will be deleted, all the stack will be deleted. Using the DeleteNearProtocol and DeleteFarProtocol, we can tell where the protocol deletion will stop. 120 */120 */ 121 121 void DeleteFarProtocol(bool deleteFar); 122 122 … … 124 124 @brief Gets the far-most protocol in the protocl chain. 125 125 @discussion Far-end protocol - is the one close to the transport layer 126 */127 126 */ 127 128 128 BaseProtocol *GetFarEndpoint(); 129 129 … … 131 131 @brief Gets the near-most protocol in the protocl chain. 132 132 @discussion Near-end protocol - is the one close to the business rules layer 133 */133 */ 134 134 BaseProtocol *GetNearEndpoint(); 135 135 136 136 /*! 137 137 @brief Tests to see if the protocol is enqueued for delete 138 */138 */ 139 139 bool IsEnqueueForDelete(); 140 140 141 141 /*! 142 142 @brief Gets the protocol's application 143 */143 */ 144 144 BaseClientApplication * GetApplication(); 145 145 … … 149 149 @brief Sets the custom parameters in case of outbound protocols 150 150 @param customParameters: Variant contaitning the custom parameters 151 */151 */ 152 152 void SetOutboundConnectParameters(Variant &customParameters); 153 153 154 154 /*! 155 155 @brief Gets the custom parameters 156 */156 */ 157 157 Variant &GetCustomParameters(); 158 158 … … 160 160 @brief This will return complete information about all protocols in the current stack, including the carrier if available. 161 161 @param info 162 */163 void GetStackStats(Variant &info );162 */ 163 void GetStackStats(Variant &info, uint32_t namespaceId = 0); 164 164 165 165 //utility functions … … 173 173 @brief This is called to initialize internal resources specific to each protocol. This is called before adding the protocol to the stack. 174 174 @param parameters 175 */175 */ 176 176 virtual bool Initialize(Variant ¶meters); 177 177 178 178 /*! 179 179 @brief Enqueues the protocol to the delete queue imediatly. All transport related routines called from now on, will be ignored. 180 */180 */ 181 181 virtual void EnqueueForDelete(); 182 182 … … 184 184 @brief Enqueues the protocol to the delete queue if there is no outstanding outbound data. 185 185 @param fromFarSide 186 */186 */ 187 187 virtual void GracefullyEnqueueForDelete(bool fromFarSide = true); 188 188 189 189 /*! 190 190 @brief Returns the IO handler of the protocol chain. 191 */191 */ 192 192 virtual IOHandler *GetIOHandler(); 193 193 … … 195 195 @brief Sets the IO Handler of the protocol chain. 196 196 @param pCarrier 197 */197 */ 198 198 virtual void SetIOHandler(IOHandler *pCarrier); 199 199 200 200 /*! 201 201 @brief Gets the input buffers 202 */202 */ 203 203 virtual IOBuffer * GetInputBuffer(); 204 204 205 205 /*! 206 206 @brief Gets the output buffers 207 */207 */ 208 208 virtual IOBuffer * GetOutputBuffer(); 209 209 210 210 /*! 211 211 @brief Get the total amount of bytes that this protocol transported (raw bytes). 212 */212 */ 213 213 virtual uint64_t GetDecodedBytesCount(); 214 214 215 215 /*! 216 216 @brief This function can be called by anyone who wants to signal the transport layer that there is data ready to be sent. pExtraParameters usually is a pointer to an OutboundBuffer, but this depends on the protocol type. 217 */217 */ 218 218 virtual bool EnqueueForOutbound(); 219 219 … … 221 221 @brief Enqueue the current protocol stack for timed event 222 222 @param seconds 223 */223 */ 224 224 virtual bool EnqueueForTimeEvent(uint32_t seconds); 225 225 226 226 /*! 227 227 @brief This is invoked by the framework when the protocol is enqueued for timing oprrations 228 */228 */ 229 229 virtual bool TimePeriodElapsed(); 230 230 231 231 /*! 232 232 @brief This is invoked by the framework when the underlaying system is ready to send more data 233 */233 */ 234 234 virtual void ReadyForSend(); 235 235 236 236 /*! 237 * @brief This is invoked from various parts of the project to signal inter-protocol events.237 * @brief This is invoked from various parts of the project to signal inter-protocol events. 238 238 @param event 239 * @discussion For example, you enqueue a DNS request and you want to be informed when the request is done and the results are available. It will always bubble up towards the near protocol240 */239 * @discussion For example, you enqueue a DNS request and you want to be informed when the request is done and the results are available. It will always bubble up towards the near protocol 240 */ 241 241 virtual void SignalInterProtocolEvent(Variant &event); 242 242 … … 244 244 @brief Sets the protocol's application 245 245 @param application 246 */246 */ 247 247 virtual void SetApplication(BaseClientApplication *pApplication); 248 248 … … 251 251 @param buffer 252 252 @param pPeerAddress 253 */253 */ 254 254 virtual bool SignalInputData(IOBuffer &buffer, sockaddr_in *pPeerAddress); 255 255 … … 258 258 @brief recvAmount 259 259 @param pPeerAddress 260 */260 */ 261 261 virtual bool SignalInputData(int32_t recvAmount, sockaddr_in *pPeerAddress); 262 262 … … 264 264 @brief This will return a Variant containing various statistic information. This should be overridden if more/less info is desired 265 265 @param info 266 */267 virtual void GetStats(Variant &info );266 */ 267 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 268 268 269 269 // … … 275 275 @param type 276 276 @discussion This function must be implemented by the class that inherits this class 277 */277 */ 278 278 virtual bool AllowFarProtocol(uint64_t type) = 0; 279 279 … … 282 282 @param type 283 283 @discussion This function must be implemented by the class that inherits this class 284 */284 */ 285 285 virtual bool AllowNearProtocol(uint64_t type) = 0; 286 286 … … 289 289 @param recvAmount 290 290 @discussion This function must be implemented by the class that inherits this class 291 */291 */ 292 292 virtual bool SignalInputData(int32_t recvAmount) = 0; 293 293 … … 296 296 @param buffer 297 297 @discussion This function must be implemented by the class that inherits this class 298 */298 */ 299 299 virtual bool SignalInputData(IOBuffer &buffer) = 0; 300 300 -
trunk/sources/thelib/include/protocols/mms/innetaacstream.h
r489 r637 37 37 virtual bool IsCompatibleWithType(uint64_t type); 38 38 virtual StreamCapabilities * GetCapabilities(); 39 virtual void GetStats(Variant &info );39 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 40 40 virtual void ReadyForSend(); 41 41 virtual void SignalOutStreamAttached(BaseOutStream *pOutStream); -
trunk/sources/thelib/include/protocols/mms/innetmp3stream.h
r489 r637 37 37 virtual bool IsCompatibleWithType(uint64_t type); 38 38 virtual StreamCapabilities * GetCapabilities(); 39 virtual void GetStats(Variant &info );39 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 40 40 virtual void ReadyForSend(); 41 41 virtual void SignalOutStreamAttached(BaseOutStream *pOutStream); -
trunk/sources/thelib/include/protocols/rtmp/basertmpprotocol.h
r608 r637 93 93 virtual void SetApplication(BaseClientApplication *pApplication); 94 94 95 virtual void GetStats(Variant &info );95 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 96 96 97 97 bool ResetChannel(uint32_t channelId); -
trunk/sources/thelib/include/protocols/rtmp/streaming/baseoutnetrtmpstream.h
r606 r637 92 92 void CanDropFrames(bool canDropFrames); 93 93 void SetSendOnStatusPlayMessages(bool value); 94 virtual void GetStats(Variant &info );94 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 95 95 96 96 virtual bool FeedData(uint8_t *pData, uint32_t dataLength, -
trunk/sources/thelib/include/protocols/rtmp/streaming/innetrtmpstream.h
r453 r637 61 61 virtual void ReadyForSend(); 62 62 virtual bool IsCompatibleWithType(uint64_t type); 63 virtual void GetStats(Variant &info );63 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 64 64 65 65 uint32_t GetRTMPStreamId(); -
trunk/sources/thelib/include/protocols/rtp/rtspprotocol.h
r584 r637 90 90 virtual bool SignalInputData(int32_t recvAmount); 91 91 virtual bool SignalInputData(IOBuffer &buffer); 92 virtual void GetStats(Variant &info );92 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 93 93 94 94 string GetSessionId(); -
trunk/sources/thelib/include/protocols/rtp/streaming/innetrtpstream.h
r589 r637 77 77 virtual bool FeedAudioData(uint8_t *pData, uint32_t dataLength, 78 78 RTPHeader &rtpHeader); 79 virtual void GetStats(Variant &info );79 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 80 80 81 81 void ReportSR(uint64_t ntpMicroseconds, uint32_t rtpTimestamp, bool isAudio, -
trunk/sources/thelib/include/protocols/rtp/streaming/outnetrtpudph264stream.h
r586 r637 48 48 virtual ~OutNetRTPUDPH264Stream(); 49 49 50 virtual void GetStats(Variant &info );50 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 51 51 52 52 virtual bool FeedDataVideo(uint8_t *pData, uint32_t dataLength, -
trunk/sources/thelib/include/protocols/ts/innettsstream.h
r561 r637 102 102 virtual bool SignalSeek(double &absoluteTimestamp); 103 103 virtual bool SignalStop(); 104 virtual void GetStats(Variant &info );104 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 105 105 private: 106 106 bool HandleAudioData(uint8_t *pRawBuffer, uint32_t rawBufferLength, -
trunk/sources/thelib/include/streaming/baseinstream.h
r275 r637 28 28 /*! 29 29 @class BaseInStream 30 */30 */ 31 31 class DLLEXP BaseInStream 32 32 : public BaseStream { … … 46 46 @brief Returns information about the stream 47 47 @param info 48 */49 virtual void GetStats(Variant &info );48 */ 49 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 50 50 51 51 /*! … … 53 53 @param pOutStream - the out-stream to be linked to this in stream. 54 54 @param reverseLink - if true, pOutStream::Link will be called internally this is used to break the infinite calls. 55 */55 */ 56 56 virtual bool Link(BaseOutStream *pOutStream, bool reverseLink = true); 57 57 … … 60 60 @param pOutStream - the out-stream to be unlinked from this in stream. 61 61 @param reverseUnLink - if true, pOutStream::UnLink will be called internally this is used to break the infinite calls 62 */62 */ 63 63 virtual bool UnLink(BaseOutStream *pOutStream, bool reverseUnLink = true); 64 64 … … 66 66 @brief This will start the feeding process 67 67 @param absoluteTimestamp - the timestamp where we want to seek before start the feeding process 68 */68 */ 69 69 virtual bool Play(double absoluteTimestamp, double length); 70 70 71 71 /*! 72 72 @brief This will pause the feeding process 73 */73 */ 74 74 virtual bool Pause(); 75 75 76 76 /*! 77 77 @brief This will resume the feeding process 78 */78 */ 79 79 virtual bool Resume(); 80 80 … … 82 82 @brief This will seek to the specified point in time. 83 83 @param absoluteTimestamp 84 */84 */ 85 85 virtual bool Seek(double absoluteTimestamp); 86 86 87 87 /*! 88 88 @brief This will stop the feeding process 89 */89 */ 90 90 virtual bool Stop(); 91 91 … … 93 93 @brief Called after the link is complete 94 94 @param pOutStream - the newly added stream 95 */95 */ 96 96 virtual void SignalOutStreamAttached(BaseOutStream *pOutStream) = 0; 97 97 … … 99 99 @brief Called after the link is broken 100 100 @param pOutStream - the removed stream 101 */101 */ 102 102 virtual void SignalOutStreamDetached(BaseOutStream *pOutStream) = 0; 103 103 }; -
trunk/sources/thelib/include/streaming/baseoutstream.h
r275 r637 74 74 @param info 75 75 */ 76 virtual void GetStats(Variant &info );76 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 77 77 78 78 /*! -
trunk/sources/thelib/include/streaming/basestream.h
r275 r637 84 84 @param info 85 85 */ 86 virtual void GetStats(Variant &info );86 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 87 87 88 88 /*! -
trunk/sources/thelib/include/streaming/innetrawstream.h
r484 r637 38 38 virtual bool IsCompatibleWithType(uint64_t type); 39 39 virtual StreamCapabilities * GetCapabilities(); 40 virtual void GetStats(Variant &info );40 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 41 41 virtual void ReadyForSend(); 42 42 virtual void SignalOutStreamAttached(BaseOutStream *pOutStream); -
trunk/sources/thelib/include/streaming/outnetrawstream.h
r487 r637 35 35 virtual ~OutNetRawStream(); 36 36 37 virtual void GetStats(Variant &info );37 virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 38 38 virtual void SignalAttachedToInStream(); 39 39 virtual void SignalDetachedFromInStream(); -
trunk/sources/thelib/src/netio/epoll/inboundnamedpipecarrier.cpp
r422 r637 102 102 } 103 103 104 void InboundNamedPipeCarrier::GetStats(Variant &info ) {104 void InboundNamedPipeCarrier::GetStats(Variant &info, uint32_t namespaceId) { 105 105 106 106 } -
trunk/sources/thelib/src/netio/epoll/iotimer.cpp
r410 r637 60 60 } 61 61 62 void IOTimer::GetStats(Variant &info ) {62 void IOTimer::GetStats(Variant &info, uint32_t namespaceId) { 63 63 64 64 } -
trunk/sources/thelib/src/netio/epoll/stdiocarrier.cpp
r410 r637 131 131 } 132 132 133 void StdioCarrier::GetStats(Variant &info ) {133 void StdioCarrier::GetStats(Variant &info, uint32_t namespaceId) { 134 134 135 135 } -
trunk/sources/thelib/src/netio/epoll/tcpacceptor.cpp
r617 r637 203 203 } 204 204 205 void TCPAcceptor::GetStats(Variant &info ) {205 void TCPAcceptor::GetStats(Variant &info, uint32_t namespaceId) { 206 206 info = _parameters; 207 info["id"] = GetId();207 info["id"] = (((uint64_t) namespaceId) << 32) | GetId(); 208 208 info["enabled"] = (bool)_enabled; 209 209 info["acceptedConnectionsCount"] = _acceptedCount; 210 210 info["droppedConnectionsCount"] = _droppedCount; 211 211 if (_pApplication != NULL) { 212 info["appId"] = _pApplication->GetId();212 info["appId"] = (((uint64_t) namespaceId) << 32) | _pApplication->GetId(); 213 213 info["appName"] = _pApplication->GetName(); 214 } else { 215 info["appId"] = (((uint64_t) namespaceId) << 32); 216 info["appName"] = ""; 214 217 } 215 218 } -
trunk/sources/thelib/src/netio/epoll/tcpcarrier.cpp
r559 r637 126 126 } 127 127 128 void TCPCarrier::GetStats(Variant &info ) {128 void TCPCarrier::GetStats(Variant &info, uint32_t namespaceId) { 129 129 if (!GetEndpointsInfo()) { 130 130 FATAL("Unable to get endpoints info"); -
trunk/sources/thelib/src/netio/epoll/udpcarrier.cpp
r628 r637 82 82 } 83 83 84 void UDPCarrier::GetStats(Variant &info ) {84 void UDPCarrier::GetStats(Variant &info, uint32_t namespaceId) { 85 85 if (!GetEndpointsInfo()) { 86 86 FATAL("Unable to get endpoints info"); -
trunk/sources/thelib/src/netio/kqueue/inboundnamedpipecarrier.cpp
r422 r637 100 100 } 101 101 102 void InboundNamedPipeCarrier::GetStats(Variant &info ) {102 void InboundNamedPipeCarrier::GetStats(Variant &info, uint32_t namespaceId) { 103 103 104 104 } -
trunk/sources/thelib/src/netio/kqueue/iotimer.cpp
r413 r637 71 71 } 72 72 73 void IOTimer::GetStats(Variant &info ) {73 void IOTimer::GetStats(Variant &info, uint32_t namespaceId) { 74 74 75 75 } -
trunk/sources/thelib/src/netio/kqueue/stdiocarrier.cpp
r413 r637 128 128 } 129 129 130 void StdioCarrier::GetStats(Variant &info ) {130 void StdioCarrier::GetStats(Variant &info, uint32_t namespaceId) { 131 131 132 132 } -
trunk/sources/thelib/src/netio/kqueue/tcpacceptor.cpp
r617 r637 198 198 } 199 199 200 void TCPAcceptor::GetStats(Variant &info ) {200 void TCPAcceptor::GetStats(Variant &info, uint32_t namespaceId) { 201 201 info = _parameters; 202 info["id"] = GetId();202 info["id"] = (((uint64_t) namespaceId) << 32) | GetId(); 203 203 info["enabled"] = (bool)_enabled; 204 204 info["acceptedConnectionsCount"] = _acceptedCount; 205 205 info["droppedConnectionsCount"] = _droppedCount; 206 206 if (_pApplication != NULL) { 207 info["appId"] = _pApplication->GetId();207 info["appId"] = (((uint64_t) namespaceId) << 32) | _pApplication->GetId(); 208 208 info["appName"] = _pApplication->GetName(); 209 } else { 210 info["appId"] = (((uint64_t) namespaceId) << 32); 211 info["appName"] = ""; 209 212 } 210 213 } -
trunk/sources/thelib/src/netio/kqueue/tcpcarrier.cpp
r413 r637 122 122 } 123 123 124 void TCPCarrier::GetStats(Variant &info ) {124 void TCPCarrier::GetStats(Variant &info, uint32_t namespaceId) { 125 125 if (!GetEndpointsInfo()) { 126 126 FATAL("Unable to get endpoints info"); -
trunk/sources/thelib/src/netio/kqueue/udpcarrier.cpp
r628 r637 77 77 } 78 78 79 void UDPCarrier::GetStats(Variant &info ) {79 void UDPCarrier::GetStats(Variant &info, uint32_t namespaceId) { 80 80 if (!GetEndpointsInfo()) { 81 81 FATAL("Unable to get endpoints info"); -
trunk/sources/thelib/src/netio/select/inboundnamedpipecarrier.cpp
r422 r637 95 95 } 96 96 97 void InboundNamedPipeCarrier::GetStats(Variant &info ) {97 void InboundNamedPipeCarrier::GetStats(Variant &info, uint32_t namespaceId) { 98 98 99 99 } -
trunk/sources/thelib/src/netio/select/iotimer.cpp
r410 r637 60 60 } 61 61 62 void IOTimer::GetStats(Variant &info ) {62 void IOTimer::GetStats(Variant &info, uint32_t namespaceId) { 63 63 64 64 } -
trunk/sources/thelib/src/netio/select/stdiocarrier.cpp
r413 r637 128 128 } 129 129 130 void StdioCarrier::GetStats(Variant &info ) {130 void StdioCarrier::GetStats(Variant &info, uint32_t namespaceId) { 131 131 132 132 } -
trunk/sources/thelib/src/netio/select/tcpacceptor.cpp
r617 r637 199 199 } 200 200 201 void TCPAcceptor::GetStats(Variant &info ) {201 void TCPAcceptor::GetStats(Variant &info, uint32_t namespaceId) { 202 202 info = _parameters; 203 info["id"] = GetId();203 info["id"] = (((uint64_t) namespaceId) << 32) | GetId(); 204 204 info["enabled"] = (bool)_enabled; 205 205 info["acceptedConnectionsCount"] = _acceptedCount; 206 206 info["droppedConnectionsCount"] = _droppedCount; 207 207 if (_pApplication != NULL) { 208 info["appId"] = _pApplication->GetId();208 info["appId"] = (((uint64_t) namespaceId) << 32) | _pApplication->GetId(); 209 209 info["appName"] = _pApplication->GetName(); 210 } else { 211 info["appId"] = (((uint64_t) namespaceId) << 32); 212 info["appName"] = ""; 210 213 } 211 214 } -
trunk/sources/thelib/src/netio/select/tcpcarrier.cpp
r413 r637 135 135 } 136 136 137 void TCPCarrier::GetStats(Variant &info ) {137 void TCPCarrier::GetStats(Variant &info, uint32_t namespaceId) { 138 138 if (!GetEndpointsInfo()) { 139 139 FATAL("Unable to get endpoints info"); -
trunk/sources/thelib/src/netio/select/udpcarrier.cpp
r628 r637 77 77 } 78 78 79 void UDPCarrier::GetStats(Variant &info ) {79 void UDPCarrier::GetStats(Variant &info, uint32_t namespaceId) { 80 80 if (!GetEndpointsInfo()) { 81 81 FATAL("Unable to get endpoints info"); -
trunk/sources/thelib/src/protocols/baseprotocol.cpp
r496 r637 223 223 } 224 224 225 void BaseProtocol::GetStackStats(Variant &info ) {225 void BaseProtocol::GetStackStats(Variant &info, uint32_t namespaceId) { 226 226 IOHandler *pIOHandler = GetIOHandler(); 227 227 if (pIOHandler != NULL) { 228 pIOHandler->GetStats(info["carrier"] );228 pIOHandler->GetStats(info["carrier"], namespaceId); 229 229 } else { 230 230 info["carrier"] = Variant(); … … 233 233 while (pTemp != NULL) { 234 234 Variant item; 235 pTemp->GetStats(item );235 pTemp->GetStats(item, namespaceId); 236 236 info["stack"].PushToArray(item); 237 237 pTemp = pTemp->GetNearProtocol(); … … 395 395 } 396 396 397 void BaseProtocol::GetStats(Variant &info ) {398 info["id"] = GetId();397 void BaseProtocol::GetStats(Variant &info, uint32_t namespaceId) { 398 info["id"] = (((uint64_t) namespaceId) << 32) | GetId(); 399 399 info["type"] = tagToString(_type); 400 400 info["creationTimestamp"] = _creationTimestamp; … … 406 406 info["isEnqueueForDelete"] = (bool)IsEnqueueForDelete(); 407 407 if (_pApplication != NULL) 408 info["applicationId"] = _pApplication->GetId();408 info["applicationId"] = (((uint64_t) namespaceId) << 32) | _pApplication->GetId(); 409 409 else 410 info["applicationId"] = ( uint32_t) 0;410 info["applicationId"] = (((uint64_t) namespaceId) << 32); 411 411 } 412 412 -
trunk/sources/thelib/src/protocols/mms/innetaacstream.cpp
r496 r637 45 45 } 46 46 47 void InNetAACStream::GetStats(Variant &info ) {48 BaseInNetStream::GetStats(info );47 void InNetAACStream::GetStats(Variant &info, uint32_t namespaceId) { 48 BaseInNetStream::GetStats(info, namespaceId); 49 49 info["audio"]["bytesCount"] = _bytesCount; 50 50 info["audio"]["packetsCount"] = _packetsCount; -
trunk/sources/thelib/src/protocols/mms/innetmp3stream.cpp
r496 r637 45 45 } 46 46 47 void InNetMP3Stream::GetStats(Variant &info ) {48 BaseInNetStream::GetStats(info );47 void InNetMP3Stream::GetStats(Variant &info, uint32_t namespaceId) { 48 BaseInNetStream::GetStats(info, namespaceId); 49 49 info["audio"]["bytesCount"] = _bytesCount; 50 50 info["audio"]["packetsCount"] = _packetsCount; -
trunk/sources/thelib/src/protocols/rtmp/basertmpprotocol.cpp
r608 r637 202 202 } 203 203 204 void BaseRTMPProtocol::GetStats(Variant &info ) {205 BaseProtocol::GetStats(info );204 void BaseRTMPProtocol::GetStats(Variant &info, uint32_t namespaceId) { 205 BaseProtocol::GetStats(info, namespaceId); 206 206 info["rxInvokes"] = _rxInvokes; 207 207 info["txInvokes"] = _txInvokes; … … 209 209 if (_streams[i] != NULL) { 210 210 Variant si; 211 _streams[i]->GetStats(si );211 _streams[i]->GetStats(si, namespaceId); 212 212 info["streams"].PushToArray(si); 213 213 } … … 216 216 FOR_MAP(_inFileStreams, InFileRTMPStream *, InFileRTMPStream *, i) { 217 217 Variant si; 218 MAP_VAL(i)->GetStats(si );218 MAP_VAL(i)->GetStats(si, namespaceId); 219 219 info["streams"].PushToArray(si); 220 220 } -
trunk/sources/thelib/src/protocols/rtmp/streaming/baseoutnetrtmpstream.cpp
r625 r637 157 157 } 158 158 159 void BaseOutNetRTMPStream::GetStats(Variant &info ) {160 BaseOutNetStream::GetStats(info );159 void BaseOutNetRTMPStream::GetStats(Variant &info, uint32_t namespaceId) { 160 BaseOutNetStream::GetStats(info, namespaceId); 161 161 info["canDropFrames"] = (bool)_canDropFrames; 162 162 info["audio"]["packetsCount"] = _audioPacketsCount; -
trunk/sources/thelib/src/protocols/rtmp/streaming/innetrtmpstream.cpp
r632 r637 71 71 } 72 72 73 void InNetRTMPStream::GetStats(Variant &info ) {74 BaseInNetStream::GetStats(info );73 void InNetRTMPStream::GetStats(Variant &info, uint32_t namespaceId) { 74 BaseInNetStream::GetStats(info, namespaceId); 75 75 info["audio"]["packetsCount"] = _audioPacketsCount; 76 76 info["audio"]["droppedPacketsCount"] = (uint64_t) 0; -
trunk/sources/thelib/src/protocols/rtp/rtspprotocol.cpp
r589 r637 128 128 } 129 129 130 void RTSPProtocol::GetStats(Variant &info ) {131 BaseProtocol::GetStats(info );130 void RTSPProtocol::GetStats(Variant &info, uint32_t namespaceId) { 131 BaseProtocol::GetStats(info, namespaceId); 132 132 info["streams"].IsArray(true); 133 133 Variant si; … … 138 138 FOR_MAP(streams, uint32_t, BaseStream *, i) { 139 139 si.Reset(); 140 MAP_VAL(i)->GetStats(si );140 MAP_VAL(i)->GetStats(si, namespaceId); 141 141 info["streams"].PushToArray(si); 142 142 } -
trunk/sources/thelib/src/protocols/rtp/streaming/innetrtpstream.cpp
r597 r637 367 367 } 368 368 369 void InNetRTPStream::GetStats(Variant &info ) {370 BaseInNetStream::GetStats(info );369 void InNetRTPStream::GetStats(Variant &info, uint32_t namespaceId) { 370 BaseInNetStream::GetStats(info, namespaceId); 371 371 info["audio"]["bytesCount"] = _audioBytesCount; 372 372 info["audio"]["packetsCount"] = _audioPacketsCount; -
trunk/sources/thelib/src/protocols/rtp/streaming/outnetrtpudph264stream.cpp
r588 r637 79 79 } 80 80 81 void OutNetRTPUDPH264Stream::GetStats(Variant &info ) {82 BaseOutNetStream::GetStats(info );81 void OutNetRTPUDPH264Stream::GetStats(Variant &info, uint32_t namespaceId) { 82 BaseOutNetStream::GetStats(info, namespaceId); 83 83 info["audio"]["bytesCount"] = _audioBytesCount; 84 84 info["audio"]["packetsCount"] = _audioPacketsCount; -
trunk/sources/thelib/src/protocols/ts/innettsstream.cpp
r561 r637 314 314 } 315 315 316 void InNetTSStream::GetStats(Variant &info ) {317 BaseInNetStream::GetStats(info );316 void InNetTSStream::GetStats(Variant &info, uint32_t namespaceId) { 317 BaseInNetStream::GetStats(info, namespaceId); 318 318 info["audio"]["packetsCount"] = _statsAudioPacketsCount; 319 319 info["audio"]["droppedPacketsCount"] = _audioDroppedPacketsCount; -
trunk/sources/thelib/src/streaming/baseinstream.cpp
r552 r637 51 51 } 52 52 53 void BaseInStream::GetStats(Variant &info ) {54 BaseStream::GetStats(info );53 void BaseInStream::GetStats(Variant &info, uint32_t namespaceId) { 54 BaseStream::GetStats(info, namespaceId); 55 55 LinkedListNode<BaseOutStream *> *pTemp = _pOutStreams; 56 56 info["outStreamsUniqueIds"] = Variant(); -
trunk/sources/thelib/src/streaming/baseoutstream.cpp
r552 r637 106 106 } 107 107 108 void BaseOutStream::GetStats(Variant &info ) {109 BaseStream::GetStats(info );108 void BaseOutStream::GetStats(Variant &info, uint32_t namespaceId) { 109 BaseStream::GetStats(info, namespaceId); 110 110 if (_pInStream != NULL) { 111 info["inStreamUniqueId"] = _pInStream->GetUniqueId();111 info["inStreamUniqueId"] = (((uint64_t) namespaceId) << 32) | _pInStream->GetUniqueId(); 112 112 } else { 113 113 info["inStreamUniqueId"] = Variant(); -
trunk/sources/thelib/src/streaming/basestream.cpp
r410 r637 67 67 } 68 68 69 void BaseStream::GetStats(Variant &info ) {70 info["uniqueId"] = _uniqueId;69 void BaseStream::GetStats(Variant &info, uint32_t namespaceId) { 70 info["uniqueId"] = (((uint64_t) namespaceId) << 32) | _uniqueId; 71 71 info["type"] = tagToString(_type); 72 72 info["name"] = _name; -
trunk/sources/thelib/src/streaming/innetrawstream.cpp
r484 r637 52 52 } 53 53 54 void InNetRawStream::GetStats(Variant &info ) {55 BaseInNetStream::GetStats(info );54 void InNetRawStream::GetStats(Variant &info, uint32_t namespaceId) { 55 BaseInNetStream::GetStats(info, namespaceId); 56 56 info["audio"]["bytesCount"] = _bytesCount; 57 57 info["audio"]["packetsCount"] = _packetsCount; -
trunk/sources/thelib/src/streaming/outnetrawstream.cpp
r487 r637 40 40 } 41 41 42 void OutNetRawStream::GetStats(Variant &info ) {43 BaseOutNetStream::GetStats(info );42 void OutNetRawStream::GetStats(Variant &info, uint32_t namespaceId) { 43 BaseOutNetStream::GetStats(info, namespaceId); 44 44 info["audio"]["bytesCount"] = _bytesCount; 45 45 info["audio"]["packetsCount"] = _packetsCount;
Note: See TracChangeset
for help on using the changeset viewer.
