Changeset 370
- Timestamp:
- 01/06/07 02:51:12 (16 years ago)
- Files:
-
- trunk/libfreebob/src/bebob/bebob_avdevice.cpp (modified) (12 diffs)
- trunk/libfreebob/src/bebob/bebob_avdevice.h (modified) (1 diff)
- trunk/libfreebob/src/bebob/bebob_avdevice_subunit.cpp (modified) (1 diff)
- trunk/libfreebob/src/bebob/bebob_avplug.cpp (modified) (17 diffs)
- trunk/libfreebob/src/bebob/bebob_avplug.h (modified) (5 diffs)
- trunk/libfreebob/src/bebob/bebob_avplug_xml.cpp (modified) (3 diffs)
- trunk/libfreebob/src/bebob/bebob_functionblock.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libfreebob/src/bebob/bebob_avdevice.cpp
r368 r370 46 46 : m_pConfigRom( configRom ) 47 47 , m_1394Service( &ieee1394service ) 48 , m_nodeId( nodeId )49 48 , m_verboseLevel( verboseLevel ) 50 49 , m_plugManager( verboseLevel ) … … 64 63 : m_pConfigRom( 0 ) 65 64 , m_1394Service( 0 ) 66 , m_nodeId( -1 )67 65 , m_verboseLevel( 0 ) 68 66 , m_plugManager( 0 ) … … 131 129 {0x000f1b, 0x00010064}, // ESI, Quatafire 610 132 130 131 {0x00130e, 0x00000003}, // Focusrite, Pro26IO (Saffire 26) 132 133 133 {0x0040ab, 0x00010048}, // EDIROL, FA-101 134 134 {0x0040ab, 0x00010049}, // EDIROL, FA-66 135 136 {0x00130e, 0x00000003}, // Focusrite, Pro26IO (Saffire 26)137 135 }; 138 136 … … 196 194 197 195 PlugInfoCmd plugInfoCmd( m_1394Service ); 198 plugInfoCmd.setNodeId( m_ nodeId);196 plugInfoCmd.setNodeId( m_pConfigRom->getNodeId() ); 199 197 plugInfoCmd.setCommandType( AVCCommand::eCT_Status ); 200 198 plugInfoCmd.setVerbose( m_verboseLevel ); … … 254 252 { 255 253 AvPlug* plug = new AvPlug( *m_1394Service, 256 m_nodeId,254 *m_pConfigRom, 257 255 m_plugManager, 258 256 AVCCommand::eST_Unit, … … 287 285 { 288 286 AvPlug* plug = new AvPlug( *m_1394Service, 289 m_nodeId,287 *m_pConfigRom, 290 288 m_plugManager, 291 289 AVCCommand::eST_Unit, … … 530 528 531 529 subUnitInfoCmd.m_page = 0; 532 subUnitInfoCmd.setNodeId( m_ nodeId);530 subUnitInfoCmd.setNodeId( m_pConfigRom->getNodeId() ); 533 531 subUnitInfoCmd.setVerbose( m_verboseLevel ); 534 532 if ( !subUnitInfoCmd.fire() ) { … … 784 782 unitPlugAddress ) ); 785 783 786 extStreamFormatCmd.setNodeId( m_ nodeId);784 extStreamFormatCmd.setNodeId( m_pConfigRom->getNodeId() ); 787 785 extStreamFormatCmd.setCommandType( AVCCommand::eCT_Status ); 788 786 … … 1147 1145 iso_channel = iec61883_cmp_connect( 1148 1146 m_1394Service->getHandle(), 1149 m_ nodeId| 0xffc0,1147 m_pConfigRom->getNodeId() | 0xffc0, 1150 1148 &plug, 1151 1149 raw1394_get_local_id (m_1394Service->getHandle()), … … 1162 1160 raw1394_get_local_id (m_1394Service->getHandle()), 1163 1161 &hostplug, 1164 m_ nodeId| 0xffc0,1162 m_pConfigRom->getNodeId() | 0xffc0, 1165 1163 &plug, 1166 1164 &m_transmitProcessorBandwidth); … … 1203 1201 iec61883_cmp_disconnect( 1204 1202 m_1394Service->getHandle(), 1205 m_ nodeId| 0xffc0,1203 m_pConfigRom->getNodeId() | 0xffc0, 1206 1204 plug, 1207 1205 raw1394_get_local_id (m_1394Service->getHandle()), … … 1217 1215 raw1394_get_local_id (m_1394Service->getHandle()), 1218 1216 hostplug, 1219 m_ nodeId| 0xffc0,1217 m_pConfigRom->getNodeId() | 0xffc0, 1220 1218 plug, 1221 1219 m_transmitProcessor->getChannel(), trunk/libfreebob/src/bebob/bebob_avdevice.h
r368 r370 148 148 std::auto_ptr<ConfigRom>( m_pConfigRom ); 149 149 Ieee1394Service* m_1394Service; 150 int m_nodeId;151 150 int m_verboseLevel; 152 151 trunk/libfreebob/src/bebob/bebob_avdevice_subunit.cpp
r365 r370 135 135 static_cast<AVCCommand::ESubunitType>( getSubunitType() ); 136 136 AvPlug* plug = new AvPlug( *m_avDevice->get1394Service(), 137 m_avDevice->getConfigRom() .getNodeId(),137 m_avDevice->getConfigRom(), 138 138 m_avDevice->getPlugManager(), 139 139 subunitType, trunk/libfreebob/src/bebob/bebob_avplug.cpp
r365 r370 1 1 /* bebob_avplug.cpp 2 * Copyright (C) 2005,06 by Daniel Wagner2 * Copyright (C) 2005,06,07 by Daniel Wagner 3 3 * 4 4 * This file is part of FreeBoB. … … 20 20 21 21 #include "bebob/bebob_avplug.h" 22 #include "configrom.h" 22 23 23 24 #include "libfreebobavc/ieee1394service.h" … … 32 33 33 34 AvPlug::AvPlug( Ieee1394Service& ieee1394Service, 34 int nodeId,35 ConfigRom& configRom, 35 36 AvPlugManager& plugManager, 36 37 AVCCommand::ESubunitType subunitType, … … 43 44 int verboseLevel ) 44 45 : m_1394Service( &ieee1394Service ) 45 , m_ nodeId( nodeId)46 , m_pConfigRom( &configRom ) 46 47 , m_subunitType( subunitType ) 47 48 , m_subunitId( subunitId ) … … 63 64 "functionBlockId = %d, addressType = %d, " 64 65 "direction = %d, id = %d\n", 65 m_ nodeId,66 m_pConfigRom->getNodeId(), 66 67 m_subunitType, 67 68 m_subunitId, … … 75 76 AvPlug::AvPlug( const AvPlug& rhs ) 76 77 : m_1394Service( rhs.m_1394Service ) 77 , m_ nodeId( rhs.m_nodeId)78 , m_pConfigRom( rhs.m_pConfigRom ) 78 79 , m_subunitType( rhs.m_subunitType ) 79 80 , m_subunitId( rhs.m_subunitId ) … … 106 107 if ( !discoverPlugType() ) { 107 108 debugError( "discover: Could not discover plug type (%d,%d,%d,%d,%d)\n", 108 m_ nodeId, m_subunitType, m_subunitId, m_direction, m_id );109 m_pConfigRom->getNodeId(), m_subunitType, m_subunitId, m_direction, m_id ); 109 110 return false; 110 111 } … … 112 113 if ( !discoverName() ) { 113 114 debugError( "Could not discover name (%d,%d,%d,%d,%d)\n", 114 m_ nodeId, m_subunitType, m_subunitId, m_direction, m_id );115 m_pConfigRom->getNodeId(), m_subunitType, m_subunitId, m_direction, m_id ); 115 116 return false; 116 117 } … … 119 120 debugError( "Could not discover number of channels " 120 121 "(%d,%d,%d,%d,%d)\n", 121 m_ nodeId, m_subunitType, m_subunitId, m_direction, m_id );122 m_pConfigRom->getNodeId(), m_subunitType, m_subunitId, m_direction, m_id ); 122 123 return false; 123 124 } … … 126 127 debugError( "Could not discover channel positions " 127 128 "(%d,%d,%d,%d,%d)\n", 128 m_ nodeId, m_subunitType, m_subunitId, m_direction, m_id );129 m_pConfigRom->getNodeId(), m_subunitType, m_subunitId, m_direction, m_id ); 129 130 return false; 130 131 } … … 133 134 debugError( "Could not discover channel name " 134 135 "(%d,%d,%d,%d,%d)\n", 135 m_ nodeId, m_subunitType, m_subunitId, m_direction, m_id );136 m_pConfigRom->getNodeId(), m_subunitType, m_subunitId, m_direction, m_id ); 136 137 return false; 137 138 } … … 140 141 debugError( "Could not discover channel name " 141 142 "(%d,%d,%d,%d,%d)\n", 142 m_ nodeId, m_subunitType, m_subunitId, m_direction, m_id );143 m_pConfigRom->getNodeId(), m_subunitType, m_subunitId, m_direction, m_id ); 143 144 return false; 144 145 } … … 147 148 debugError( "Could not discover stream format " 148 149 "(%d,%d,%d,%d,%d)\n", 149 m_ nodeId, m_subunitType, m_subunitId, m_direction, m_id );150 m_pConfigRom->getNodeId(), m_subunitType, m_subunitId, m_direction, m_id ); 150 151 return false; 151 152 } … … 154 155 debugError( "Could not discover supported stream formats " 155 156 "(%d,%d,%d,%d,%d)\n", 156 m_ nodeId, m_subunitType, m_subunitId, m_direction, m_id );157 m_pConfigRom->getNodeId(), m_subunitType, m_subunitId, m_direction, m_id ); 157 158 return false; 158 159 } … … 987 988 } 988 989 989 extPlugInfoCmd.setNodeId( m_ nodeId);990 extPlugInfoCmd.setNodeId( m_pConfigRom->getNodeId() ); 990 991 extPlugInfoCmd.setCommandType( AVCCommand::eCT_Status ); 991 992 extPlugInfoCmd.setSubunitId( m_subunitId ); … … 1062 1063 } 1063 1064 1064 extStreamFormatInfoCmd.setNodeId( m_ nodeId);1065 extStreamFormatInfoCmd.setNodeId( m_pConfigRom->getNodeId() ); 1065 1066 extStreamFormatInfoCmd.setCommandType( AVCCommand::eCT_Status ); 1066 1067 extStreamFormatInfoCmd.setSubunitId( m_subunitId ); … … 1101 1102 } 1102 1103 1103 signalSourceCmd.setNodeId( m_ nodeId);1104 signalSourceCmd.setNodeId( m_pConfigRom->getNodeId() ); 1104 1105 signalSourceCmd.setSubunitType( AVCCommand::eST_Unit ); 1105 1106 signalSourceCmd.setSubunitId( 0xff ); trunk/libfreebob/src/bebob/bebob_avplug.h
r336 r370 1 1 /* bebob_avplug.h 2 * Copyright (C) 2005,06 by Daniel Wagner2 * Copyright (C) 2005,06,07 by Daniel Wagner 3 3 * 4 4 * This file is part of FreeBoB. … … 33 33 34 34 class Ieee1394Service; 35 class ConfigRom; 35 36 36 37 namespace BeBoB { … … 71 72 // \todo This constructors sucks. too many parameters. fix it. 72 73 AvPlug( Ieee1394Service& ieee1394Service, 73 int m_nodeId,74 ConfigRom& configRom, 74 75 AvPlugManager& plugManager, 75 76 AVCCommand::ESubunitType subunitType, … … 132 133 133 134 void showPlug() const; 134 135 135 136 136 137 struct ChannelInfo { 137 138 stream_position_t m_streamPosition; … … 197 198 private: 198 199 Ieee1394Service* m_1394Service; 199 int m_nodeId;200 ConfigRom* m_pConfigRom; 200 201 AVCCommand::ESubunitType m_subunitType; 201 202 subunit_id_t m_subunitId; trunk/libfreebob/src/bebob/bebob_avplug_xml.cpp
r336 r370 1 1 /* bebob_avplug_xml.cpp 2 * Copyright (C) 2006 by Daniel Wagner2 * Copyright (C) 2006,07 by Daniel Wagner 3 3 * 4 4 * This file is part of FreeBoB. … … 22 22 23 23 #include "bebob/bebob_avplug.h" 24 #include "configrom.h" 24 25 25 26 #include "libfreebobavc/ieee1394service.h" … … 86 87 free( result ); 87 88 88 asprintf( &result, "%d", m_ nodeId);89 asprintf( &result, "%d", m_pConfigRom->getNodeId() ); 89 90 if ( !xmlNewChild( connection, 0, 90 91 BAD_CAST "Node", BAD_CAST result ) ) { trunk/libfreebob/src/bebob/bebob_functionblock.cpp
r341 r370 1 1 /* bebob_functionblock.cpp 2 * Copyright (C) 2006 by Daniel Wagner2 * Copyright (C) 2006,07 by Daniel Wagner 3 3 * 4 4 * This file is part of FreeBoB. … … 101 101 AvPlug* plug = new AvPlug( 102 102 *( m_subunit->getAvDevice().get1394Service() ), 103 m_subunit->getAvDevice().getConfigRom() .getNodeId(),103 m_subunit->getAvDevice().getConfigRom(), 104 104 m_subunit->getAvDevice().getPlugManager(), 105 105 m_subunit->getSubunitType(),