Changeset 784
- Timestamp:
- 12/29/07 03:39:55 (15 years ago)
- Files:
-
- trunk/libffado/src/devicemanager.cpp (modified) (2 diffs)
- trunk/libffado/src/genericavc/avc_avdevice.cpp (modified) (1 diff)
- trunk/libffado/src/genericavc/avc_avdevice.h (modified) (2 diffs)
- trunk/libffado/src/libieee1394/IsoHandlerManager.cpp (modified) (1 diff)
- trunk/libffado/src/libstreaming/StreamProcessorManager.cpp (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/src/devicemanager.cpp
r777 r784 89 89 DeviceManager::~DeviceManager() 90 90 { 91 delete m_processorManager;92 93 91 for ( FFADODeviceVectorIterator it = m_avDevices.begin(); 94 92 it != m_avDevices.end(); … … 100 98 delete *it; 101 99 } 100 101 // the SP's are automatically unregistered at the SPM 102 delete m_processorManager; 102 103 103 104 for ( FunctorVectorIterator it = m_busreset_functors.begin(); trunk/libffado/src/genericavc/avc_avdevice.cpp
r750 r784 57 57 getConfigRom().getNodeId() ); 58 58 addOption(Util::OptionContainer::Option("snoopMode",false)); 59 } 60 61 AvDevice::~AvDevice() 62 { 63 for ( StreamProcessorVectorIterator it = m_receiveProcessors.begin(); 64 it != m_receiveProcessors.end(); 65 ++it ) 66 { 67 delete *it; 68 } 69 for ( StreamProcessorVectorIterator it = m_transmitProcessors.begin(); 70 it != m_transmitProcessors.end(); 71 ++it ) 72 { 73 delete *it; 74 } 59 75 } 60 76 trunk/libffado/src/genericavc/avc_avdevice.h
r750 r784 49 49 public: 50 50 AvDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )); 51 virtual ~AvDevice() {};52 51 virtual ~AvDevice(); 52 53 53 static bool probe( ConfigRom& configRom ); 54 54 virtual bool discover(); … … 95 95 // streaming stuff 96 96 typedef std::vector< Streaming::StreamProcessor * > StreamProcessorVector; 97 typedef std::vector< Streaming::StreamProcessor * >::iterator StreamProcessorVectorIterator; 97 98 StreamProcessorVector m_receiveProcessors; 98 99 StreamProcessorVector m_transmitProcessors; trunk/libffado/src/libieee1394/IsoHandlerManager.cpp
r782 r784 56 56 { 57 57 stopHandlers(); 58 pruneHandlers(); 59 if(m_IsoHandlers.size() > 0) { 60 debugError("Still some handlers in use\n"); 61 } 58 62 if (m_Thread) { 59 63 m_Thread->Stop(); trunk/libffado/src/libstreaming/StreamProcessorManager.cpp
r783 r784 120 120 { 121 121 if ( *it == processor ) { 122 if (*it == m_SyncSource) { 123 debugOutput(DEBUG_LEVEL_VERBOSE, "unregistering sync source"); 124 m_SyncSource = NULL; 125 } 122 126 m_ReceiveProcessors.erase(it); 123 127 return true; … … 132 136 { 133 137 if ( *it == processor ) { 138 if (*it == m_SyncSource) { 139 debugOutput(DEBUG_LEVEL_VERBOSE, "unregistering sync source"); 140 m_SyncSource = NULL; 141 } 134 142 m_TransmitProcessors.erase(it); 135 143 return true; … … 289 297 290 298 bool StreamProcessorManager::syncStartAll() { 299 if(m_SyncSource == NULL) return false; 291 300 // figure out when to get the SP's running. 292 301 // the xmit SP's should also know the base timestamp … … 434 443 StreamProcessorManager::alignReceivedStreams() 435 444 { 445 if(m_SyncSource == NULL) return false; 436 446 #define ALIGN_AVERAGE_TIME_MSEC 200 437 447 #define NB_ALIGN_TRIES 40 … … 659 669 */ 660 670 bool StreamProcessorManager::waitForPeriod() { 671 if(m_SyncSource == NULL) return false; 661 672 int time_till_next_period; 662 673 bool xrun_occurred = false; 663 674 664 675 debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "enter...\n"); 665 666 assert(m_SyncSource);667 676 668 677 time_till_next_period=m_SyncSource->getTimeUntilNextPeriodSignalUsecs(); … … 839 848 */ 840 849 bool StreamProcessorManager::transfer(enum StreamProcessor::eProcessorType t) { 850 if(m_SyncSource == NULL) return false; 841 851 debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "transfer(%d) at TS=%011llu (%03us %04uc %04ut)...\n", 842 852 t, m_time_of_transfer, … … 909 919 */ 910 920 bool StreamProcessorManager::transferSilence(enum StreamProcessor::eProcessorType t) { 921 if(m_SyncSource == NULL) return false; 911 922 debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "transferSilence(%d) at TS=%011llu (%03us %04uc %04ut)...\n", 912 923 t, m_time_of_transfer,