Changeset 637


Ignore:
Timestamp:
09/16/11 18:14:36 (8 months ago)
Author:
shiretu
Message:

-- added namespace id for all the ids inside stat objects. First 32 bits are the edge id and the last 32 bits are the standard id

Location:
trunk/sources/thelib
Files:
72 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/thelib/include/netio/epoll/inboundnamedpipecarrier.h

    r193 r637  
    3737        virtual bool OnEvent(struct epoll_event &event); 
    3838        virtual operator string(); 
    39         virtual void GetStats(Variant &info); 
     39        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    4040}; 
    4141 
  • trunk/sources/thelib/include/netio/epoll/iohandler.h

    r193 r637  
    6262        static string IOHTToString(IOHandlerType type); 
    6363        virtual operator string() = 0; 
    64         virtual void GetStats(Variant &info) = 0; 
     64        virtual void GetStats(Variant &info, uint32_t namespaceId = 0) = 0; 
    6565}; 
    6666 
  • trunk/sources/thelib/include/netio/epoll/iotimer.h

    r193 r637  
    3636        bool EnqueueForTimeEvent(uint32_t seconds); 
    3737        virtual operator string(); 
    38         virtual void GetStats(Variant &info); 
     38        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    3939}; 
    4040 
  • trunk/sources/thelib/include/netio/epoll/stdiocarrier.h

    r193 r637  
    3838        virtual bool SignalOutputData(); 
    3939        virtual operator string(); 
    40         virtual void GetStats(Variant &info); 
     40        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    4141}; 
    4242 
  • trunk/sources/thelib/include/netio/epoll/tcpacceptor.h

    r616 r637  
    5454        vector<uint64_t> &GetProtocolChain(); 
    5555        virtual operator string(); 
    56         virtual void GetStats(Variant &info); 
     56        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    5757        bool Enable(); 
    5858        void Enable(bool enabled); 
  • trunk/sources/thelib/include/netio/epoll/tcpcarrier.h

    r271 r637  
    4545        virtual bool SignalOutputData(); 
    4646        virtual operator string(); 
    47         virtual void GetStats(Variant &info); 
     47        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    4848 
    4949        sockaddr_in &GetFarEndpointAddress(); 
  • trunk/sources/thelib/include/netio/epoll/tcpconnector.h

    r452 r637  
    164164        } 
    165165 
    166         virtual void GetStats(Variant &info) { 
     166        virtual void GetStats(Variant &info, uint32_t namespaceId = 0) { 
    167167 
    168168        } 
  • trunk/sources/thelib/include/netio/epoll/udpcarrier.h

    r628 r637  
    4545        virtual bool SignalOutputData(); 
    4646        virtual operator string(); 
    47         virtual void GetStats(Variant &info); 
     47        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    4848 
    4949        Variant &GetParameters(); 
  • trunk/sources/thelib/include/netio/kqueue/inboundnamedpipecarrier.h

    r193 r637  
    3737        virtual bool OnEvent(struct kevent &event); 
    3838        virtual operator string(); 
    39         virtual void GetStats(Variant &info); 
     39        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    4040}; 
    4141 
  • trunk/sources/thelib/include/netio/kqueue/iohandler.h

    r193 r637  
    6262        static string IOHTToString(IOHandlerType type); 
    6363        virtual operator string() = 0; 
    64         virtual void GetStats(Variant &info) = 0; 
     64        virtual void GetStats(Variant &info, uint32_t namespaceId = 0) = 0; 
    6565}; 
    6666 
  • trunk/sources/thelib/include/netio/kqueue/iotimer.h

    r193 r637  
    3636        bool EnqueueForTimeEvent(uint32_t seconds); 
    3737        virtual operator string(); 
    38         virtual void GetStats(Variant &info); 
     38        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    3939}; 
    4040 
  • trunk/sources/thelib/include/netio/kqueue/stdiocarrier.h

    r193 r637  
    3838        virtual bool SignalOutputData(); 
    3939        virtual operator string(); 
    40         virtual void GetStats(Variant &info); 
     40        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    4141}; 
    4242 
  • trunk/sources/thelib/include/netio/kqueue/tcpacceptor.h

    r616 r637  
    5454        vector<uint64_t> &GetProtocolChain(); 
    5555        virtual operator string(); 
    56         virtual void GetStats(Variant &info); 
     56        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    5757        bool Enable(); 
    5858        void Enable(bool enabled); 
  • trunk/sources/thelib/include/netio/kqueue/tcpcarrier.h

    r271 r637  
    4343        virtual bool SignalOutputData(); 
    4444        virtual operator string(); 
    45         virtual void GetStats(Variant &info); 
     45        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    4646 
    4747        sockaddr_in &GetFarEndpointAddress(); 
  • trunk/sources/thelib/include/netio/kqueue/tcpconnector.h

    r452 r637  
    165165        } 
    166166 
    167         virtual void GetStats(Variant &info) { 
     167        virtual void GetStats(Variant &info, uint32_t namespaceId = 0) { 
    168168 
    169169        } 
  • trunk/sources/thelib/include/netio/kqueue/udpcarrier.h

    r628 r637  
    4343        virtual bool SignalOutputData(); 
    4444        virtual operator string(); 
    45         virtual void GetStats(Variant &info); 
     45        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    4646 
    4747        Variant &GetParameters(); 
  • trunk/sources/thelib/include/netio/select/inboundnamedpipecarrier.h

    r193 r637  
    3737        virtual bool OnEvent(select_event &event); 
    3838        virtual operator string(); 
    39         virtual void GetStats(Variant &info); 
     39        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    4040}; 
    4141 
  • trunk/sources/thelib/include/netio/select/iohandler.h

    r275 r637  
    9494        static string IOHTToString(IOHandlerType type); 
    9595        virtual operator string() = 0; 
    96         virtual void GetStats(Variant &info) = 0; 
     96        virtual void GetStats(Variant &info, uint32_t namespaceId = 0) = 0; 
    9797}; 
    9898 
  • trunk/sources/thelib/include/netio/select/iotimer.h

    r193 r637  
    3636        bool EnqueueForTimeEvent(uint32_t seconds); 
    3737        virtual operator string(); 
    38         virtual void GetStats(Variant &info); 
     38        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    3939}; 
    4040 
  • trunk/sources/thelib/include/netio/select/stdiocarrier.h

    r193 r637  
    3838        virtual bool SignalOutputData(); 
    3939        virtual operator string(); 
    40         virtual void GetStats(Variant &info); 
     40        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    4141}; 
    4242 
  • trunk/sources/thelib/include/netio/select/tcpacceptor.h

    r616 r637  
    5555        vector<uint64_t> &GetProtocolChain(); 
    5656        virtual operator string(); 
    57         virtual void GetStats(Variant &info); 
     57        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    5858        bool Enable(); 
    5959        void Enable(bool enabled); 
  • trunk/sources/thelib/include/netio/select/tcpcarrier.h

    r271 r637  
    4747        virtual bool SignalOutputData(); 
    4848        virtual operator string(); 
    49         virtual void GetStats(Variant &info); 
     49        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    5050 
    5151        sockaddr_in &GetFarEndpointAddress(); 
  • trunk/sources/thelib/include/netio/select/tcpconnector.h

    r452 r637  
    158158        } 
    159159 
    160         virtual void GetStats(Variant &info) { 
     160        virtual void GetStats(Variant &info, uint32_t namespaceId = 0) { 
    161161 
    162162        } 
  • trunk/sources/thelib/include/netio/select/udpcarrier.h

    r628 r637  
    4343        virtual bool SignalOutputData(); 
    4444        virtual operator string(); 
    45         virtual void GetStats(Variant &info); 
     45        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    4646 
    4747        Variant &GetParameters(); 
  • trunk/sources/thelib/include/protocols/baseprotocol.h

    r496 r637  
    3434        @class BaseProtocol 
    3535        @brief The base class on which all atomic protocols must derive from. 
    36 */ 
     36 */ 
    3737class DLLEXP BaseProtocol { 
    3838private: 
     
    6161        /*! 
    6262                @abstract Returns the type of the protocol 
    63         */ 
     63         */ 
    6464        uint64_t GetType(); 
    6565 
    6666        /*! 
    6767                @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         */ 
    6969        uint32_t GetId(); 
    7070 
    7171        /*! 
    7272                @brief Returns the creation timestamp expressed in milliseconds for 1970 epoch 
    73         */ 
     73         */ 
    7474        double GetSpawnTimestamp(); 
    7575 
    7676        /*!  
    7777                @brief Gets the far protocol 
    78         */ 
     78         */ 
    7979        BaseProtocol *GetFarProtocol(); 
    8080 
     
    8282                @brief Sets the far protocol 
    8383                @param pProtocol 
    84         */ 
     84         */ 
    8585        void SetFarProtocol(BaseProtocol *pProtocol); 
    8686 
    8787        /*! 
    8888                @brief Break the far side of the protocol chain by making far protocol NULL 
    89         */ 
     89         */ 
    9090        void ResetFarProtocol(); 
    9191 
    9292        /*! 
    9393                @brief Gets the near protocol 
    94         */ 
     94         */ 
    9595        BaseProtocol *GetNearProtocol(); 
    9696 
     
    9898                @brief Sets the near protocol 
    9999                @param pProtocol 
    100         */ 
     100         */ 
    101101        void SetNearProtocol(BaseProtocol *pProtocol); 
    102102 
    103103        /*! 
    104104                @brief Break the near side of the protocol chain by making near protocol NULL 
    105         */ 
     105         */ 
    106106        void ResetNearProtocol(); 
    107107 
     
    112112                @param deleteNear: Indicates which protocol to delete. 
    113113                @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         */ 
    115115        void DeleteNearProtocol(bool deleteNear); 
    116116        /*! 
     
    118118                @param deleteNear: Indicates which protocol to delete. 
    119119                @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         */ 
    121121        void DeleteFarProtocol(bool deleteFar); 
    122122 
     
    124124                @brief Gets the far-most protocol in the protocl chain. 
    125125                @discussion Far-end protocol - is the one close to the transport layer 
    126         */ 
    127          
     126         */ 
     127 
    128128        BaseProtocol *GetFarEndpoint(); 
    129129 
     
    131131                @brief Gets the near-most protocol in the protocl chain. 
    132132                @discussion Near-end protocol - is the one close to the business rules layer 
    133         */ 
     133         */ 
    134134        BaseProtocol *GetNearEndpoint(); 
    135135 
    136136        /*! 
    137137                @brief Tests to see if the protocol is enqueued for delete 
    138         */ 
     138         */ 
    139139        bool IsEnqueueForDelete(); 
    140140 
    141141        /*! 
    142142                @brief Gets the protocol's application 
    143         */ 
     143         */ 
    144144        BaseClientApplication * GetApplication(); 
    145145 
     
    149149                @brief Sets the custom parameters in case of outbound protocols 
    150150                @param customParameters: Variant contaitning the custom parameters 
    151         */ 
     151         */ 
    152152        void SetOutboundConnectParameters(Variant &customParameters); 
    153153 
    154154        /*! 
    155155                @brief Gets the custom parameters 
    156         */ 
     156         */ 
    157157        Variant &GetCustomParameters(); 
    158158 
     
    160160                @brief This will return complete information about all protocols in the current stack, including the carrier if available. 
    161161                @param info 
    162         */ 
    163         void GetStackStats(Variant &info); 
     162         */ 
     163        void GetStackStats(Variant &info, uint32_t namespaceId = 0); 
    164164 
    165165        //utility functions 
     
    173173                @brief This is called to initialize internal resources specific to each protocol. This is called before adding the protocol to the stack. 
    174174                @param parameters 
    175         */ 
     175         */ 
    176176        virtual bool Initialize(Variant &parameters); 
    177177 
    178178        /*! 
    179179                @brief Enqueues the protocol to the delete queue imediatly. All transport related routines called from now on, will be ignored. 
    180         */ 
     180         */ 
    181181        virtual void EnqueueForDelete(); 
    182182 
     
    184184                @brief Enqueues the protocol to the delete queue if there is no outstanding outbound data. 
    185185                @param fromFarSide 
    186         */ 
     186         */ 
    187187        virtual void GracefullyEnqueueForDelete(bool fromFarSide = true); 
    188188 
    189189        /*! 
    190190                @brief Returns the IO handler of the protocol chain. 
    191         */ 
     191         */ 
    192192        virtual IOHandler *GetIOHandler(); 
    193193 
     
    195195                @brief Sets the IO Handler of the protocol chain. 
    196196                @param pCarrier 
    197         */ 
     197         */ 
    198198        virtual void SetIOHandler(IOHandler *pCarrier); 
    199199 
    200200        /*! 
    201201                @brief Gets the input buffers 
    202         */ 
     202         */ 
    203203        virtual IOBuffer * GetInputBuffer(); 
    204204 
    205205        /*! 
    206206                @brief Gets the output buffers 
    207         */ 
     207         */ 
    208208        virtual IOBuffer * GetOutputBuffer(); 
    209209 
    210210        /*! 
    211211                @brief Get the total amount of bytes that this protocol transported (raw bytes). 
    212         */ 
     212         */ 
    213213        virtual uint64_t GetDecodedBytesCount(); 
    214214 
    215215        /*! 
    216216                @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         */ 
    218218        virtual bool EnqueueForOutbound(); 
    219219 
     
    221221                @brief Enqueue the current protocol stack for timed event 
    222222                @param seconds 
    223         */ 
     223         */ 
    224224        virtual bool EnqueueForTimeEvent(uint32_t seconds); 
    225225 
    226226        /*! 
    227227                @brief This is invoked by the framework when the protocol is enqueued for timing oprrations 
    228         */ 
     228         */ 
    229229        virtual bool TimePeriodElapsed(); 
    230230 
    231231        /*! 
    232232                @brief This is invoked by the framework when the underlaying system is ready to send more data 
    233         */ 
     233         */ 
    234234        virtual void ReadyForSend(); 
    235235 
    236236        /*! 
    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.  
    238238                @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 protocol 
    240         */ 
     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         */ 
    241241        virtual void SignalInterProtocolEvent(Variant &event); 
    242242 
     
    244244                @brief Sets the protocol's application 
    245245                @param application 
    246         */ 
     246         */ 
    247247        virtual void SetApplication(BaseClientApplication *pApplication); 
    248248 
     
    251251                @param buffer 
    252252                @param pPeerAddress 
    253         */ 
     253         */ 
    254254        virtual bool SignalInputData(IOBuffer &buffer, sockaddr_in *pPeerAddress); 
    255255 
     
    258258                @brief recvAmount 
    259259                @param pPeerAddress 
    260         */ 
     260         */ 
    261261        virtual bool SignalInputData(int32_t recvAmount, sockaddr_in *pPeerAddress); 
    262262 
     
    264264                @brief This will return a Variant containing various statistic information. This should be overridden if more/less info is desired 
    265265                @param info 
    266         */ 
    267         virtual void GetStats(Variant &info); 
     266         */ 
     267        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    268268 
    269269        // 
     
    275275                @param type 
    276276                @discussion This function must be implemented by the class that inherits this class 
    277         */ 
     277         */ 
    278278        virtual bool AllowFarProtocol(uint64_t type) = 0; 
    279279 
     
    282282                @param type 
    283283                @discussion This function must be implemented by the class that inherits this class 
    284         */ 
     284         */ 
    285285        virtual bool AllowNearProtocol(uint64_t type) = 0; 
    286286 
     
    289289                @param recvAmount 
    290290                @discussion This function must be implemented by the class that inherits this class 
    291         */ 
     291         */ 
    292292        virtual bool SignalInputData(int32_t recvAmount) = 0; 
    293293 
     
    296296                @param buffer 
    297297                @discussion This function must be implemented by the class that inherits this class 
    298         */ 
     298         */ 
    299299        virtual bool SignalInputData(IOBuffer &buffer) = 0; 
    300300 
  • trunk/sources/thelib/include/protocols/mms/innetaacstream.h

    r489 r637  
    3737        virtual bool IsCompatibleWithType(uint64_t type); 
    3838        virtual StreamCapabilities * GetCapabilities(); 
    39         virtual void GetStats(Variant &info); 
     39        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    4040        virtual void ReadyForSend(); 
    4141        virtual void SignalOutStreamAttached(BaseOutStream *pOutStream); 
  • trunk/sources/thelib/include/protocols/mms/innetmp3stream.h

    r489 r637  
    3737        virtual bool IsCompatibleWithType(uint64_t type); 
    3838        virtual StreamCapabilities * GetCapabilities(); 
    39         virtual void GetStats(Variant &info); 
     39        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    4040        virtual void ReadyForSend(); 
    4141        virtual void SignalOutStreamAttached(BaseOutStream *pOutStream); 
  • trunk/sources/thelib/include/protocols/rtmp/basertmpprotocol.h

    r608 r637  
    9393        virtual void SetApplication(BaseClientApplication *pApplication); 
    9494 
    95         virtual void GetStats(Variant &info); 
     95        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    9696 
    9797        bool ResetChannel(uint32_t channelId); 
  • trunk/sources/thelib/include/protocols/rtmp/streaming/baseoutnetrtmpstream.h

    r606 r637  
    9292        void CanDropFrames(bool canDropFrames); 
    9393        void SetSendOnStatusPlayMessages(bool value); 
    94         virtual void GetStats(Variant &info); 
     94        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    9595 
    9696        virtual bool FeedData(uint8_t *pData, uint32_t dataLength, 
  • trunk/sources/thelib/include/protocols/rtmp/streaming/innetrtmpstream.h

    r453 r637  
    6161        virtual void ReadyForSend(); 
    6262        virtual bool IsCompatibleWithType(uint64_t type); 
    63         virtual void GetStats(Variant &info); 
     63        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    6464 
    6565        uint32_t GetRTMPStreamId(); 
  • trunk/sources/thelib/include/protocols/rtp/rtspprotocol.h

    r584 r637  
    9090        virtual bool SignalInputData(int32_t recvAmount); 
    9191        virtual bool SignalInputData(IOBuffer &buffer); 
    92         virtual void GetStats(Variant &info); 
     92        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    9393 
    9494        string GetSessionId(); 
  • trunk/sources/thelib/include/protocols/rtp/streaming/innetrtpstream.h

    r589 r637  
    7777        virtual bool FeedAudioData(uint8_t *pData, uint32_t dataLength, 
    7878                        RTPHeader &rtpHeader); 
    79         virtual void GetStats(Variant &info); 
     79        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    8080 
    8181        void ReportSR(uint64_t ntpMicroseconds, uint32_t rtpTimestamp, bool isAudio, 
  • trunk/sources/thelib/include/protocols/rtp/streaming/outnetrtpudph264stream.h

    r586 r637  
    4848        virtual ~OutNetRTPUDPH264Stream(); 
    4949 
    50         virtual void GetStats(Variant &info); 
     50        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    5151 
    5252        virtual bool FeedDataVideo(uint8_t *pData, uint32_t dataLength, 
  • trunk/sources/thelib/include/protocols/ts/innettsstream.h

    r561 r637  
    102102        virtual bool SignalSeek(double &absoluteTimestamp); 
    103103        virtual bool SignalStop(); 
    104         virtual void GetStats(Variant &info); 
     104        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    105105private: 
    106106        bool HandleAudioData(uint8_t *pRawBuffer, uint32_t rawBufferLength, 
  • trunk/sources/thelib/include/streaming/baseinstream.h

    r275 r637  
    2828/*! 
    2929        @class BaseInStream 
    30 */ 
     30 */ 
    3131class DLLEXP BaseInStream 
    3232: public BaseStream { 
     
    4646                @brief Returns information about the stream 
    4747                @param info 
    48         */ 
    49         virtual void GetStats(Variant &info); 
     48         */ 
     49        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    5050 
    5151        /*! 
     
    5353                @param pOutStream - the out-stream to be linked to this in stream. 
    5454                @param reverseLink - if true, pOutStream::Link will be called internally this is used to break the infinite calls. 
    55         */ 
     55         */ 
    5656        virtual bool Link(BaseOutStream *pOutStream, bool reverseLink = true); 
    5757 
     
    6060                @param pOutStream - the out-stream to be unlinked from this in stream. 
    6161                @param reverseUnLink - if true, pOutStream::UnLink will be called internally this is used to break the infinite calls 
    62         */ 
     62         */ 
    6363        virtual bool UnLink(BaseOutStream *pOutStream, bool reverseUnLink = true); 
    6464 
     
    6666                @brief This will start the feeding process 
    6767                @param absoluteTimestamp - the timestamp where we want to seek before start the feeding process 
    68         */ 
     68         */ 
    6969        virtual bool Play(double absoluteTimestamp, double length); 
    7070 
    7171        /*! 
    7272                @brief This will pause the feeding process 
    73         */ 
     73         */ 
    7474        virtual bool Pause(); 
    7575 
    7676        /*! 
    7777                @brief This will resume the feeding process 
    78         */ 
     78         */ 
    7979        virtual bool Resume(); 
    8080 
     
    8282                @brief This will seek to the specified point in time. 
    8383                @param absoluteTimestamp 
    84         */ 
     84         */ 
    8585        virtual bool Seek(double absoluteTimestamp); 
    8686 
    8787        /*! 
    8888                @brief This will stop the feeding process 
    89         */ 
     89         */ 
    9090        virtual bool Stop(); 
    9191 
     
    9393                @brief Called after the link is complete 
    9494                @param pOutStream - the newly added stream 
    95         */ 
     95         */ 
    9696        virtual void SignalOutStreamAttached(BaseOutStream *pOutStream) = 0; 
    9797 
     
    9999                @brief Called after the link is broken 
    100100                @param pOutStream - the removed stream 
    101         */ 
     101         */ 
    102102        virtual void SignalOutStreamDetached(BaseOutStream *pOutStream) = 0; 
    103103}; 
  • trunk/sources/thelib/include/streaming/baseoutstream.h

    r275 r637  
    7474                @param info 
    7575        */ 
    76         virtual void GetStats(Variant &info); 
     76        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    7777 
    7878        /*! 
  • trunk/sources/thelib/include/streaming/basestream.h

    r275 r637  
    8484                @param info 
    8585        */ 
    86         virtual void GetStats(Variant &info); 
     86        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    8787 
    8888        /*! 
  • trunk/sources/thelib/include/streaming/innetrawstream.h

    r484 r637  
    3838        virtual bool IsCompatibleWithType(uint64_t type); 
    3939        virtual StreamCapabilities * GetCapabilities(); 
    40         virtual void GetStats(Variant &info); 
     40        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    4141        virtual void ReadyForSend(); 
    4242        virtual void SignalOutStreamAttached(BaseOutStream *pOutStream); 
  • trunk/sources/thelib/include/streaming/outnetrawstream.h

    r487 r637  
    3535        virtual ~OutNetRawStream(); 
    3636 
    37         virtual void GetStats(Variant &info); 
     37        virtual void GetStats(Variant &info, uint32_t namespaceId = 0); 
    3838        virtual void SignalAttachedToInStream(); 
    3939        virtual void SignalDetachedFromInStream(); 
  • trunk/sources/thelib/src/netio/epoll/inboundnamedpipecarrier.cpp

    r422 r637  
    102102} 
    103103 
    104 void InboundNamedPipeCarrier::GetStats(Variant &info) { 
     104void InboundNamedPipeCarrier::GetStats(Variant &info, uint32_t namespaceId) { 
    105105 
    106106} 
  • trunk/sources/thelib/src/netio/epoll/iotimer.cpp

    r410 r637  
    6060} 
    6161 
    62 void IOTimer::GetStats(Variant &info) { 
     62void IOTimer::GetStats(Variant &info, uint32_t namespaceId) { 
    6363 
    6464} 
  • trunk/sources/thelib/src/netio/epoll/stdiocarrier.cpp

    r410 r637  
    131131} 
    132132 
    133 void StdioCarrier::GetStats(Variant &info) { 
     133void StdioCarrier::GetStats(Variant &info, uint32_t namespaceId) { 
    134134 
    135135} 
  • trunk/sources/thelib/src/netio/epoll/tcpacceptor.cpp

    r617 r637  
    203203} 
    204204 
    205 void TCPAcceptor::GetStats(Variant &info) { 
     205void TCPAcceptor::GetStats(Variant &info, uint32_t namespaceId) { 
    206206        info = _parameters; 
    207         info["id"] = GetId(); 
     207        info["id"] = (((uint64_t) namespaceId) << 32) | GetId(); 
    208208        info["enabled"] = (bool)_enabled; 
    209209        info["acceptedConnectionsCount"] = _acceptedCount; 
    210210        info["droppedConnectionsCount"] = _droppedCount; 
    211211        if (_pApplication != NULL) { 
    212                 info["appId"] = _pApplication->GetId(); 
     212                info["appId"] = (((uint64_t) namespaceId) << 32) | _pApplication->GetId(); 
    213213                info["appName"] = _pApplication->GetName(); 
     214        } else { 
     215                info["appId"] = (((uint64_t) namespaceId) << 32); 
     216                info["appName"] = ""; 
    214217        } 
    215218} 
  • trunk/sources/thelib/src/netio/epoll/tcpcarrier.cpp

    r559 r637  
    126126} 
    127127 
    128 void TCPCarrier::GetStats(Variant &info) { 
     128void TCPCarrier::GetStats(Variant &info, uint32_t namespaceId) { 
    129129        if (!GetEndpointsInfo()) { 
    130130                FATAL("Unable to get endpoints info"); 
  • trunk/sources/thelib/src/netio/epoll/udpcarrier.cpp

    r628 r637  
    8282} 
    8383 
    84 void UDPCarrier::GetStats(Variant &info) { 
     84void UDPCarrier::GetStats(Variant &info, uint32_t namespaceId) { 
    8585        if (!GetEndpointsInfo()) { 
    8686                FATAL("Unable to get endpoints info"); 
  • trunk/sources/thelib/src/netio/kqueue/inboundnamedpipecarrier.cpp

    r422 r637  
    100100} 
    101101 
    102 void InboundNamedPipeCarrier::GetStats(Variant &info) { 
     102void InboundNamedPipeCarrier::GetStats(Variant &info, uint32_t namespaceId) { 
    103103 
    104104} 
  • trunk/sources/thelib/src/netio/kqueue/iotimer.cpp

    r413 r637  
    7171} 
    7272 
    73 void IOTimer::GetStats(Variant &info) { 
     73void IOTimer::GetStats(Variant &info, uint32_t namespaceId) { 
    7474 
    7575} 
  • trunk/sources/thelib/src/netio/kqueue/stdiocarrier.cpp

    r413 r637  
    128128} 
    129129 
    130 void StdioCarrier::GetStats(Variant &info) { 
     130void StdioCarrier::GetStats(Variant &info, uint32_t namespaceId) { 
    131131 
    132132} 
  • trunk/sources/thelib/src/netio/kqueue/tcpacceptor.cpp

    r617 r637  
    198198} 
    199199 
    200 void TCPAcceptor::GetStats(Variant &info) { 
     200void TCPAcceptor::GetStats(Variant &info, uint32_t namespaceId) { 
    201201        info = _parameters; 
    202         info["id"] = GetId(); 
     202        info["id"] = (((uint64_t) namespaceId) << 32) | GetId(); 
    203203        info["enabled"] = (bool)_enabled; 
    204204        info["acceptedConnectionsCount"] = _acceptedCount; 
    205205        info["droppedConnectionsCount"] = _droppedCount; 
    206206        if (_pApplication != NULL) { 
    207                 info["appId"] = _pApplication->GetId(); 
     207                info["appId"] = (((uint64_t) namespaceId) << 32) | _pApplication->GetId(); 
    208208                info["appName"] = _pApplication->GetName(); 
     209        } else { 
     210                info["appId"] = (((uint64_t) namespaceId) << 32); 
     211                info["appName"] = ""; 
    209212        } 
    210213} 
  • trunk/sources/thelib/src/netio/kqueue/tcpcarrier.cpp

    r413 r637  
    122122} 
    123123 
    124 void TCPCarrier::GetStats(Variant &info) { 
     124void TCPCarrier::GetStats(Variant &info, uint32_t namespaceId) { 
    125125        if (!GetEndpointsInfo()) { 
    126126                FATAL("Unable to get endpoints info"); 
  • trunk/sources/thelib/src/netio/kqueue/udpcarrier.cpp

    r628 r637  
    7777} 
    7878 
    79 void UDPCarrier::GetStats(Variant &info) { 
     79void UDPCarrier::GetStats(Variant &info, uint32_t namespaceId) { 
    8080        if (!GetEndpointsInfo()) { 
    8181                FATAL("Unable to get endpoints info"); 
  • trunk/sources/thelib/src/netio/select/inboundnamedpipecarrier.cpp

    r422 r637  
    9595} 
    9696 
    97 void InboundNamedPipeCarrier::GetStats(Variant &info) { 
     97void InboundNamedPipeCarrier::GetStats(Variant &info, uint32_t namespaceId) { 
    9898 
    9999} 
  • trunk/sources/thelib/src/netio/select/iotimer.cpp

    r410 r637  
    6060} 
    6161 
    62 void IOTimer::GetStats(Variant &info) { 
     62void IOTimer::GetStats(Variant &info, uint32_t namespaceId) { 
    6363 
    6464} 
  • trunk/sources/thelib/src/netio/select/stdiocarrier.cpp

    r413 r637  
    128128} 
    129129 
    130 void StdioCarrier::GetStats(Variant &info) { 
     130void StdioCarrier::GetStats(Variant &info, uint32_t namespaceId) { 
    131131 
    132132} 
  • trunk/sources/thelib/src/netio/select/tcpacceptor.cpp

    r617 r637  
    199199} 
    200200 
    201 void TCPAcceptor::GetStats(Variant &info) { 
     201void TCPAcceptor::GetStats(Variant &info, uint32_t namespaceId) { 
    202202        info = _parameters; 
    203         info["id"] = GetId(); 
     203        info["id"] = (((uint64_t) namespaceId) << 32) | GetId(); 
    204204        info["enabled"] = (bool)_enabled; 
    205205        info["acceptedConnectionsCount"] = _acceptedCount; 
    206206        info["droppedConnectionsCount"] = _droppedCount; 
    207207        if (_pApplication != NULL) { 
    208                 info["appId"] = _pApplication->GetId(); 
     208                info["appId"] = (((uint64_t) namespaceId) << 32) | _pApplication->GetId(); 
    209209                info["appName"] = _pApplication->GetName(); 
     210        } else { 
     211                info["appId"] = (((uint64_t) namespaceId) << 32); 
     212                info["appName"] = ""; 
    210213        } 
    211214} 
  • trunk/sources/thelib/src/netio/select/tcpcarrier.cpp

    r413 r637  
    135135} 
    136136 
    137 void TCPCarrier::GetStats(Variant &info) { 
     137void TCPCarrier::GetStats(Variant &info, uint32_t namespaceId) { 
    138138        if (!GetEndpointsInfo()) { 
    139139                FATAL("Unable to get endpoints info"); 
  • trunk/sources/thelib/src/netio/select/udpcarrier.cpp

    r628 r637  
    7777} 
    7878 
    79 void UDPCarrier::GetStats(Variant &info) { 
     79void UDPCarrier::GetStats(Variant &info, uint32_t namespaceId) { 
    8080        if (!GetEndpointsInfo()) { 
    8181                FATAL("Unable to get endpoints info"); 
  • trunk/sources/thelib/src/protocols/baseprotocol.cpp

    r496 r637  
    223223} 
    224224 
    225 void BaseProtocol::GetStackStats(Variant &info) { 
     225void BaseProtocol::GetStackStats(Variant &info, uint32_t namespaceId) { 
    226226        IOHandler *pIOHandler = GetIOHandler(); 
    227227        if (pIOHandler != NULL) { 
    228                 pIOHandler->GetStats(info["carrier"]); 
     228                pIOHandler->GetStats(info["carrier"], namespaceId); 
    229229        } else { 
    230230                info["carrier"] = Variant(); 
     
    233233        while (pTemp != NULL) { 
    234234                Variant item; 
    235                 pTemp->GetStats(item); 
     235                pTemp->GetStats(item, namespaceId); 
    236236                info["stack"].PushToArray(item); 
    237237                pTemp = pTemp->GetNearProtocol(); 
     
    395395} 
    396396 
    397 void BaseProtocol::GetStats(Variant &info) { 
    398         info["id"] = GetId(); 
     397void BaseProtocol::GetStats(Variant &info, uint32_t namespaceId) { 
     398        info["id"] = (((uint64_t) namespaceId) << 32) | GetId(); 
    399399        info["type"] = tagToString(_type); 
    400400        info["creationTimestamp"] = _creationTimestamp; 
     
    406406        info["isEnqueueForDelete"] = (bool)IsEnqueueForDelete(); 
    407407        if (_pApplication != NULL) 
    408                 info["applicationId"] = _pApplication->GetId(); 
     408                info["applicationId"] = (((uint64_t) namespaceId) << 32) | _pApplication->GetId(); 
    409409        else 
    410                 info["applicationId"] = (uint32_t) 0; 
     410                info["applicationId"] = (((uint64_t) namespaceId) << 32); 
    411411} 
    412412 
  • trunk/sources/thelib/src/protocols/mms/innetaacstream.cpp

    r496 r637  
    4545} 
    4646 
    47 void InNetAACStream::GetStats(Variant &info) { 
    48         BaseInNetStream::GetStats(info); 
     47void InNetAACStream::GetStats(Variant &info, uint32_t namespaceId) { 
     48        BaseInNetStream::GetStats(info, namespaceId); 
    4949        info["audio"]["bytesCount"] = _bytesCount; 
    5050        info["audio"]["packetsCount"] = _packetsCount; 
  • trunk/sources/thelib/src/protocols/mms/innetmp3stream.cpp

    r496 r637  
    4545} 
    4646 
    47 void InNetMP3Stream::GetStats(Variant &info) { 
    48         BaseInNetStream::GetStats(info); 
     47void InNetMP3Stream::GetStats(Variant &info, uint32_t namespaceId) { 
     48        BaseInNetStream::GetStats(info, namespaceId); 
    4949        info["audio"]["bytesCount"] = _bytesCount; 
    5050        info["audio"]["packetsCount"] = _packetsCount; 
  • trunk/sources/thelib/src/protocols/rtmp/basertmpprotocol.cpp

    r608 r637  
    202202} 
    203203 
    204 void BaseRTMPProtocol::GetStats(Variant &info) { 
    205         BaseProtocol::GetStats(info); 
     204void BaseRTMPProtocol::GetStats(Variant &info, uint32_t namespaceId) { 
     205        BaseProtocol::GetStats(info, namespaceId); 
    206206        info["rxInvokes"] = _rxInvokes; 
    207207        info["txInvokes"] = _txInvokes; 
     
    209209                if (_streams[i] != NULL) { 
    210210                        Variant si; 
    211                         _streams[i]->GetStats(si); 
     211                        _streams[i]->GetStats(si, namespaceId); 
    212212                        info["streams"].PushToArray(si); 
    213213                } 
     
    216216        FOR_MAP(_inFileStreams, InFileRTMPStream *, InFileRTMPStream *, i) { 
    217217                Variant si; 
    218                 MAP_VAL(i)->GetStats(si); 
     218                MAP_VAL(i)->GetStats(si, namespaceId); 
    219219                info["streams"].PushToArray(si); 
    220220        } 
  • trunk/sources/thelib/src/protocols/rtmp/streaming/baseoutnetrtmpstream.cpp

    r625 r637  
    157157} 
    158158 
    159 void BaseOutNetRTMPStream::GetStats(Variant &info) { 
    160         BaseOutNetStream::GetStats(info); 
     159void BaseOutNetRTMPStream::GetStats(Variant &info, uint32_t namespaceId) { 
     160        BaseOutNetStream::GetStats(info, namespaceId); 
    161161        info["canDropFrames"] = (bool)_canDropFrames; 
    162162        info["audio"]["packetsCount"] = _audioPacketsCount; 
  • trunk/sources/thelib/src/protocols/rtmp/streaming/innetrtmpstream.cpp

    r632 r637  
    7171} 
    7272 
    73 void InNetRTMPStream::GetStats(Variant &info) { 
    74         BaseInNetStream::GetStats(info); 
     73void InNetRTMPStream::GetStats(Variant &info, uint32_t namespaceId) { 
     74        BaseInNetStream::GetStats(info, namespaceId); 
    7575        info["audio"]["packetsCount"] = _audioPacketsCount; 
    7676        info["audio"]["droppedPacketsCount"] = (uint64_t) 0; 
  • trunk/sources/thelib/src/protocols/rtp/rtspprotocol.cpp

    r589 r637  
    128128} 
    129129 
    130 void RTSPProtocol::GetStats(Variant &info) { 
    131         BaseProtocol::GetStats(info); 
     130void RTSPProtocol::GetStats(Variant &info, uint32_t namespaceId) { 
     131        BaseProtocol::GetStats(info, namespaceId); 
    132132        info["streams"].IsArray(true); 
    133133        Variant si; 
     
    138138                FOR_MAP(streams, uint32_t, BaseStream *, i) { 
    139139                        si.Reset(); 
    140                         MAP_VAL(i)->GetStats(si); 
     140                        MAP_VAL(i)->GetStats(si, namespaceId); 
    141141                        info["streams"].PushToArray(si); 
    142142                } 
  • trunk/sources/thelib/src/protocols/rtp/streaming/innetrtpstream.cpp

    r597 r637  
    367367} 
    368368 
    369 void InNetRTPStream::GetStats(Variant &info) { 
    370         BaseInNetStream::GetStats(info); 
     369void InNetRTPStream::GetStats(Variant &info, uint32_t namespaceId) { 
     370        BaseInNetStream::GetStats(info, namespaceId); 
    371371        info["audio"]["bytesCount"] = _audioBytesCount; 
    372372        info["audio"]["packetsCount"] = _audioPacketsCount; 
  • trunk/sources/thelib/src/protocols/rtp/streaming/outnetrtpudph264stream.cpp

    r588 r637  
    7979} 
    8080 
    81 void OutNetRTPUDPH264Stream::GetStats(Variant &info) { 
    82         BaseOutNetStream::GetStats(info); 
     81void OutNetRTPUDPH264Stream::GetStats(Variant &info, uint32_t namespaceId) { 
     82        BaseOutNetStream::GetStats(info, namespaceId); 
    8383        info["audio"]["bytesCount"] = _audioBytesCount; 
    8484        info["audio"]["packetsCount"] = _audioPacketsCount; 
  • trunk/sources/thelib/src/protocols/ts/innettsstream.cpp

    r561 r637  
    314314} 
    315315 
    316 void InNetTSStream::GetStats(Variant &info) { 
    317         BaseInNetStream::GetStats(info); 
     316void InNetTSStream::GetStats(Variant &info, uint32_t namespaceId) { 
     317        BaseInNetStream::GetStats(info, namespaceId); 
    318318        info["audio"]["packetsCount"] = _statsAudioPacketsCount; 
    319319        info["audio"]["droppedPacketsCount"] = _audioDroppedPacketsCount; 
  • trunk/sources/thelib/src/streaming/baseinstream.cpp

    r552 r637  
    5151} 
    5252 
    53 void BaseInStream::GetStats(Variant &info) { 
    54         BaseStream::GetStats(info); 
     53void BaseInStream::GetStats(Variant &info, uint32_t namespaceId) { 
     54        BaseStream::GetStats(info, namespaceId); 
    5555        LinkedListNode<BaseOutStream *> *pTemp = _pOutStreams; 
    5656        info["outStreamsUniqueIds"] = Variant(); 
  • trunk/sources/thelib/src/streaming/baseoutstream.cpp

    r552 r637  
    106106} 
    107107 
    108 void BaseOutStream::GetStats(Variant &info) { 
    109         BaseStream::GetStats(info); 
     108void BaseOutStream::GetStats(Variant &info, uint32_t namespaceId) { 
     109        BaseStream::GetStats(info, namespaceId); 
    110110        if (_pInStream != NULL) { 
    111                 info["inStreamUniqueId"] = _pInStream->GetUniqueId(); 
     111                info["inStreamUniqueId"] = (((uint64_t) namespaceId) << 32) | _pInStream->GetUniqueId(); 
    112112        } else { 
    113113                info["inStreamUniqueId"] = Variant(); 
  • trunk/sources/thelib/src/streaming/basestream.cpp

    r410 r637  
    6767} 
    6868 
    69 void BaseStream::GetStats(Variant &info) { 
    70         info["uniqueId"] = _uniqueId; 
     69void BaseStream::GetStats(Variant &info, uint32_t namespaceId) { 
     70        info["uniqueId"] = (((uint64_t) namespaceId) << 32) | _uniqueId; 
    7171        info["type"] = tagToString(_type); 
    7272        info["name"] = _name; 
  • trunk/sources/thelib/src/streaming/innetrawstream.cpp

    r484 r637  
    5252} 
    5353 
    54 void InNetRawStream::GetStats(Variant &info) { 
    55         BaseInNetStream::GetStats(info); 
     54void InNetRawStream::GetStats(Variant &info, uint32_t namespaceId) { 
     55        BaseInNetStream::GetStats(info, namespaceId); 
    5656        info["audio"]["bytesCount"] = _bytesCount; 
    5757        info["audio"]["packetsCount"] = _packetsCount; 
  • trunk/sources/thelib/src/streaming/outnetrawstream.cpp

    r487 r637  
    4040} 
    4141 
    42 void OutNetRawStream::GetStats(Variant &info) { 
    43         BaseOutNetStream::GetStats(info); 
     42void OutNetRawStream::GetStats(Variant &info, uint32_t namespaceId) { 
     43        BaseOutNetStream::GetStats(info, namespaceId); 
    4444        info["audio"]["bytesCount"] = _bytesCount; 
    4545        info["audio"]["packetsCount"] = _packetsCount; 
Note: See TracChangeset for help on using the changeset viewer.