Changeset 60
- Timestamp:
- 02/10/05 14:53:35 (18 years ago)
- Files:
-
- trunk/freebob/src/avdevice.cpp (modified) (2 diffs)
- trunk/freebob/src/avdevice.h (modified) (1 diff)
- trunk/freebob/src/cmhandler.cpp (modified) (2 diffs)
- trunk/freebob/src/cmhandler.h (modified) (2 diffs)
- trunk/freebob/src/freebob.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/freebob/src/avdevice.cpp
r58 r60 27 27 #include "avdeviceaudiosubunit.h" 28 28 #include "avdevicemusicsubunit.h" 29 #include "cmhandler.h" 29 30 30 31 #undef AVC1394_GET_RESPONSE_OPERAN … … 65 66 case eScanAndCreate: 66 67 if ( initialize() == eFBRC_Success ) { 68 // Initiate connection 69 asyncCall( CMHandler::instance(), 70 &CMHandler::createConnection, 71 this ); 67 72 // Put ourself to sleep until a something happends 68 73 sleepCall( this, &AvDevice::execute, eCheckState ); 69 74 } else { 75 asyncCall( CMHandler::instance(), 76 &CMHandler::destroyConnection, 77 this ); 70 78 asyncCall( this, &AvDevice::execute, eDestroy ); 71 79 } trunk/freebob/src/avdevice.h
r58 r60 101 101 unsigned char m_iNbAsyncDestinationPlugs; 102 102 unsigned char m_iNbAsyncSourcePlugs; 103 unsigned char m_iNbIsoDestinationPlugs; // iPCR104 unsigned char m_iNbIsoSourcePlugs; // oPCR103 unsigned char m_iNbIsoDestinationPlugs; // iPCR 104 unsigned char m_iNbIsoSourcePlugs; // oPCR 105 105 unsigned char m_iNbExtDestinationPlugs; 106 106 unsigned char m_iNbExtSourcePlugs; trunk/freebob/src/cmhandler.cpp
r43 r60 21 21 #include "cmhandler.h" 22 22 #include "ieee1394service.h" 23 #include "avdevice.h" 23 24 24 25 CMHandler* CMHandler::m_pInstance = 0; … … 72 73 return m_pInstance; 73 74 } 75 76 FBReturnCodes 77 CMHandler::createConnection( AvDevice* avDevice ) 78 { 79 80 // First start with the play direction. 81 unsigned int iNoOfIPCR = avDevice->getNbIsoDestinationPlugs(); 82 83 if ( iNoOfIPCR == 0 ) { 84 debugError( "No iPCR found\n" ); 85 return eFBRC_NoOfIPCRNotCorrect; 86 } 87 88 // BeBob devices have two iPCR 89 // iPCR 0: IsoStream/AudioInput 90 // iPCR 1: Synch/SynchInput 91 92 if ( iNoOfIPCR != 2 ) { 93 debugError( "Not correct number iPCR founds on target. " 94 "Expected 2, found %d\n", iNoOfIPCR ); 95 return eFBRC_NoOfIPCRNotCorrect; 96 } 97 98 // Create external connection 99 100 101 102 // Internal connection are not configureable on BeBob device... gladly 103 104 105 106 // Second configure record direction. 107 unsigned int iNoOfOPCR = avDevice->getNbIsoSourcePlugs(); 108 109 if ( iNoOfOPCR == 0 ) { 110 debugError( "No oPCR found\n" ); 111 return eFBRC_NoOfOPCRNotCorrect; 112 } 113 114 // BeBob devices have two iPCR 115 // oPCR 0: IsoStream/Output 116 // oPCR 1: Synch/SynchOut 117 118 if ( iNoOfOPCR != 2 ) { 119 debugError( "Not correct number oPCR founds on target. " 120 "Expected 2, found %d\n", iNoOfOPCR ); 121 return eFBRC_NoOfOPCRNotCorrect; 122 } 123 124 125 debugPrint( DEBUG_LEVEL_INFO, "Connection established\n" ); 126 return eFBRC_Success; 127 } 128 129 FBReturnCodes 130 CMHandler::destroyConnection( AvDevice* avDevice ) 131 { 132 133 return eFBRC_Success; 134 } trunk/freebob/src/cmhandler.h
r43 r60 26 26 27 27 class Ieee1394Service; 28 class AvDevice; 28 29 29 30 class CMHandler … … 34 35 35 36 static CMHandler* instance(); 37 FBReturnCodes createConnection( AvDevice* avDevice ); 38 FBReturnCodes destroyConnection( AvDevice* avDevice ); 39 36 40 private: 37 41 CMHandler(); trunk/freebob/src/freebob.h
r48 r60 34 34 eFBRC_AvDeviceNotFound = -6, 35 35 eFBRC_CreatingAvDeviceFailed = -7, 36 eFBRC_NoOfIPCRNotCorrect = -8, 37 eFBRC_NoOfOPCRNotCorrect = -9, 36 38 } FBReturnCodes; 37 39