Changeset 211

Show
Ignore:
Timestamp:
05/21/06 12:41:05 (16 years ago)
Author:
pieterpalmers
Message:

- fixed recursion problem

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/libfreebob-2.0/src/libstreaming/AmdtpStreamProcessor.cpp

    r210 r211  
    5757        // this has to be done before allocating the buffers,  
    5858        // because this sets the buffersizes from the processormanager 
    59         if((err=((ReceiveStreamProcessor *)this)->init())) { 
     59        if((err=TransmitStreamProcessor::init())) { 
    6060                debugFatal("Could not allocate memory event ringbuffer (%d)",err); 
    6161                return err; 
     
    120120 
    121121        // call the parent init 
    122         return ((TransmitStreamProcessor *)this)->init(); 
     122        return TransmitStreamProcessor::init(); 
    123123} 
    124124 
    125125void AmdtpTransmitStreamProcessor::setVerboseLevel(int l) { 
    126126        setDebugLevel(l); 
    127         ((TransmitStreamProcessor *)this)->setVerboseLevel(l); 
     127        TransmitStreamProcessor::setVerboseLevel(l); 
    128128} 
    129129 
     
    190190        // reset all non-device specific stuff 
    191191        // i.e. the iso stream and the associated ports 
    192         ((TransmitStreamProcessor *)this)->reset(); 
     192        TransmitStreamProcessor::reset(); 
    193193} 
    194194 
     
    199199        // prepare all non-device specific stuff 
    200200        // i.e. the iso stream and the associated ports 
    201         ((TransmitStreamProcessor *)this)->prepare(); 
     201        TransmitStreamProcessor::prepare(); 
    202202 
    203203        // after preparing, we should transfer the port buffer contents to the event buffer 
     
    234234        // this has to be done before allocating the buffers,  
    235235        // because this sets the buffersizes from the processormanager 
    236         if((err=((ReceiveStreamProcessor *)this)->init())) { 
     236        if((err=ReceiveStreamProcessor::init())) { 
    237237                debugFatal("Could not allocate memory event ringbuffer (%d)",err); 
    238238                return err; 
     
    297297void AmdtpReceiveStreamProcessor::setVerboseLevel(int l) { 
    298298        setDebugLevel(l); 
    299 //      ((ReceiveStreamProcessor *)this)->setVerboseLevel(l); 
     299//      ReceiveStreamProcessor::setVerboseLevel(l); 
    300300 
    301301} 
     
    311311        // reset all non-device specific stuff 
    312312        // i.e. the iso stream and the associated ports 
    313         ((ReceiveStreamProcessor *)this)->reset(); 
     313        ReceiveStreamProcessor::reset(); 
    314314} 
    315315 
     
    320320        // prepare all non-device specific stuff 
    321321        // i.e. the iso stream and the associated ports 
    322         ((ReceiveStreamProcessor *)this)->prepare(); 
     322        ReceiveStreamProcessor::prepare(); 
    323323} 
    324324 
  • branches/libfreebob-2.0/src/libstreaming/PortManager.cpp

    r210 r211  
    3434namespace FreebobStreaming { 
    3535 
    36 // IMPL_DEBUG_MODULE( PortManager, PortManager, DEBUG_LEVEL_NORMAL ); 
     36IMPL_DEBUG_MODULE( PortManager, PortManager, DEBUG_LEVEL_NORMAL ); 
    3737 
    3838PortManager::PortManager() { 
     
    4646int PortManager::addPort(Port *port) 
    4747{ 
    48 //    debugOutput( DEBUG_LEVEL_VERBOSE, "enter...\n"); 
     48      debugOutput( DEBUG_LEVEL_VERBOSE, "enter...\n"); 
    4949        assert(port); 
    5050 
    5151        switch(port->getBufferType()) { 
    5252        case (Port::E_PacketBuffered): 
    53 //            debugOutput( DEBUG_LEVEL_VERBOSE, "Adding packet buffered port %s\n",port->getName().c_str()); 
     53              debugOutput( DEBUG_LEVEL_VERBOSE, "Adding packet buffered port %s\n",port->getName().c_str()); 
    5454                m_PacketPorts.push_back(port); 
    5555                break; 
    5656        case Port::E_PeriodBuffered: 
    57 //            debugOutput( DEBUG_LEVEL_VERBOSE, "Adding period buffered port %s\n",port->getName().c_str()); 
     57              debugOutput( DEBUG_LEVEL_VERBOSE, "Adding period buffered port %s\n",port->getName().c_str()); 
    5858                m_PeriodPorts.push_back(port); 
    5959                break; 
     
    6262                break;*/ 
    6363        default: 
    64 //            debugFatal("Unsupported port type!"); 
     64              debugFatal("Unsupported port type!"); 
    6565                return -1; 
    6666        } 
     
    7171int PortManager::deletePort(Port *port) 
    7272{ 
    73 //    debugOutput( DEBUG_LEVEL_VERBOSE, "enter...\n"); 
     73      debugOutput( DEBUG_LEVEL_VERBOSE, "enter...\n"); 
    7474        assert(port); 
    75 //    debugOutput( DEBUG_LEVEL_VERBOSE, "deleting port %s\n",port->getName().c_str()); 
     75      debugOutput( DEBUG_LEVEL_VERBOSE, "deleting port %s\n",port->getName().c_str()); 
    7676 
    7777    for ( PortVectorIterator it = m_PacketPorts.begin(); 
  • branches/libfreebob-2.0/src/libstreaming/PortManager.h

    r210 r211  
    5959//      PortVector m_SamplePorts; 
    6060 
    61 //     DECLARE_DEBUG_MODULE; 
     61    DECLARE_DEBUG_MODULE; 
    6262 
    6363}; 
  • branches/libfreebob-2.0/src/libstreaming/StreamProcessor.cpp

    r210 r211  
    3434 
    3535IMPL_DEBUG_MODULE( StreamProcessor, StreamProcessor, DEBUG_LEVEL_NORMAL ); 
    36 // IMPL_DEBUG_MODULE( ReceiveStreamProcessor, ReceiveStreamProcessor, DEBUG_LEVEL_NORMAL ); 
    37 // IMPL_DEBUG_MODULE( TransmitStreamProcessor, TransmitStreamProcessor, DEBUG_LEVEL_NORMAL ); 
     36IMPL_DEBUG_MODULE( ReceiveStreamProcessor, ReceiveStreamProcessor, DEBUG_LEVEL_NORMAL ); 
     37IMPL_DEBUG_MODULE( TransmitStreamProcessor, TransmitStreamProcessor, DEBUG_LEVEL_NORMAL ); 
    3838 
    3939StreamProcessor::StreamProcessor(enum IsoStream::EStreamType type, int channel, int port, int framerate)  
     
    9191 
    9292 
    93         return ((IsoStream *)this)->init(); 
     93        return IsoStream::init(); 
    9494} 
    9595 
     
    101101 
    102102        // loop over the ports to reset them 
    103         ((PortManager *)this)->reset(); 
     103        PortManager::reset(); 
    104104 
    105105        // reset the iso stream 
    106         ((IsoStream *)this)->reset(); 
     106        IsoStream::reset(); 
    107107 
    108108} 
     
    113113// TODO: implement 
    114114        // loop over the ports to reset them 
    115         ((PortManager *)this)->prepare(); 
     115        PortManager::prepare(); 
    116116 
    117117        // reset the iso stream 
    118         ((IsoStream *)this)->prepare(); 
     118        IsoStream::prepare(); 
    119119 
    120120} 
     
    130130void StreamProcessor::setVerboseLevel(int l) { 
    131131        setDebugLevel(l); 
    132         ((IsoStream *)this)->setVerboseLevel(l); 
    133         ((PortManager *)this)->setVerboseLevel(l); 
     132        IsoStream::setVerboseLevel(l); 
     133        PortManager::setVerboseLevel(l); 
    134134 
    135135} 
     
    156156} 
    157157 
    158 // void ReceiveStreamProcessor::setVerboseLevel(int l) { 
    159 //    setDebugLevel(l); 
    160 //  
    161 // /* StreamProcessor *parent; 
    162 //    parent=dynamic_cast<StreamProcessor *>(this); 
    163 //  
    164 //    assert(parent); 
    165 //  
    166 //    parent->setVerboseLevel(l); 
    167 //     ((StreamProcessor *)this)->setVerboseLevel(l); 
    168 // */ 
    169 //
     158void ReceiveStreamProcessor::setVerboseLevel(int l) { 
     159      setDebugLevel(l); 
     160 
     161/*    StreamProcessor *parent; 
     162      parent=dynamic_cast<StreamProcessor *>(this); 
     163 
     164      assert(parent); 
     165 
     166      parent->setVerboseLevel(l); 
     167       StreamProcessor::setVerboseLevel(l); 
     168*/ 
     169
    170170 
    171171 
     
    188188        return 0; 
    189189} 
    190 /* 
     190 
    191191void TransmitStreamProcessor::setVerboseLevel(int l) { 
    192192        setDebugLevel(l); 
    193         ((StreamProcessor *)this)->setVerboseLevel(l); 
    194  
    195 }*/ 
     193        StreamProcessor::setVerboseLevel(l); 
    196194 
    197195} 
     196 
     197} 
  • branches/libfreebob-2.0/src/libstreaming/StreamProcessor.h

    r207 r211  
    7878        virtual int init(); 
    7979 
    80         void setVerboseLevel(int l); 
     80        virtual void setVerboseLevel(int l); 
    8181 
    8282protected: 
     
    114114                      unsigned char channel, unsigned char tag, unsigned char sy,  
    115115                          unsigned int cycle, unsigned int dropped); 
    116 //    virtual void setVerboseLevel(int l); 
     116      virtual void setVerboseLevel(int l); 
    117117 
    118118protected: 
    119119 
    120 //     DECLARE_DEBUG_MODULE; 
     120     DECLARE_DEBUG_MODULE; 
    121121 
    122122 
     
    136136                      unsigned char *tag, unsigned char *sy, 
    137137                      int cycle, unsigned int dropped, unsigned int max_length); 
    138 //    virtual void setVerboseLevel(int l); 
     138      virtual void setVerboseLevel(int l); 
    139139 
    140140protected: 
    141141 
    142 //     DECLARE_DEBUG_MODULE; 
     142     DECLARE_DEBUG_MODULE; 
    143143 
    144144