Changeset 211
- Timestamp:
- 05/21/06 12:41:05 (16 years ago)
- Files:
-
- branches/libfreebob-2.0/src/libstreaming/AmdtpStreamProcessor.cpp (modified) (8 diffs)
- branches/libfreebob-2.0/src/libstreaming/PortManager.cpp (modified) (4 diffs)
- branches/libfreebob-2.0/src/libstreaming/PortManager.h (modified) (1 diff)
- branches/libfreebob-2.0/src/libstreaming/StreamProcessor.cpp (modified) (7 diffs)
- branches/libfreebob-2.0/src/libstreaming/StreamProcessor.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/libfreebob-2.0/src/libstreaming/AmdtpStreamProcessor.cpp
r210 r211 57 57 // this has to be done before allocating the buffers, 58 58 // because this sets the buffersizes from the processormanager 59 if((err= ((ReceiveStreamProcessor *)this)->init())) {59 if((err=TransmitStreamProcessor::init())) { 60 60 debugFatal("Could not allocate memory event ringbuffer (%d)",err); 61 61 return err; … … 120 120 121 121 // call the parent init 122 return ((TransmitStreamProcessor *)this)->init();122 return TransmitStreamProcessor::init(); 123 123 } 124 124 125 125 void AmdtpTransmitStreamProcessor::setVerboseLevel(int l) { 126 126 setDebugLevel(l); 127 ((TransmitStreamProcessor *)this)->setVerboseLevel(l);127 TransmitStreamProcessor::setVerboseLevel(l); 128 128 } 129 129 … … 190 190 // reset all non-device specific stuff 191 191 // i.e. the iso stream and the associated ports 192 ((TransmitStreamProcessor *)this)->reset();192 TransmitStreamProcessor::reset(); 193 193 } 194 194 … … 199 199 // prepare all non-device specific stuff 200 200 // i.e. the iso stream and the associated ports 201 ((TransmitStreamProcessor *)this)->prepare();201 TransmitStreamProcessor::prepare(); 202 202 203 203 // after preparing, we should transfer the port buffer contents to the event buffer … … 234 234 // this has to be done before allocating the buffers, 235 235 // because this sets the buffersizes from the processormanager 236 if((err= ((ReceiveStreamProcessor *)this)->init())) {236 if((err=ReceiveStreamProcessor::init())) { 237 237 debugFatal("Could not allocate memory event ringbuffer (%d)",err); 238 238 return err; … … 297 297 void AmdtpReceiveStreamProcessor::setVerboseLevel(int l) { 298 298 setDebugLevel(l); 299 // ((ReceiveStreamProcessor *)this)->setVerboseLevel(l);299 // ReceiveStreamProcessor::setVerboseLevel(l); 300 300 301 301 } … … 311 311 // reset all non-device specific stuff 312 312 // i.e. the iso stream and the associated ports 313 ((ReceiveStreamProcessor *)this)->reset();313 ReceiveStreamProcessor::reset(); 314 314 } 315 315 … … 320 320 // prepare all non-device specific stuff 321 321 // i.e. the iso stream and the associated ports 322 ((ReceiveStreamProcessor *)this)->prepare();322 ReceiveStreamProcessor::prepare(); 323 323 } 324 324 branches/libfreebob-2.0/src/libstreaming/PortManager.cpp
r210 r211 34 34 namespace FreebobStreaming { 35 35 36 //IMPL_DEBUG_MODULE( PortManager, PortManager, DEBUG_LEVEL_NORMAL );36 IMPL_DEBUG_MODULE( PortManager, PortManager, DEBUG_LEVEL_NORMAL ); 37 37 38 38 PortManager::PortManager() { … … 46 46 int PortManager::addPort(Port *port) 47 47 { 48 //debugOutput( DEBUG_LEVEL_VERBOSE, "enter...\n");48 debugOutput( DEBUG_LEVEL_VERBOSE, "enter...\n"); 49 49 assert(port); 50 50 51 51 switch(port->getBufferType()) { 52 52 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()); 54 54 m_PacketPorts.push_back(port); 55 55 break; 56 56 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()); 58 58 m_PeriodPorts.push_back(port); 59 59 break; … … 62 62 break;*/ 63 63 default: 64 //debugFatal("Unsupported port type!");64 debugFatal("Unsupported port type!"); 65 65 return -1; 66 66 } … … 71 71 int PortManager::deletePort(Port *port) 72 72 { 73 //debugOutput( DEBUG_LEVEL_VERBOSE, "enter...\n");73 debugOutput( DEBUG_LEVEL_VERBOSE, "enter...\n"); 74 74 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()); 76 76 77 77 for ( PortVectorIterator it = m_PacketPorts.begin(); branches/libfreebob-2.0/src/libstreaming/PortManager.h
r210 r211 59 59 // PortVector m_SamplePorts; 60 60 61 //DECLARE_DEBUG_MODULE;61 DECLARE_DEBUG_MODULE; 62 62 63 63 }; branches/libfreebob-2.0/src/libstreaming/StreamProcessor.cpp
r210 r211 34 34 35 35 IMPL_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 );36 IMPL_DEBUG_MODULE( ReceiveStreamProcessor, ReceiveStreamProcessor, DEBUG_LEVEL_NORMAL ); 37 IMPL_DEBUG_MODULE( TransmitStreamProcessor, TransmitStreamProcessor, DEBUG_LEVEL_NORMAL ); 38 38 39 39 StreamProcessor::StreamProcessor(enum IsoStream::EStreamType type, int channel, int port, int framerate) … … 91 91 92 92 93 return ((IsoStream *)this)->init();93 return IsoStream::init(); 94 94 } 95 95 … … 101 101 102 102 // loop over the ports to reset them 103 ((PortManager *)this)->reset();103 PortManager::reset(); 104 104 105 105 // reset the iso stream 106 ((IsoStream *)this)->reset();106 IsoStream::reset(); 107 107 108 108 } … … 113 113 // TODO: implement 114 114 // loop over the ports to reset them 115 ((PortManager *)this)->prepare();115 PortManager::prepare(); 116 116 117 117 // reset the iso stream 118 ((IsoStream *)this)->prepare();118 IsoStream::prepare(); 119 119 120 120 } … … 130 130 void StreamProcessor::setVerboseLevel(int l) { 131 131 setDebugLevel(l); 132 ((IsoStream *)this)->setVerboseLevel(l);133 ((PortManager *)this)->setVerboseLevel(l);132 IsoStream::setVerboseLevel(l); 133 PortManager::setVerboseLevel(l); 134 134 135 135 } … … 156 156 } 157 157 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 //}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::setVerboseLevel(l); 168 */ 169 } 170 170 171 171 … … 188 188 return 0; 189 189 } 190 /* 190 191 191 void TransmitStreamProcessor::setVerboseLevel(int l) { 192 192 setDebugLevel(l); 193 ((StreamProcessor *)this)->setVerboseLevel(l); 194 195 }*/ 193 StreamProcessor::setVerboseLevel(l); 196 194 197 195 } 196 197 } branches/libfreebob-2.0/src/libstreaming/StreamProcessor.h
r207 r211 78 78 virtual int init(); 79 79 80 v oid setVerboseLevel(int l);80 virtual void setVerboseLevel(int l); 81 81 82 82 protected: … … 114 114 unsigned char channel, unsigned char tag, unsigned char sy, 115 115 unsigned int cycle, unsigned int dropped); 116 //virtual void setVerboseLevel(int l);116 virtual void setVerboseLevel(int l); 117 117 118 118 protected: 119 119 120 //DECLARE_DEBUG_MODULE;120 DECLARE_DEBUG_MODULE; 121 121 122 122 … … 136 136 unsigned char *tag, unsigned char *sy, 137 137 int cycle, unsigned int dropped, unsigned int max_length); 138 //virtual void setVerboseLevel(int l);138 virtual void setVerboseLevel(int l); 139 139 140 140 protected: 141 141 142 //DECLARE_DEBUG_MODULE;142 DECLARE_DEBUG_MODULE; 143 143 144 144