Changeset 428

Show
Ignore:
Timestamp:
03/01/07 15:26:52 (14 years ago)
Author:
jwoithe
Message:

MOTU: more work trying to get MOTU working with the new streaming framework.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/streaming-rework/src/libstreaming/MotuStreamProcessor.cpp

    r425 r428  
    917917            // because we're going to update the buffer again this loop 
    918918            // using writeframes 
    919             m_data_buffer->setBufferTailTimestamp(m_last_timestamp2); 
    920  
    921 debugOutput(DEBUG_LEVEL_VERBOSE,"On enable: last ts2=%lld\n",m_last_timestamp2); 
     919//            m_data_buffer->setBufferTailTimestamp(m_last_timestamp2); 
     920            m_data_buffer->setBufferTailTimestamp(m_last_timestamp); 
     921 
     922debugOutput(DEBUG_LEVEL_VERBOSE,"On enable: last ts=%lld, ts2=%lld = %lld (%p)\n", 
     923  m_last_timestamp, m_last_timestamp2, m_last_timestamp-m_last_timestamp2, 
     924  m_data_buffer); 
     925 
    922926        } else { 
    923927            debugOutput(DEBUG_LEVEL_VERY_VERBOSE, 
     
    965969// Then it's just a matter of adding m_ticks_per_frame rather than frame_size times this. 
    966970uint32_t first_sph = ntohl(*(quadlet_t *)(data+8)); 
     971//uint32_t first_sph = ntohl(*(quadlet_t *)(data+8+(event_length*(n_events-1)))); 
    967972//        m_last_timestamp = ((first_sph & 0x1fff000)>>12)*3072 + (first_sph & 0xfff); 
    968973        m_last_timestamp = CYCLE_TIMER_TO_TICKS(first_sph & 0x1ffffff); 
     
    987992            uint64_t ts=addTicks(m_last_timestamp, 
    988993                                 (uint64_t)(frame_size * m_ticks_per_frame)); 
     994//            uint64_t ts=addTicks(m_last_timestamp, 
     995//                                 (uint64_t)(m_ticks_per_frame)); 
    989996 
    990997            // set the timestamp as if there will be a sample put into 
     
    9931000  ts -= TICKS_PER_SECOND; 
    9941001            m_data_buffer->setBufferTailTimestamp(ts); 
    995 debugOutput(DEBUG_LEVEL_VERBOSE,"%p, last ts=%lld, ts=%lld, lts2=%lld\n", m_data_buffer, m_last_timestamp, ts, m_last_timestamp2); 
     1002//debugOutput(DEBUG_LEVEL_VERBOSE,"%p, last ts=%lld, ts=%lld, lts2=%lld\n", m_data_buffer, m_last_timestamp, ts, m_last_timestamp2); 
    9961003             
    9971004            return RAW1394_ISO_DEFER; 
     
    9991006 
    10001007                debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "put packet...\n"); 
    1001 debugOutput(DEBUG_LEVEL_VERBOSE,"enabled: %p, last ts=%lld, ts2=%lld\n",m_data_buffer, m_last_timestamp, m_last_timestamp2); 
     1008//debugOutput(DEBUG_LEVEL_VERBOSE,"enabled: %p, last ts=%lld, ts2=%lld\n",m_data_buffer, m_last_timestamp, m_last_timestamp2); 
    10021009 
    10031010        //=> process the packet 
  • branches/streaming-rework/src/libstreaming/StreamProcessor.cpp

    r424 r428  
    7373    IsoStream::dumpInfo(); 
    7474    debugOutputShort( DEBUG_LEVEL_NORMAL, "  StreamProcessor info:\n"); 
    75     debugOutputShort( DEBUG_LEVEL_NORMAL, "  Now                   : %011u\n",m_handler->getCycleTimerTicks()); 
     75    if (m_handler) 
     76        debugOutputShort( DEBUG_LEVEL_NORMAL, "  Now                   : %011u\n",m_handler->getCycleTimerTicks()); 
    7677    debugOutputShort( DEBUG_LEVEL_NORMAL, "  Xruns                 : %d\n", m_xruns); 
    7778    debugOutputShort( DEBUG_LEVEL_NORMAL, "  Running               : %d\n", m_running); 
  • branches/streaming-rework/src/motu/motu_avdevice.cpp

    r426 r428  
    7373    // Free ieee1394 bus resources if they have been allocated 
    7474    if (m_p1394Service != NULL) { 
    75         if(m_p1394Service->freeIsoChannel(m_iso_recv_channel)) { 
     75        if (m_iso_recv_channel>=0 && m_p1394Service->freeIsoChannel(m_iso_recv_channel)) { 
    7676            debugOutput(DEBUG_LEVEL_VERBOSE, "Could not free recv iso channel %d\n", m_iso_recv_channel); 
    77              
    7877        } 
    79         if(m_p1394Service->freeIsoChannel(m_iso_send_channel)) { 
     78        if (m_iso_send_channel>=0 && m_p1394Service->freeIsoChannel(m_iso_send_channel)) { 
    8079            debugOutput(DEBUG_LEVEL_VERBOSE, "Could not free send iso channel %d\n", m_iso_send_channel); 
    81              
    8280        } 
    8381    }