Changeset 234
- Timestamp:
- 05/29/06 12:14:23 (18 years ago)
- Files:
-
- branches/libfreebob-2.0/src/bebob_light/bebob_light_avdevice.cpp (modified) (7 diffs)
- branches/libfreebob-2.0/src/bebob_light/bebob_light_avdevice.h (modified) (2 diffs)
- branches/libfreebob-2.0/src/devicemanager.cpp (modified) (1 diff)
- branches/libfreebob-2.0/src/iavdevice.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/libfreebob-2.0/src/bebob_light/bebob_light_avdevice.cpp
r230 r234 34 34 #include "debugmodule/debugmodule.h" 35 35 36 #include <iostream> 36 #include <iostream> 37 #include <sstream> 37 38 #include <stdint.h> 38 39 … … 49 50 , m_nodeId( nodeId ) 50 51 , m_verboseLevel( verboseLevel ) 52 , m_id(0) 51 53 , m_receiveProcessor ( 0 ) 52 54 , m_receiveProcessorBandwidth ( -1 ) … … 1265 1267 return false; 1266 1268 } 1269 1270 asprintf( &result, "%d", m_id & 0xFF ); 1271 if ( !xmlNewChild( connection, 0, 1272 BAD_CAST "Id", BAD_CAST result ) ) { 1273 debugError( "Couldn't create 'Id' node\n" ); 1274 return false; 1275 } 1267 1276 1268 1277 asprintf( &result, "%d", m_1394Service->getPort() ); … … 1700 1709 { 1701 1710 debugWarning( "showDevice: not implemented\n" ); 1711 } 1712 1713 bool AvDevice::setId( unsigned int id) { 1714 m_id=id; 1715 return true; 1702 1716 } 1703 1717 … … 1792 1806 { 1793 1807 const AvPlug::ChannelInfo* channelInfo = &( *it ); 1794 1808 std::ostringstream portname; 1809 1810 portname << "dev" << m_id << "_" << channelInfo->m_name; 1811 1795 1812 FreebobStreaming::Port *p=NULL; 1796 1813 switch(clusterInfo->m_portType) { … … 1801 1818 case ExtendedPlugInfoClusterInfoSpecificData::ePT_Analog: 1802 1819 p=new FreebobStreaming::AmdtpAudioPort( 1803 channelInfo->m_name,1820 portname.str(), 1804 1821 direction, 1805 1822 // \todo: streaming backend expects indexing starting from 0 … … 1815 1832 case ExtendedPlugInfoClusterInfoSpecificData::ePT_MIDI: 1816 1833 p=new FreebobStreaming::AmdtpMidiPort( 1817 channelInfo->m_name,1834 portname.str(), 1818 1835 direction, 1819 1836 // \todo: streaming backend expects indexing starting from 0 branches/libfreebob-2.0/src/bebob_light/bebob_light_avdevice.h
r225 r234 58 58 virtual bool setSamplingFrequency( ESamplingFrequency samplingFrequency ); 59 59 virtual int getSamplingFrequency( ); 60 61 virtual bool setId(unsigned int id); 60 62 61 63 virtual int getStreamCount(); … … 128 130 nr_of_plugs_t m_serialBusIsochronousOutputPlugs; 129 131 132 unsigned int m_id; 133 130 134 // streaming stuff 131 135 FreebobStreaming::AmdtpReceiveStreamProcessor *m_receiveProcessor; branches/libfreebob-2.0/src/devicemanager.cpp
r221 r234 121 121 if ( avDevice ) { 122 122 m_avDevices.push_back( avDevice ); 123 if (!avDevice->setId(m_avDevices.size())) { 124 debugError("Could not set Id of AvDevice\n"); 125 } 123 126 if ( verboseLevel ) { 124 127 avDevice->showDevice(); branches/libfreebob-2.0/src/iavdevice.h
r225 r234 50 50 virtual int getSamplingFrequency( ) = 0; 51 51 52 virtual bool setId(unsigned int id) = 0; 53 52 54 /// obsolete 53 55 virtual bool addXmlDescription( xmlNodePtr deviceNode ) = 0;