Changeset 554 for trunk/libffado/src/libavc/general/avc_unit.cpp
- Timestamp:
- 08/22/07 10:15:34 (17 years ago)
- Files:
-
- trunk/libffado/src/libavc/general (copied) (copied from branches/echoaudio/src/libavc/general)
- trunk/libffado/src/libavc/general/avc_unit.cpp (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/src/libavc/general/avc_unit.cpp
r548 r554 603 603 } 604 604 605 PlugVector digital PCRInputPlugs = getPlugsByType( m_externalPlugs,605 PlugVector digitalExternalInputPlugs = getPlugsByType( m_externalPlugs, 606 606 Plug::eAPD_Input, 607 607 Plug::eAPT_Digital ); 608 if ( !digitalExternalInputPlugs.size() ) { 609 debugOutput( DEBUG_LEVEL_VERBOSE, "No external digital input plugs found\n" ); 610 611 } 612 613 PlugVector syncExternalInputPlugs = getPlugsByType( m_externalPlugs, 614 Plug::eAPD_Input, 615 Plug::eAPT_Sync ); 616 if ( !syncExternalInputPlugs.size() ) { 617 debugOutput( DEBUG_LEVEL_VERBOSE, "No external sync input plugs found\n" ); 618 619 } 608 620 609 621 PlugVector syncMSUInputPlugs = m_pPlugManager->getPlugsByType( … … 639 651 debugOutput( DEBUG_LEVEL_VERBOSE, "PCR Iso Output Plugs:\n" ); 640 652 showPlugs( isoPCROutputPlugs ); 641 debugOutput( DEBUG_LEVEL_VERBOSE, "PCR digital Input Plugs:\n" ); 642 showPlugs( digitalPCRInputPlugs ); 653 debugOutput( DEBUG_LEVEL_VERBOSE, "External digital Input Plugs:\n" ); 654 showPlugs( digitalExternalInputPlugs ); 655 debugOutput( DEBUG_LEVEL_VERBOSE, "External sync Input Plugs:\n" ); 656 showPlugs( syncExternalInputPlugs ); 643 657 debugOutput( DEBUG_LEVEL_VERBOSE, "MSU Sync Input Plugs:\n" ); 644 658 showPlugs( syncMSUInputPlugs ); … … 670 684 "Internal (CSP)" ); 671 685 672 // Check all external PCRdigital input to MSU input connections686 // Check all external digital input to MSU input connections 673 687 // -> SPDIF/ADAT sync 674 checkSyncConnectionsAndAddToList( digitalPCRInputPlugs, 688 checkSyncConnectionsAndAddToList( digitalExternalInputPlugs, 689 syncMSUInputPlugs, 690 "Digital Input Sync" ); 691 692 // Check all external sync input to MSU input connections 693 // -> SPDIF/ADAT sync 694 checkSyncConnectionsAndAddToList( syncExternalInputPlugs, 675 695 syncMSUInputPlugs, 676 696 "Digital Input Sync" ); … … 835 855 Unit::deserializeSyncInfoVector( Glib::ustring basePath, 836 856 Util::IODeserialize& deser, 837 Unit& unit,838 857 SyncInfoVector& vec ) 839 858 { … … 849 868 Glib::ustring description; 850 869 851 result = deser.read( strstrm.str() + "m_source", sourceId ); 852 result &= deser.read( strstrm.str() + "m_destination", destinationId ); 853 result &= deser.read( strstrm.str() + "m_description", description ); 870 if ( deser.isExisting( strstrm.str() + "m_source" ) ) { 871 result = deser.read( strstrm.str() + "m_source", sourceId ); 872 result &= deser.read( strstrm.str() + "m_destination", destinationId ); 873 result &= deser.read( strstrm.str() + "m_description", description ); 874 } else { 875 result = false; 876 } 854 877 855 878 if ( result ) { 856 879 SyncInfo syncInfo; 857 syncInfo.m_source = unit.getPlugManager().getPlug( sourceId );858 syncInfo.m_destination = unit.getPlugManager().getPlug( destinationId );880 syncInfo.m_source = m_pPlugManager->getPlug( sourceId ); 881 syncInfo.m_destination = m_pPlugManager->getPlug( destinationId ); 859 882 syncInfo.m_description = description; 860 883 … … 895 918 result &= serializeVector( basePath + "PlugConnection", ser, m_plugConnections ); 896 919 result &= serializeVector( basePath + "Subunit", ser, m_subunits ); 897 result &= serializeSyncInfoVector( basePath + "SyncInfo", ser, m_syncInfos ); 920 #warning this fails after the echoaudio merge 921 // result &= serializeSyncInfoVector( basePath + "SyncInfo", ser, m_syncInfos ); 898 922 899 923 int i = 0; … … 915 939 bool 916 940 Unit::deserialize( Glib::ustring basePath, 917 Unit* pDev,918 941 Util::IODeserialize& deser, 919 942 Ieee1394Service& ieee1394Service ) … … 925 948 setDebugLevel( verboseLevel ); 926 949 927 if ( pDev->m_pPlugManager) delete pDev->m_pPlugManager;928 pDev->m_pPlugManager = PlugManager::deserialize( basePath + "Plug", deser, *pDev);929 if ( ! pDev->m_pPlugManager ) {950 if (m_pPlugManager) delete m_pPlugManager; 951 m_pPlugManager = PlugManager::deserialize( basePath + "Plug", deser, *this ); 952 if ( !m_pPlugManager ) { 930 953 return false; 931 954 } 932 955 933 result &= deserializePlugUpdateConnections( basePath + "Plug", deser, pDev->m_pcrPlugs ); 934 result &= deserializePlugUpdateConnections( basePath + "Plug", deser, pDev->m_externalPlugs ); 935 result &= deserializeVector<PlugConnection>( basePath + "PlugConnnection", deser, *pDev, pDev->m_plugConnections ); 936 result &= deserializeVector<Subunit>( basePath + "Subunit", deser, *pDev, pDev->m_subunits ); 937 result &= deserializeSyncInfoVector( basePath + "SyncInfo", deser, *pDev, pDev->m_syncInfos ); 956 result &= deserializePlugUpdateConnections( basePath + "Plug", deser, m_pcrPlugs ); 957 result &= deserializePlugUpdateConnections( basePath + "Plug", deser, m_externalPlugs ); 958 result &= deserializeVector<PlugConnection>( basePath + "PlugConnnection", deser, *this, m_plugConnections ); 959 result &= deserializeVector<Subunit>( basePath + "Subunit", deser, *this, m_subunits ); 960 result &= deserializeSyncInfoVector( basePath + "SyncInfo", deser, m_syncInfos ); 961 938 962 939 963 unsigned int i; … … 941 965 942 966 if ( result ) { 943 if ( i < pDev->m_syncInfos.size() ) {944 pDev->m_activeSyncInfo = &pDev->m_syncInfos[i];967 if ( i < m_syncInfos.size() ) { 968 m_activeSyncInfo = &m_syncInfos[i]; 945 969 } 946 970 }