Ticket #261: ffado-2.0.0.patch
File ffado-2.0.0.patch, 3.7 kB (added by adi, 14 years ago) |
---|
-
a/src/libieee1394/IsoHandler.cpp
old new 84 84 , m_Client( 0 ) 85 85 , m_speed( RAW1394_ISO_SPEED_400 ) 86 86 , m_prebuffers( 0 ) 87 , m_dont_exit_iterate_loop( true )88 87 , m_State( eHS_Stopped ) 89 88 , m_NextState( eHS_Stopped ) 90 89 , m_switch_on_cycle(0) … … 424 423 #endif 425 424 426 425 // iterate the client if required 427 if(m_Client) { 428 enum raw1394_iso_disposition retval = m_Client->putPacket(data, length, channel, tag, sy, pkt_ctr, dropped_cycles); 429 if (retval == RAW1394_ISO_OK) { 430 if (m_dont_exit_iterate_loop) { 431 return RAW1394_ISO_OK; 432 } else { 433 m_dont_exit_iterate_loop = true; 434 debugOutput(DEBUG_LEVEL_VERBOSE, 435 "(%p) loop exit requested\n", 436 this); 437 return RAW1394_ISO_DEFER; 438 } 439 } else { 440 return retval; 441 } 442 } 426 if(m_Client) 427 return m_Client->putPacket(data, length, channel, tag, sy, pkt_ctr, dropped_cycles); 443 428 444 429 return RAW1394_ISO_OK; 445 430 } … … 574 559 this, getTypeString(), *length, m_max_packet_size); 575 560 } 576 561 #endif 577 if (retval == RAW1394_ISO_OK) {578 if (m_dont_exit_iterate_loop) {579 return RAW1394_ISO_OK;580 } else {581 m_dont_exit_iterate_loop = true;582 debugOutput(DEBUG_LEVEL_VERBOSE,583 "(%p) loop exit requested\n",584 this);585 return RAW1394_ISO_DEFER;586 }587 } else {588 562 return retval; 589 }590 563 } 591 564 592 565 *tag = 0; -
a/src/libieee1394/IsoHandler.h
old new 142 142 143 143 bool canIterateClient(); // FIXME: implement with functor 144 144 145 /**146 * @brief request that the handler exits the packet processing loop ASAP147 *148 * The raw1394 lib doesn't provide a means to stop the packet iteration loop149 * except when the iterate callback returns a DEFER value. Calling this function150 * will make the callback return DEFER ASAP.151 */152 void requestIterateLoopExit() {m_dont_exit_iterate_loop = false;};153 /**154 * @brief allow the handler to stay in the packet processing loop155 *156 * This resets the state set by requestIterateLoopExit()157 */158 void allowIterateLoop() {m_dont_exit_iterate_loop = true;};159 160 145 161 146 /** 162 147 * @brief get last cycle number seen by handler … … 202 187 203 188 enum raw1394_iso_speed m_speed; 204 189 unsigned int m_prebuffers; 205 bool m_dont_exit_iterate_loop;206 190 207 191 // the state machine 208 192 enum EHandlerStates { -
a/src/libieee1394/IsoHandlerManager.cpp
old new 258 258 if (h->canIterateClient()) { 259 259 events = POLLIN | POLLPRI; 260 260 no_one_to_poll = false; 261 // if we are going to poll() it, let's ensure262 // it can run until someone wants it to exit263 h->allowIterateLoop();264 261 } 265 262 m_poll_fds_shadow[i].events = events; 266 263 }