- Timestamp:
- 01/01/08 13:27:35 (16 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/src/libstreaming/generic/StreamProcessor.cpp
r797 r798 444 444 } 445 445 446 unsigned int ctr; 447 int now_cycles; 448 int cycle_diff; 449 446 450 if(m_last_cycle == -1) { 447 451 debugOutput(DEBUG_LEVEL_VERBOSE, "Handler for %s SP %p is alive (cycle = %d)\n", getTypeString(), this, cycle); … … 458 462 debugWarning("(%p) dropped %d packets on cycle %u (last_cycle=%u, dropped=%d)\n", this, dropped_cycles, cycle, m_last_cycle, dropped); 459 463 m_dropped += dropped_cycles; 460 // flushDebugOutput(); 461 // assert(0); 464 // HACK: this should not be necessary, since the header generation functions should trigger the xrun. 465 // but apparently there are some issues with the 1394 stack 466 m_in_xrun = true; 467 if(m_state == ePS_Running) { 468 debugShowBackLogLines(200); 469 debugWarning("dropped packets xrun\n"); 470 debugOutput(DEBUG_LEVEL_VERBOSE, "Should update state to WaitingForStreamDisable due to dropped packets xrun\n"); 471 m_next_state = ePS_WaitingForStreamDisable; 472 // execute the requested change 473 if (!updateState()) { // we are allowed to change the state directly 474 debugError("Could not update state!\n"); 475 return RAW1394_ISO_ERROR; 476 } 477 goto send_empty_packet; 478 } 462 479 } 463 480 } … … 483 500 // we the packet we are constructing will be sent out 484 501 // on 'cycle', not 'now'. 485 unsigned intctr = m_1394service.getCycleTimer();486 intnow_cycles = (int)CYCLE_TIMER_GET_CYCLES(ctr);502 ctr = m_1394service.getCycleTimer(); 503 now_cycles = (int)CYCLE_TIMER_GET_CYCLES(ctr); 487 504 488 505 // the difference between the cycle this 489 506 // packet is intended for and 'now' 490 intcycle_diff = diffCycles(cycle, now_cycles);507 cycle_diff = diffCycles(cycle, now_cycles); 491 508 492 509 if(cycle_diff < 0 && (m_state == ePS_Running || m_state == ePS_DryRunning)) {