Changeset 438
- Timestamp:
- 03/13/07 11:29:11 (16 years ago)
- Files:
-
- branches/streaming-rework/src/bebob/bebob_avdevice.cpp (modified) (17 diffs)
- branches/streaming-rework/src/bebob/bebob_avdevice.h (modified) (1 diff)
- branches/streaming-rework/src/bebob/bebob_avdevice_subunit.cpp (modified) (2 diffs)
- branches/streaming-rework/src/bebob/bebob_avplug.cpp (modified) (9 diffs)
- branches/streaming-rework/src/bebob/bebob_avplug.h (modified) (1 diff)
- branches/streaming-rework/src/bebob/bebob_functionblock.cpp (modified) (1 diff)
- branches/streaming-rework/src/bounce/bounce_avdevice.cpp (modified) (2 diffs)
- branches/streaming-rework/src/bounce/bounce_avdevice.h (modified) (2 diffs)
- branches/streaming-rework/src/dice/dice_avdevice.cpp (modified) (8 diffs)
- branches/streaming-rework/src/dice/dice_avdevice.h (modified) (1 diff)
- branches/streaming-rework/src/freebob-interface.cpp (added)
- branches/streaming-rework/src/freebob-interface.h (added)
- branches/streaming-rework/src/freebob.cpp (modified) (1 diff)
- branches/streaming-rework/src/freebob_streaming.cpp (modified) (1 diff)
- branches/streaming-rework/src/iavdevice.h (modified) (3 diffs)
- branches/streaming-rework/src/libavc/avc_definitions.cpp (modified) (4 diffs)
- branches/streaming-rework/src/libavc/avc_definitions.h (modified) (4 diffs)
- branches/streaming-rework/src/libavc/avc_extended_stream_format.cpp (modified) (2 diffs)
- branches/streaming-rework/src/Makefile.am (modified) (3 diffs)
- branches/streaming-rework/src/maudio/maudio_avdevice.cpp (modified) (2 diffs)
- branches/streaming-rework/src/maudio/maudio_avdevice.h (modified) (1 diff)
- branches/streaming-rework/src/metrichalo/mh_avdevice.cpp (modified) (1 diff)
- branches/streaming-rework/src/metrichalo/mh_avdevice.h (modified) (1 diff)
- branches/streaming-rework/src/motu/motu_avdevice.cpp (modified) (6 diffs)
- branches/streaming-rework/src/motu/motu_avdevice.h (modified) (1 diff)
- branches/streaming-rework/src/rme/rme_avdevice.cpp (modified) (1 diff)
- branches/streaming-rework/src/rme/rme_avdevice.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/streaming-rework/src/bebob/bebob_avdevice.cpp
r436 r438 201 201 } 202 202 203 debugOutput( DEBUG_LEVEL_ NORMAL, "number of iso input plugs = %d\n",203 debugOutput( DEBUG_LEVEL_VERBOSE, "number of iso input plugs = %d\n", 204 204 plugInfoCmd.m_serialBusIsochronousInputPlugs ); 205 debugOutput( DEBUG_LEVEL_ NORMAL, "number of iso output plugs = %d\n",205 debugOutput( DEBUG_LEVEL_VERBOSE, "number of iso output plugs = %d\n", 206 206 plugInfoCmd.m_serialBusIsochronousOutputPlugs ); 207 debugOutput( DEBUG_LEVEL_ NORMAL, "number of external input plugs = %d\n",207 debugOutput( DEBUG_LEVEL_VERBOSE, "number of external input plugs = %d\n", 208 208 plugInfoCmd.m_externalInputPlugs ); 209 debugOutput( DEBUG_LEVEL_ NORMAL, "number of external output plugs = %d\n",209 debugOutput( DEBUG_LEVEL_VERBOSE, "number of external output plugs = %d\n", 210 210 plugInfoCmd.m_externalOutputPlugs ); 211 211 … … 266 266 } 267 267 268 debugOutput( DEBUG_LEVEL_ NORMAL, "plug '%s' found\n",268 debugOutput( DEBUG_LEVEL_VERBOSE, "plug '%s' found\n", 269 269 plug->getName() ); 270 270 m_pcrPlugs.push_back( plug ); … … 298 298 } 299 299 300 debugOutput( DEBUG_LEVEL_ NORMAL, "plug '%s' found\n",300 debugOutput( DEBUG_LEVEL_VERBOSE, "plug '%s' found\n", 301 301 plug->getName() ); 302 302 m_externalPlugs.push_back( plug ); … … 501 501 } 502 502 } 503 debugOutput( DEBUG_LEVEL_ NORMAL,503 debugOutput( DEBUG_LEVEL_VERBOSE, 504 504 "Active Sync Connection: '%s' -> '%s'\n", 505 505 plug->getName(), … … 703 703 704 704 bool 705 AvDevice::setSampl ingFrequency( ESamplingFrequency samplingFrequency)705 AvDevice::setSampleRate( ESampleRate sampleRate ) 706 706 { 707 707 bool snoopMode=false; … … 711 711 712 712 if(snoopMode) { 713 int current_sr=getSamplingFrequency();714 if (current_sr != convertESamplingFrequency( samplingFrequency )) {713 ESampleRate current_sr=getSampleRate(); 714 if (current_sr != sampleRate ) { 715 715 debugError("In snoop mode it is impossible to set the sample rate.\n"); 716 debugError("Please start the client with the correct setting.\n"); 716 debugError("Please start the client with the correct setting (%d).\n", 717 convertESampleRate(sampleRate)); 717 718 return false; 718 719 } … … 721 722 AvPlug* plug = getPlugById( m_pcrPlugs, AvPlug::eAPD_Input, 0 ); 722 723 if ( !plug ) { 723 debugError( " setSampleRate:Could not retrieve iso input plug 0\n" );724 debugError( "Could not retrieve iso input plug 0\n" ); 724 725 return false; 725 726 } … … 727 728 if ( !setSamplingFrequencyPlug( *plug, 728 729 AvPlug::eAPD_Input, 729 samplingFrequency) )730 toAvcSamplingFrequency( sampleRate ) ) ) 730 731 { 731 debugError( " setSampleRate:Setting sample rate failed\n" );732 debugError( "Setting sample rate failed\n" ); 732 733 return false; 733 734 } … … 735 736 plug = getPlugById( m_pcrPlugs, AvPlug::eAPD_Output, 0 ); 736 737 if ( !plug ) { 737 debugError( " setSampleRate:Could not retrieve iso output plug 0\n" );738 debugError( "Could not retrieve iso output plug 0\n" ); 738 739 return false; 739 740 } … … 741 742 if ( !setSamplingFrequencyPlug( *plug, 742 743 AvPlug::eAPD_Output, 743 samplingFrequency) )744 toAvcSamplingFrequency( sampleRate ) ) ) 744 745 { 745 debugError( " setSampleRate:Setting sample rate failed\n" );746 debugError( "Setting sample rate failed\n" ); 746 747 return false; 747 748 } 748 749 749 750 debugOutput( DEBUG_LEVEL_VERBOSE, 750 " setSampleRate:Set sample rate to %d\n",751 convertESampl ingFrequency( samplingFrequency) );751 "Set sample rate to %d\n", 752 convertESampleRate( sampleRate ) ); 752 753 return true; 753 754 } … … 756 757 } 757 758 758 int 759 AvDevice::getSampl ingFrequency( ) {759 ESampleRate 760 AvDevice::getSampleRate( ) { 760 761 AvPlug* inputPlug = getPlugById( m_pcrPlugs, AvPlug::eAPD_Input, 0 ); 761 762 if ( !inputPlug ) { 762 debugError( " setSampleRate: Could not retrieve iso input plug 0\n" );763 return false;763 debugError( "getSampleRate: Could not retrieve iso input plug 0\n" ); 764 return eSF_DontCare; 764 765 } 765 766 AvPlug* outputPlug = getPlugById( m_pcrPlugs, AvPlug::eAPD_Output, 0 ); 766 767 if ( !outputPlug ) { 767 debugError( "setSampleRate: Could not retrieve iso output plug 0\n" ); 768 return false; 769 } 770 771 int samplerate_playback=inputPlug->getSampleRate(); 772 int samplerate_capture=outputPlug->getSampleRate(); 768 debugError( "getSampleRate: Could not retrieve iso output plug 0\n" ); 769 return eSF_DontCare; 770 } 771 772 ESampleRate samplerate_playback=fromAvcSamplingFrequency( 773 parseAvcSamplingFrequency(inputPlug->getSamplingFrequency())); 774 ESampleRate samplerate_capture=fromAvcSamplingFrequency( 775 parseAvcSamplingFrequency(outputPlug->getSamplingFrequency())); 773 776 774 777 if (samplerate_playback != samplerate_capture) { … … 815 818 AVCCommand::eR_Implemented ) ) 816 819 { 817 ESamplingFrequency foundFreq = eSF_ DontCare;820 ESamplingFrequency foundFreq = eSF_AVC_DontCare; 818 821 819 822 FormatInformation* formatInfo = … … 850 853 851 854 if ( !cmdSuccess ) { 852 debugError( "setSampl eRatePlug: Failed to retrieve format info\n" );855 debugError( "setSamplingFrequencyPlug: Failed to retrieve format info\n" ); 853 856 return false; 854 857 } 855 858 856 859 if ( !correctFormatFound ) { 857 debugError( "setSampl eRatePlug: %s plug %d does not support "860 debugError( "setSamplingFrequencyPlug: %s plug %d does not support " 858 861 "sample rate %d\n", 859 862 plug.getName(), 860 863 plug.getPlugId(), 861 convert ESamplingFrequency( samplingFrequency ) );864 convertAvcSamplingFrequency( samplingFrequency ) ); 862 865 return false; 863 866 } … … 869 872 870 873 if ( !extStreamFormatCmd.fire() ) { 871 debugError( "setSampl eRate: Could not set sample rate %d "874 debugError( "setSamplingFrequencyPlug: Could not set sample rate %d " 872 875 "to %s plug %d\n", 873 convert ESamplingFrequency( samplingFrequency ),876 convertAvcSamplingFrequency( samplingFrequency ), 874 877 plug.getName(), 875 878 plug.getPlugId() ); … … 979 982 AvPlug* inputPlug = getPlugById( m_pcrPlugs, AvPlug::eAPD_Input, 0 ); 980 983 if ( !inputPlug ) { 981 debugError( " setSampleRate:Could not retrieve iso input plug 0\n" );984 debugError( "Could not retrieve iso input plug 0\n" ); 982 985 return false; 983 986 } 984 987 AvPlug* outputPlug = getPlugById( m_pcrPlugs, AvPlug::eAPD_Output, 0 ); 985 988 if ( !outputPlug ) { 986 debugError( " setSampleRate:Could not retrieve iso output plug 0\n" );987 return false; 988 } 989 990 int samplerate=outputPlug->getSampleRate();989 debugError( "Could not retrieve iso output plug 0\n" ); 990 return false; 991 } 992 993 ESampleRate samplerate=parseSampleRate(outputPlug->getSampleRate()); 991 994 992 995 debugOutput( DEBUG_LEVEL_VERBOSE, "Initializing receive processor...\n"); … … 996 999 p=new Streaming::AmdtpReceiveStreamProcessor( 997 1000 m_p1394Service->getPort(), 998 samplerate,1001 convertESampleRate(samplerate), 999 1002 outputPlug->getNrOfChannels()); 1000 1003 … … 1021 1024 p=new Streaming::AmdtpReceiveStreamProcessor( 1022 1025 m_p1394Service->getPort(), 1023 samplerate,1026 convertESampleRate(samplerate), 1024 1027 inputPlug->getNrOfChannels()); 1025 1028 } else { 1026 1029 p=new Streaming::AmdtpTransmitStreamProcessor( 1027 1030 m_p1394Service->getPort(), 1028 samplerate,1031 convertESampleRate(samplerate), 1029 1032 inputPlug->getNrOfChannels()); 1030 1033 } branches/streaming-rework/src/bebob/bebob_avdevice.h
r436 r438 66 66 virtual bool discover(); 67 67 68 virtual bool setSamplingFrequency( ESamplingFrequency samplingFrequency);69 virtual int getSamplingFrequency( );68 bool setSampleRate( ESampleRate ); 69 ESampleRate getSampleRate( ); 70 70 71 71 virtual int getStreamCount(); branches/streaming-rework/src/bebob/bebob_avdevice_subunit.cpp
r420 r438 88 88 } 89 89 90 debugOutput( DEBUG_LEVEL_ NORMAL, "number of source plugs = %d\n",90 debugOutput( DEBUG_LEVEL_VERBOSE, "number of source plugs = %d\n", 91 91 plugInfoCmd.m_sourcePlugs ); 92 debugOutput( DEBUG_LEVEL_ NORMAL, "number of destination output "92 debugOutput( DEBUG_LEVEL_VERBOSE, "number of destination output " 93 93 "plugs = %d\n", plugInfoCmd.m_destinationPlugs ); 94 94 … … 154 154 } 155 155 156 debugOutput( DEBUG_LEVEL_ NORMAL, "plug '%s' found\n",156 debugOutput( DEBUG_LEVEL_VERBOSE, "plug '%s' found\n", 157 157 plug->getName() ); 158 158 m_plugs.push_back( plug ); branches/streaming-rework/src/bebob/bebob_avplug.cpp
r420 r438 266 266 AvPlug::getSampleRate() const 267 267 { 268 return convert ESamplingFrequency( static_cast<ESamplingFrequency>( m_samplingFrequency ) );268 return convertAvcSamplingFrequency( static_cast<ESamplingFrequency>( m_samplingFrequency ) ); 269 269 } 270 270 … … 1893 1893 // beer to get into the mood) 1894 1894 1895 printf("\nSummary\n" );1896 printf("-------\n\n" );1897 printf("Nr | AddressType | Direction | SubUnitType | SubUnitId | FunctionBlockType | FunctionBlockId | Id | Type |Name\n" );1898 printf("---+-----------------+-----------+-------------+-----------+-------------------+-----------------+------+--------------+------\n" );1895 debugOutputShort( DEBUG_LEVEL_NORMAL, "\nSummary\n" ); 1896 debugOutputShort( DEBUG_LEVEL_NORMAL, "-------\n\n" ); 1897 debugOutputShort( DEBUG_LEVEL_NORMAL, "Nr | AddressType | Direction | SubUnitType | SubUnitId | FunctionBlockType | FunctionBlockId | Id | Type |Name\n" ); 1898 debugOutputShort( DEBUG_LEVEL_NORMAL, "---+-----------------+-----------+-------------+-----------+-------------------+-----------------+------+--------------+------\n" ); 1899 1899 1900 1900 for ( AvPlugVector::const_iterator it = m_plugs.begin(); … … 1904 1904 AvPlug* plug = *it; 1905 1905 1906 printf("%2d | %15s | %9s | %11s | 0x%02x | 0x%02x | 0x%02x | 0x%02x | %12s | %s\n",1906 debugOutputShort( DEBUG_LEVEL_NORMAL, "%2d | %15s | %9s | %11s | 0x%02x | 0x%02x | 0x%02x | 0x%02x | %12s | %s\n", 1907 1907 plug->getGlobalId(), 1908 1908 avPlugAddressTypeToString( plug->getPlugAddressType() ), … … 1917 1917 } 1918 1918 1919 printf("\nConnections\n" );1920 printf("-----------\n" );1919 debugOutputShort( DEBUG_LEVEL_NORMAL, "\nConnections\n" ); 1920 debugOutputShort( DEBUG_LEVEL_NORMAL, "-----------\n" ); 1921 1921 1922 1922 AvPlugConnectionOwnerVector connections; … … 1943 1943 } 1944 1944 1945 printf("digraph avcconnections {\n" );1945 debugOutputShort( DEBUG_LEVEL_NORMAL, "digraph avcconnections {\n" ); 1946 1946 for ( AvPlugConnectionOwnerVector::iterator it = connections.begin(); 1947 1947 it != connections.end(); … … 1949 1949 { 1950 1950 AvPlugConnection& con = *it; 1951 printf("\t\"(%d) %s\" -> \"(%d) %s\"\n",1951 debugOutputShort( DEBUG_LEVEL_NORMAL, "\t\"(%d) %s\" -> \"(%d) %s\"\n", 1952 1952 con.getSrcPlug().getGlobalId(), 1953 1953 con.getSrcPlug().getName(), … … 1962 1962 if ( plug->getFunctionBlockType() != 0xff ) { 1963 1963 if ( plug->getPlugDirection() == AvPlug::eAPD_Input ) { 1964 printf("\t\"(%d) %s\" -> \"(0x%02x,%d)\"\n",1964 debugOutputShort( DEBUG_LEVEL_NORMAL, "\t\"(%d) %s\" -> \"(0x%02x,%d)\"\n", 1965 1965 plug->getGlobalId(), 1966 1966 plug->getName(), … … 1968 1968 plug->getFunctionBlockId() ); 1969 1969 } else { 1970 printf("\t\"(0x%02x,%d)\" -> \t\"(%d) %s\"\n",1970 debugOutputShort( DEBUG_LEVEL_NORMAL, "\t\"(0x%02x,%d)\" -> \t\"(%d) %s\"\n", 1971 1971 plug->getFunctionBlockType(), 1972 1972 plug->getFunctionBlockId(), … … 1991 1991 { 1992 1992 AvPlug* plug = *it; 1993 printf("\t\"(%d) %s\" [color=%s,style=filled];\n",1993 debugOutputShort( DEBUG_LEVEL_NORMAL, "\t\"(%d) %s\" [color=%s,style=filled];\n", 1994 1994 plug->getGlobalId(), plug->getName(), 1995 1995 colorStrings[plug->getPlugAddressType() ] ); 1996 1996 } 1997 1997 1998 printf("}\n" );1999 printf("Use \"dot -Tps FILENAME.dot -o FILENAME.ps\" "1998 debugOutputShort( DEBUG_LEVEL_NORMAL,"}\n" ); 1999 debugOutputShort( DEBUG_LEVEL_NORMAL, "Use \"dot -Tps FILENAME.dot -o FILENAME.ps\" " 2000 2000 "to generate graph\n"); 2001 2001 branches/streaming-rework/src/bebob/bebob_avplug.h
r435 r438 239 239 struct FormatInfo { 240 240 FormatInfo() 241 : m_samplingFrequency( eSF_ DontCare )241 : m_samplingFrequency( eSF_AVC_DontCare ) 242 242 , m_isSyncStream( false ) 243 243 , m_audioChannels( 0 ) branches/streaming-rework/src/bebob/bebob_functionblock.cpp
r413 r438 123 123 } 124 124 125 debugOutput( DEBUG_LEVEL_ NORMAL, "plug '%s' found\n",125 debugOutput( DEBUG_LEVEL_VERBOSE, "plug '%s' found\n", 126 126 plug->getName() ); 127 127 m_plugs.push_back( plug ); branches/streaming-rework/src/bounce/bounce_avdevice.cpp
r436 r438 52 52 int nodeId ) 53 53 : IAvDevice( configRom, ieee1394service, nodeId ) 54 , m_samplerate ( 44100)54 , m_samplerate (eSF_44100Hz) 55 55 , m_model( NULL ) 56 56 , m_Notifier ( NULL ) … … 124 124 } 125 125 126 int BounceDevice::getSamplingFrequency( ) { 126 ESampleRate 127 BounceDevice::getSampleRate( ) { 127 128 return m_samplerate; 128 129 } 129 130 130 bool BounceDevice::setSamplingFrequency( ESamplingFrequency samplingFrequency ) { 131 int retval=convertESamplingFrequency( samplingFrequency ); 132 if (retval) { 133 m_samplerate=retval; 134 return true; 135 } else return false; 131 bool 132 BounceDevice::setSampleRate( ESampleRate sampleRate ) { 133 m_samplerate=sampleRate; 134 return true; 136 135 } 137 136 branches/streaming-rework/src/bounce/bounce_avdevice.h
r436 r438 73 73 bool discover(); 74 74 75 bool setSampl ingFrequency( ESamplingFrequency samplingFrequency);76 int getSamplingFrequency( );75 bool setSampleRate( ESampleRate ); 76 ESampleRate getSampleRate( ); 77 77 78 78 bool prepare(); … … 90 90 91 91 protected: 92 unsigned intm_samplerate;92 ESampleRate m_samplerate; 93 93 struct VendorModelEntry* m_model; 94 94 branches/streaming-rework/src/dice/dice_avdevice.cpp
r436 r438 138 138 } 139 139 140 int 141 DiceAvDevice::getSampl ingFrequency( ) {142 ESampl ingFrequencysamplingFrequency;140 ESampleRate 141 DiceAvDevice::getSampleRate( ) { 142 ESampleRate samplingFrequency; 143 143 144 144 fb_quadlet_t clockreg; 145 145 if (!readGlobalReg(DICE_REGISTER_GLOBAL_CLOCK_SELECT, &clockreg)) { 146 146 debugError("Could not read CLOCK_SELECT register\n"); 147 return false;147 return eSF_DontCare; 148 148 } 149 149 … … 165 165 } 166 166 167 return convertESamplingFrequency(samplingFrequency);168 } 169 170 bool 171 DiceAvDevice::setSampl ingFrequency( ESamplingFrequencysamplingFrequency )167 return samplingFrequency; 168 } 169 170 bool 171 DiceAvDevice::setSampleRate( ESampleRate samplingFrequency ) 172 172 { 173 173 debugOutput(DEBUG_LEVEL_VERBOSE, "Setting sample rate: %d\n", 174 convertESampl ingFrequency(samplingFrequency));174 convertESampleRate(samplingFrequency)); 175 175 176 176 bool supported=false; … … 228 228 229 229 if (!supported) { 230 debugWarning("Unsupported sample rate: %d\n", convertESampl ingFrequency(samplingFrequency));230 debugWarning("Unsupported sample rate: %d\n", convertESampleRate(samplingFrequency)); 231 231 return false; 232 232 } … … 271 271 fb_octlet_t tmp_octlet; 272 272 273 debugOutput (DEBUG_LEVEL_VERBOSE,273 debugOutputShort(DEBUG_LEVEL_NORMAL, 274 274 "%s %s at node %d\n", m_model->vendor_name, m_model->model_name, 275 275 m_nodeId); 276 276 277 debugOutput (DEBUG_LEVEL_VERBOSE," DICE Parameter Space info:\n");278 debugOutput (DEBUG_LEVEL_VERBOSE," Global : offset=0x%04X size=%04d\n", m_global_reg_offset, m_global_reg_size);279 debugOutput (DEBUG_LEVEL_VERBOSE," TX : offset=0x%04X size=%04d\n", m_tx_reg_offset, m_tx_reg_size);280 debugOutput (DEBUG_LEVEL_VERBOSE," nb=%4d size=%04d\n", m_nb_tx, m_tx_size);281 debugOutput (DEBUG_LEVEL_VERBOSE," RX : offset=0x%04X size=%04d\n", m_rx_reg_offset, m_rx_reg_size);282 debugOutput (DEBUG_LEVEL_VERBOSE," nb=%4d size=%04d\n", m_nb_rx, m_rx_size);283 debugOutput (DEBUG_LEVEL_VERBOSE," UNUSED1 : offset=0x%04X size=%04d\n", m_unused1_reg_offset, m_unused1_reg_size);284 debugOutput (DEBUG_LEVEL_VERBOSE," UNUSED2 : offset=0x%04X size=%04d\n", m_unused2_reg_offset, m_unused2_reg_size);285 286 debugOutput (DEBUG_LEVEL_VERBOSE," Global param space:\n");277 debugOutputShort(DEBUG_LEVEL_NORMAL," DICE Parameter Space info:\n"); 278 debugOutputShort(DEBUG_LEVEL_NORMAL," Global : offset=0x%04X size=%04d\n", m_global_reg_offset, m_global_reg_size); 279 debugOutputShort(DEBUG_LEVEL_NORMAL," TX : offset=0x%04X size=%04d\n", m_tx_reg_offset, m_tx_reg_size); 280 debugOutputShort(DEBUG_LEVEL_NORMAL," nb=%4d size=%04d\n", m_nb_tx, m_tx_size); 281 debugOutputShort(DEBUG_LEVEL_NORMAL," RX : offset=0x%04X size=%04d\n", m_rx_reg_offset, m_rx_reg_size); 282 debugOutputShort(DEBUG_LEVEL_NORMAL," nb=%4d size=%04d\n", m_nb_rx, m_rx_size); 283 debugOutputShort(DEBUG_LEVEL_NORMAL," UNUSED1 : offset=0x%04X size=%04d\n", m_unused1_reg_offset, m_unused1_reg_size); 284 debugOutputShort(DEBUG_LEVEL_NORMAL," UNUSED2 : offset=0x%04X size=%04d\n", m_unused2_reg_offset, m_unused2_reg_size); 285 286 debugOutputShort(DEBUG_LEVEL_NORMAL," Global param space:\n"); 287 287 288 288 readGlobalRegBlock(DICE_REGISTER_GLOBAL_OWNER, (fb_quadlet_t *)&tmp_octlet,sizeof(fb_octlet_t)); 289 debugOutput (DEBUG_LEVEL_VERBOSE," Owner : 0x%016X\n",tmp_octlet);289 debugOutputShort(DEBUG_LEVEL_NORMAL," Owner : 0x%016X\n",tmp_octlet); 290 290 291 291 readGlobalReg(DICE_REGISTER_GLOBAL_NOTIFICATION, &tmp_quadlet); 292 debugOutput (DEBUG_LEVEL_VERBOSE," Notification : 0x%08X\n",tmp_quadlet);292 debugOutputShort(DEBUG_LEVEL_NORMAL," Notification : 0x%08X\n",tmp_quadlet); 293 293 294 294 readGlobalReg(DICE_REGISTER_GLOBAL_NOTIFICATION, &tmp_quadlet); 295 debugOutput (DEBUG_LEVEL_VERBOSE," Nick name : %s\n",getDeviceNickName().c_str());295 debugOutputShort(DEBUG_LEVEL_NORMAL," Nick name : %s\n",getDeviceNickName().c_str()); 296 296 297 297 readGlobalReg(DICE_REGISTER_GLOBAL_CLOCK_SELECT, &tmp_quadlet); 298 debugOutput (DEBUG_LEVEL_VERBOSE," Clock Select : 0x%02X 0x%02X\n",298 debugOutputShort(DEBUG_LEVEL_NORMAL," Clock Select : 0x%02X 0x%02X\n", 299 299 (tmp_quadlet>>8) & 0xFF, tmp_quadlet & 0xFF); 300 300 301 301 readGlobalReg(DICE_REGISTER_GLOBAL_ENABLE, &tmp_quadlet); 302 debugOutput (DEBUG_LEVEL_VERBOSE," Enable : %s\n",302 debugOutputShort(DEBUG_LEVEL_NORMAL," Enable : %s\n", 303 303 (tmp_quadlet&0x1?"true":"false")); 304 304 305 305 readGlobalReg(DICE_REGISTER_GLOBAL_STATUS, &tmp_quadlet); 306 debugOutput (DEBUG_LEVEL_VERBOSE," Clock Status : %s 0x%02X\n",306 debugOutputShort(DEBUG_LEVEL_NORMAL," Clock Status : %s 0x%02X\n", 307 307 (tmp_quadlet&0x1?"locked":"not locked"), (tmp_quadlet>>8) & 0xFF); 308 308 309 309 readGlobalReg(DICE_REGISTER_GLOBAL_EXTENDED_STATUS, &tmp_quadlet); 310 debugOutput (DEBUG_LEVEL_VERBOSE," Extended Status : 0x%08X\n",tmp_quadlet);310 debugOutputShort(DEBUG_LEVEL_NORMAL," Extended Status : 0x%08X\n",tmp_quadlet); 311 311 312 312 readGlobalReg(DICE_REGISTER_GLOBAL_SAMPLE_RATE, &tmp_quadlet); 313 debugOutput (DEBUG_LEVEL_VERBOSE," Samplerate : 0x%08X (%lu)\n",tmp_quadlet,tmp_quadlet);313 debugOutputShort(DEBUG_LEVEL_NORMAL," Samplerate : 0x%08X (%lu)\n",tmp_quadlet,tmp_quadlet); 314 314 315 315 readGlobalReg(DICE_REGISTER_GLOBAL_VERSION, &tmp_quadlet); 316 debugOutput (DEBUG_LEVEL_VERBOSE," Version : 0x%08X (%u.%u.%u.%u)\n",316 debugOutputShort(DEBUG_LEVEL_NORMAL," Version : 0x%08X (%u.%u.%u.%u)\n", 317 317 tmp_quadlet, 318 318 DICE_DRIVER_SPEC_VERSION_NUMBER_GET_A(tmp_quadlet), … … 323 323 324 324 readGlobalReg(DICE_REGISTER_GLOBAL_CLOCKCAPABILITIES, &tmp_quadlet); 325 debugOutput (DEBUG_LEVEL_VERBOSE," Clock caps : 0x%08X\n",tmp_quadlet & 0x1FFF007F);325 debugOutputShort(DEBUG_LEVEL_NORMAL," Clock caps : 0x%08X\n",tmp_quadlet & 0x1FFF007F); 326 326 327 327 diceNameVector names=getClockSourceNameString(); 328 debugOutput (DEBUG_LEVEL_VERBOSE," Clock sources :\n");328 debugOutputShort(DEBUG_LEVEL_NORMAL," Clock sources :\n"); 329 329 330 330 for ( diceNameVectorIterator it = names.begin(); … … 332 332 ++it ) 333 333 { 334 debugOutput (DEBUG_LEVEL_VERBOSE," %s\n", (*it).c_str());335 } 336 337 debugOutput (DEBUG_LEVEL_VERBOSE," TX param space:\n");338 debugOutput (DEBUG_LEVEL_VERBOSE," Nb of xmit : %1d\n", m_nb_tx);334 debugOutputShort(DEBUG_LEVEL_NORMAL," %s\n", (*it).c_str()); 335 } 336 337 debugOutputShort(DEBUG_LEVEL_NORMAL," TX param space:\n"); 338 debugOutputShort(DEBUG_LEVEL_NORMAL," Nb of xmit : %1d\n", m_nb_tx); 339 339 for (unsigned int i=0;i<m_nb_tx;i++) { 340 debugOutput (DEBUG_LEVEL_VERBOSE," Transmitter %d:\n",i);340 debugOutputShort(DEBUG_LEVEL_NORMAL," Transmitter %d:\n",i); 341 341 342 342 readTxReg(i, DICE_REGISTER_TX_ISOC_BASE, &tmp_quadlet); 343 debugOutput (DEBUG_LEVEL_VERBOSE," ISO channel : %3d\n", tmp_quadlet);343 debugOutputShort(DEBUG_LEVEL_NORMAL," ISO channel : %3d\n", tmp_quadlet); 344 344 readTxReg(i, DICE_REGISTER_TX_SPEED_BASE, &tmp_quadlet); 345 debugOutput (DEBUG_LEVEL_VERBOSE," ISO speed : %3d\n", tmp_quadlet);345 debugOutputShort(DEBUG_LEVEL_NORMAL," ISO speed : %3d\n", tmp_quadlet); 346 346 347 347 readTxReg(i, DICE_REGISTER_TX_NB_AUDIO_BASE, &tmp_quadlet); 348 debugOutput (DEBUG_LEVEL_VERBOSE," Nb audio channels : %3d\n", tmp_quadlet);348 debugOutputShort(DEBUG_LEVEL_NORMAL," Nb audio channels : %3d\n", tmp_quadlet); 349 349 readTxReg(i, DICE_REGISTER_TX_MIDI_BASE, &tmp_quadlet); 350 debugOutput (DEBUG_LEVEL_VERBOSE," Nb midi channels : %3d\n", tmp_quadlet);350 debugOutputShort(DEBUG_LEVEL_NORMAL," Nb midi channels : %3d\n", tmp_quadlet); 351 351 352 352 readTxReg(i, DICE_REGISTER_TX_AC3_CAPABILITIES_BASE, &tmp_quadlet); 353 debugOutput (DEBUG_LEVEL_VERBOSE," AC3 caps : 0x%08X\n", tmp_quadlet);353 debugOutputShort(DEBUG_LEVEL_NORMAL," AC3 caps : 0x%08X\n", tmp_quadlet); 354 354 readTxReg(i, DICE_REGISTER_TX_AC3_ENABLE_BASE, &tmp_quadlet); 355 debugOutput (DEBUG_LEVEL_VERBOSE," AC3 enable : 0x%08X\n", tmp_quadlet);355 debugOutputShort(DEBUG_LEVEL_NORMAL," AC3 enable : 0x%08X\n", tmp_quadlet); 356 356 357 357 diceNameVector channel_names=getTxNameString(i); 358 debugOutput (DEBUG_LEVEL_VERBOSE," Channel names :\n");358 debugOutputShort(DEBUG_LEVEL_NORMAL," Channel names :\n"); 359 359 for ( diceNameVectorIterator it = channel_names.begin(); 360 360 it != channel_names.end(); 361 361 ++it ) 362 362 { 363 debugOutput (DEBUG_LEVEL_VERBOSE," %s\n", (*it).c_str());364 } 365 } 366 367 debugOutput (DEBUG_LEVEL_VERBOSE," RX param space:\n");368 debugOutput (DEBUG_LEVEL_VERBOSE," Nb of recv : %1d\n", m_nb_tx);363 debugOutputShort(DEBUG_LEVEL_NORMAL," %s\n", (*it).c_str()); 364 } 365 } 366 367 debugOutputShort(DEBUG_LEVEL_NORMAL," RX param space:\n"); 368 debugOutputShort(DEBUG_LEVEL_NORMAL," Nb of recv : %1d\n", m_nb_tx); 369 369 for (unsigned int i=0;i<m_nb_rx;i++) { 370 debugOutput (DEBUG_LEVEL_VERBOSE," Receiver %d:\n",i);370 debugOutputShort(DEBUG_LEVEL_NORMAL," Receiver %d:\n",i); 371 371 372 372 readTxReg(i, DICE_REGISTER_RX_ISOC_BASE, &tmp_quadlet); 373 debugOutput (DEBUG_LEVEL_VERBOSE," ISO channel : %3d\n", tmp_quadlet);373 debugOutputShort(DEBUG_LEVEL_NORMAL," ISO channel : %3d\n", tmp_quadlet); 374 374 readTxReg(i, DICE_REGISTER_RX_SEQ_START_BASE, &tmp_quadlet); 375 debugOutput (DEBUG_LEVEL_VERBOSE," Sequence start : %3d\n", tmp_quadlet);375 debugOutputShort(DEBUG_LEVEL_NORMAL," Sequence start : %3d\n", tmp_quadlet); 376 376 377 377 readTxReg(i, DICE_REGISTER_RX_NB_AUDIO_BASE, &tmp_quadlet); 378 debugOutput (DEBUG_LEVEL_VERBOSE," Nb audio channels : %3d\n", tmp_quadlet);378 debugOutputShort(DEBUG_LEVEL_NORMAL," Nb audio channels : %3d\n", tmp_quadlet); 379 379 readTxReg(i, DICE_REGISTER_RX_MIDI_BASE, &tmp_quadlet); 380 debugOutput (DEBUG_LEVEL_VERBOSE," Nb midi channels : %3d\n", tmp_quadlet);380 debugOutputShort(DEBUG_LEVEL_NORMAL," Nb midi channels : %3d\n", tmp_quadlet); 381 381 382 382 readTxReg(i, DICE_REGISTER_RX_AC3_CAPABILITIES_BASE, &tmp_quadlet); 383 debugOutput (DEBUG_LEVEL_VERBOSE," AC3 caps : 0x%08X\n", tmp_quadlet);383 debugOutputShort(DEBUG_LEVEL_NORMAL," AC3 caps : 0x%08X\n", tmp_quadlet); 384 384 readTxReg(i, DICE_REGISTER_RX_AC3_ENABLE_BASE, &tmp_quadlet); 385 debugOutput (DEBUG_LEVEL_VERBOSE," AC3 enable : 0x%08X\n", tmp_quadlet);385 debugOutputShort(DEBUG_LEVEL_NORMAL," AC3 enable : 0x%08X\n", tmp_quadlet); 386 386 387 387 diceNameVector channel_names=getRxNameString(i); 388 debugOutput (DEBUG_LEVEL_VERBOSE," Channel names :\n");388 debugOutputShort(DEBUG_LEVEL_NORMAL," Channel names :\n"); 389 389 for ( diceNameVectorIterator it = channel_names.begin(); 390 390 it != channel_names.end(); 391 391 ++it ) 392 392 { 393 debugOutput (DEBUG_LEVEL_VERBOSE," %s\n", (*it).c_str());393 debugOutputShort(DEBUG_LEVEL_NORMAL," %s\n", (*it).c_str()); 394 394 } 395 395 } … … 414 414 bool 415 415 DiceAvDevice::prepare() { 416 int samplerate=getSampl ingFrequency();416 int samplerate=getSampleRate(); 417 417 418 418 // prepare receive SP's 419 for (unsigned int i=0;i<m_nb_tx;i++) { 419 for (unsigned int i=0;i<1;i++) { 420 // for (unsigned int i=0;i<m_nb_tx;i++) { 420 421 fb_quadlet_t nb_audio; 421 422 fb_quadlet_t nb_midi; … … 504 505 505 506 // prepare transmit SP's 506 for (unsigned int i=0;i<m_nb_rx;i++) { 507 for (unsigned int i=0;i<1;i++) { 508 // for (unsigned int i=0;i<m_nb_rx;i++) { 507 509 fb_quadlet_t nb_audio; 508 510 fb_quadlet_t nb_midi; branches/streaming-rework/src/dice/dice_avdevice.h
r436 r438 62 62 void showDevice(); 63 63 64 bool setSampl ingFrequency( ESamplingFrequency samplingFrequency);65 int getSamplingFrequency( );64 bool setSampleRate( ESampleRate ); 65 ESampleRate getSampleRate( ); 66 66 67 67 int getStreamCount(); branches/streaming-rework/src/freebob.cpp
r436 r438 132 132 IAvDevice* avDevice = freebob_handle->m_deviceManager->getAvDevice( node_id ); 133 133 if ( avDevice ) { 134 if ( avDevice->setSampl ingFrequency( parseSampleRate( samplerate ) ) ) {134 if ( avDevice->setSampleRate( parseSampleRate( samplerate ) ) ) { 135 135 return freebob_handle->m_deviceManager->discover()? 0 : -1; 136 136 } branches/streaming-rework/src/freebob_streaming.cpp
r436 r438 162 162 // Set the device's sampling rate to that requested 163 163 // FIXME: does this really belong here? If so we need to handle errors. 164 if (!device->setSampl ingFrequency(parseSampleRate(dev->options.sample_rate))) {164 if (!device->setSampleRate(parseSampleRate(dev->options.sample_rate))) { 165 165 debugOutput(DEBUG_LEVEL_VERBOSE, " => Retry setting samplerate to %d for (%p)\n", 166 166 dev->options.sample_rate, device); 167 167 168 168 // try again: 169 if (!device->setSampl ingFrequency(parseSampleRate(dev->options.sample_rate))) {169 if (!device->setSampleRate(parseSampleRate(dev->options.sample_rate))) { 170 170 delete dev->processorManager; 171 171 delete dev->m_deviceManager; branches/streaming-rework/src/iavdevice.h
r436 r438 22 22 #define IAVDEVICE_H 23 23 24 #include " libavc/avc_definitions.h"24 #include "freebob-interface.h" 25 25 #include "libutil/OptionContainer.h" 26 26 #include "libosc/OscNode.h" 27 #include <ostream> 27 28 28 29 class ConfigRom; … … 32 33 class StreamProcessor; 33 34 } 35 34 36 /*! 35 37 @brief Base class for device support … … 61 63 62 64 /** 63 * @brief Set the samp ing frequency64 * @param sampl ingFrequency65 * @brief Set the sample rate 66 * @param sampleRate 65 67 * @return true if successful 66 68 */ 67 virtual bool setSampl ingFrequency( ESamplingFrequency samplingFrequency) = 0;68 /** 69 * @brief get the sampl ingfrequencyas an integer70 * @return the sampl ing frequency as integer71 */ 72 virtual int getSamplingFrequency( ) = 0;69 virtual bool setSampleRate( ESampleRate sampleRate ) = 0; 70 /** 71 * @brief get the sample rate as an integer 72 * @return the sample rate as ESampleRate 73 */ 74 virtual ESampleRate getSampleRate( ) = 0; 73 75 74 76 /** branches/streaming-rework/src/libavc/avc_definitions.cpp
r415 r438 21 21 #include "avc_definitions.h" 22 22 23 24 23 int 25 convert ESamplingFrequency(ESamplingFrequency freq)24 convertAvcSamplingFrequency(ESamplingFrequency freq) 26 25 { 27 26 int value = 0; 28 27 29 28 switch ( freq ) { 30 case eSF_ 22050Hz:29 case eSF_AVC_22050Hz: 31 30 value = 22050; 32 31 break; 33 case eSF_ 24000Hz:32 case eSF_AVC_24000Hz: 34 33 value = 24000; 35 34 break; 36 case eSF_ 32000Hz:35 case eSF_AVC_32000Hz: 37 36 value = 32000; 38 37 break; 39 case eSF_ 44100Hz:38 case eSF_AVC_44100Hz: 40 39 value = 44100; 41 40 break; 42 case eSF_ 48000Hz:41 case eSF_AVC_48000Hz: 43 42 value = 48000; 44 43 break; 45 case eSF_ 88200Hz:44 case eSF_AVC_88200Hz: 46 45 value = 88200; 47 46 break; 48 case eSF_ 96000Hz:47 case eSF_AVC_96000Hz: 49 48 value = 96000; 50 49 break; 51 case eSF_ 176400Hz:50 case eSF_AVC_176400Hz: 52 51 value = 176400; 53 52 break; 54 case eSF_192000Hz: 55 value = 192000; 56 break; 57 case eSF_AnyLow: 58 value = 48000; 59 break; 60 case eSF_AnyMid: 61 value = 96000; 62 break; 63 case eSF_AnyHigh: 53 case eSF_AVC_192000Hz: 64 54 value = 192000; 65 55 break; … … 73 63 74 64 ESamplingFrequency 75 parse SampleRate( int sampleRate )65 parseAvcSamplingFrequency( int sampleRate ) 76 66 { 77 67 ESamplingFrequency efreq; 78 68 switch ( sampleRate ) { 79 69 case 22050: 80 efreq = eSF_ 22050Hz;70 efreq = eSF_AVC_22050Hz; 81 71 break; 82 72 case 24000: 83 efreq = eSF_ 24000Hz;73 efreq = eSF_AVC_24000Hz; 84 74 break; 85 75 case 32000: 86 efreq = eSF_ 32000Hz;76 efreq = eSF_AVC_32000Hz; 87 77 break; 88 78 case 44100: 89 efreq = eSF_ 44100Hz;79 efreq = eSF_AVC_44100Hz; 90 80 break; 91 81 case 48000: 92 efreq = eSF_ 48000Hz;82 efreq = eSF_AVC_48000Hz; 93 83 break; 94 84 case 88200: 95 efreq = eSF_ 88200Hz;85 efreq = eSF_AVC_88200Hz; 96 86 break; 97 87 case 96000: 98 efreq = eSF_ 96000Hz;88 efreq = eSF_AVC_96000Hz; 99 89 break; 100 90 case 176400: 101 efreq = eSF_ 176400Hz;91 efreq = eSF_AVC_176400Hz; 102 92 break; 103 93 case 192000: 104 efreq = eSF_ 192000Hz;94 efreq = eSF_AVC_192000Hz; 105 95 break; 106 96 default: 107 efreq = eSF_ DontCare;97 efreq = eSF_AVC_DontCare; 108 98 } 109 99 … … 115 105 char* str; 116 106 switch ( samplingFrequency ) { 117 case eSF_ 22050Hz:107 case eSF_AVC_22050Hz: 118 108 str = "22050"; 119 109 break; 120 case eSF_ 24000Hz:110 case eSF_AVC_24000Hz: 121 111 str = "24000"; 122 112 break; 123 case eSF_ 32000Hz:113 case eSF_AVC_32000Hz: 124 114 str = "32000"; 125 115 break; 126 case eSF_ 44100Hz:116 case eSF_AVC_44100Hz: 127 117 str = "44100"; 128 118 break; 129 case eSF_ 48000Hz:119 case eSF_AVC_48000Hz: 130 120 str = "48000"; 131 121 break; 132 case eSF_ 88200Hz:122 case eSF_AVC_88200Hz: 133 123 str = "88200"; 134 124 break; 135 case eSF_ 96000Hz:125 case eSF_AVC_96000Hz: 136 126 str = "96000"; 137 127 break; 138 case eSF_ 176400Hz:128 case eSF_AVC_176400Hz: 139 129 str = "176400"; 140 130 break; 141 case eSF_ 192000Hz:131 case eSF_AVC_192000Hz: 142 132 str = "192000"; 143 133 break; 144 case eSF_ DontCare:134 case eSF_AVC_DontCare: 145 135 default: 146 136 str = "unknown"; … … 148 138 return stream << str; 149 139 }; 140 141 ESamplingFrequency 142 toAvcSamplingFrequency( ESampleRate r ) { 143 int value = 0; 144 145 switch ( r ) { 146 case eSF_22050Hz: 147 return eSF_AVC_22050Hz; 148 case eSF_24000Hz: 149 return eSF_AVC_24000Hz; 150 case eSF_32000Hz: 151 return eSF_AVC_32000Hz; 152 case eSF_44100Hz: 153 return eSF_AVC_44100Hz; 154 case eSF_48000Hz: 155 return eSF_AVC_48000Hz; 156 case eSF_88200Hz: 157 return eSF_AVC_88200Hz; 158 case eSF_96000Hz: 159 return eSF_AVC_96000Hz; 160 case eSF_176400Hz: 161 return eSF_AVC_176400Hz; 162 case eSF_192000Hz: 163 return eSF_AVC_192000Hz; 164 default: 165 return eSF_AVC_DontCare; 166 } 167 } 168 169 ESampleRate 170 fromAvcSamplingFrequency( ESamplingFrequency r ) { 171 int value = 0; 172 173 switch ( r ) { 174 case eSF_AVC_22050Hz: 175 return eSF_22050Hz; 176 case eSF_AVC_24000Hz: 177 return eSF_24000Hz; 178 case eSF_AVC_32000Hz: 179 return eSF_32000Hz; 180 case eSF_AVC_44100Hz: 181 return eSF_44100Hz; 182 case eSF_AVC_48000Hz: 183 return eSF_48000Hz; 184 case eSF_AVC_88200Hz: 185 return eSF_88200Hz; 186 case eSF_AVC_96000Hz: 187 return eSF_96000Hz; 188 case eSF_AVC_176400Hz: 189 return eSF_176400Hz; 190 case eSF_AVC_192000Hz: 191 return eSF_192000Hz; 192 default: 193 return eSF_DontCare; 194 } 195 } branches/streaming-rework/src/libavc/avc_definitions.h
r415 r438 24 24 #include <libavc1394/avc1394.h> 25 25 #include <ostream> 26 #include "freebob-interface.h" 26 27 27 28 typedef byte_t ctype_t; … … 81 82 */ 82 83 enum ESamplingFrequency { 83 eSF_22050Hz = 0x00, 84 eSF_24000Hz = 0x01, 85 eSF_32000Hz = 0x02, 86 eSF_44100Hz = 0x03, 87 eSF_48000Hz = 0x04, 88 eSF_88200Hz = 0x0A, 89 eSF_96000Hz = 0x05, 90 eSF_176400Hz = 0x06, 91 eSF_192000Hz = 0x07, 92 eSF_AnyLow = 0x0B, 93 eSF_AnyMid = 0x0C, 94 eSF_AnyHigh = 0x0D, 95 eSF_None = 0x0E, 96 eSF_DontCare = 0x0F, 84 eSF_AVC_22050Hz = 0x00, 85 eSF_AVC_24000Hz = 0x01, 86 eSF_AVC_32000Hz = 0x02, 87 eSF_AVC_44100Hz = 0x03, 88 eSF_AVC_48000Hz = 0x04, 89 eSF_AVC_88200Hz = 0x0A, 90 eSF_AVC_96000Hz = 0x05, 91 eSF_AVC_176400Hz = 0x06, 92 eSF_AVC_192000Hz = 0x07, 93 eSF_AVC_DontCare = 0x0F, 97 94 }; 98 95 … … 102 99 * @return 103 100 */ 104 int convert ESamplingFrequency(ESamplingFrequency freq);101 int convertAvcSamplingFrequency(ESamplingFrequency freq); 105 102 /** 106 103 * \brief Convert from integer to ESamplingFrequency … … 108 105 * @return 109 106 */ 110 ESamplingFrequency parseSampleRate( int sampleRate ); 107 ESamplingFrequency parseAvcSamplingFrequency( int sampleRate ); 108 109 ESampleRate fromAvcSamplingFrequency( ESamplingFrequency r ); 110 ESamplingFrequency toAvcSamplingFrequency( ESampleRate r ); 111 111 112 112 std::ostream& operator<<( std::ostream& stream, ESamplingFrequency samplingFrequency ); branches/streaming-rework/src/libavc/avc_extended_stream_format.cpp
r413 r438 74 74 : FormatInformationStreams() 75 75 , m_reserved0( 0xff ) 76 , m_samplingFrequency( eSF_ DontCare )76 , m_samplingFrequency( eSF_AVC_DontCare ) 77 77 , m_rateControl( eRC_DontCare ) 78 78 , m_reserved1( 0xff ) … … 135 135 FormatInformationStreamsCompound::FormatInformationStreamsCompound() 136 136 : FormatInformationStreams() 137 , m_samplingFrequency( eSF_ DontCare )137 , m_samplingFrequency( eSF_AVC_DontCare ) 138 138 , m_rateControl( eRC_DontCare ) 139 139 , m_numberOfStreamFormatInfos( 0 ) branches/streaming-rework/src/Makefile.am
r435 r438 17 17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 18 19 INCLUDES = 20 $(LIBRAW1394_CFLAGS) $(LIBIEC61883_CFLAGS)\21 $(LIBAVC1394_CFLAGS)\22 $(LIBXMLCPP_CFLAGS) $(LIBLO_CFLAGS)\23 19 INCLUDES = \ 20 $(LIBRAW1394_CFLAGS) $(LIBIEC61883_CFLAGS) \ 21 $(LIBAVC1394_CFLAGS) \ 22 $(LIBXMLCPP_CFLAGS) $(LIBLO_CFLAGS) \ 23 -I$(top_srcdir) -I$(top_srcdir)/src 24 24 25 25 lib_LTLIBRARIES = libfreebob.la 26 26 27 libfreebob_la_LDFLAGS = 28 -version-info $(LT_VERSION) $(LIBRAW1394_LIBS)\29 $(LIBIEC61883_LIBS) $(LIBAVC1394_LIBS)\30 31 27 libfreebob_la_LDFLAGS = \ 28 -version-info $(LT_VERSION) $(LIBRAW1394_LIBS) \ 29 $(LIBIEC61883_LIBS) $(LIBAVC1394_LIBS) \ 30 $(LIBXMLCPP_LIBS) $(LIBLO_LIBS) \ 31 -lpthread -lrt 32 32 33 33 libfreebob_la_LIBADD = -lrt 34 34 35 35 noinst_HEADERS = \ 36 libieee1394/configrom.h libieee1394/csr1212.h \ 37 libieee1394/ieee1394service.h libieee1394/ARMHandler.h \ 36 libieee1394/configrom.h \ 37 libieee1394/csr1212.h \ 38 libieee1394/ieee1394service.h \ 39 libieee1394/ARMHandler.h \ 38 40 libieee1394/IEC61883.h \ 39 41 debugmodule/debugmodule.h \ 40 devicemanager.h fbtypes.h iavdevice.h threads.h bebob/bebob_avdevice.h \ 41 bebob/bebob_avdevice_subunit.h bebob/bebob_avplug.h bebob/bebob_dl_bcd.h bebob/bebob_dl_codes.h \ 42 bebob/bebob_dl_mgr.h bebob/bebob_functionblock.h bounce/bounce_avdevice.h bounce/bounce_slave_avdevice.h \ 43 maudio/maudio_avdevice.h motu/motu_avdevice.h rme/rme_avdevice.h \ 44 metrichalo/mh_avdevice.h dice/dice_avdevice.h \ 45 libavc/avc_connect.h \ 46 libavc/avc_definitions.h libavc/avc_extended_cmd_generic.h \ 47 libavc/avc_extended_plug_info.h libavc/avc_extended_stream_format.h \ 48 libavc/avc_extended_subunit_info.h libavc/avc_function_block.h libavc/avc_generic.h \ 49 libavc/avc_plug_info.h libavc/avc_serialize.h libavc/avc_signal_source.h \ 50 libavc/avc_subunit_info.h libavc/avc_unit_info.h \ 51 libosc/OscArgument.h libosc/OscNode.h libosc/OscResponse.h libosc/OscServer.h libosc/OscMessage.h \ 52 libstreaming/AmdtpPort.h libstreaming/AmdtpPortInfo.h libstreaming/AmdtpStreamProcessor.h \ 53 libstreaming/AmdtpSlaveStreamProcessor.h \ 54 libstreaming/cip.h libstreaming/cycletimer.h libstreaming/IsoHandler.h \ 55 libstreaming/IsoHandlerManager.h libstreaming/IsoStream.h libstreaming/MotuPort.h \ 56 libstreaming/MotuPortInfo.h libstreaming/MotuStreamProcessor.h \ 57 libstreaming/Port.h libstreaming/PortManager.h \ 58 libstreaming/StreamProcessor.h libstreaming/StreamProcessorManager.h \ 59 libutil/Atomic.h libutil/cycles.h libutil/DelayLockedLoop.h libutil/PosixThread.h \ 60 libutil/ringbuffer.h libutil/OptionContainer.h \ 61 libutil/PacketBuffer.h libutil/StreamStatistics.h \ 62 libutil/serialize.h libutil/SystemTimeSource.h libutil/Thread.h libutil/Time.h \ 63 libutil/TimeSource.h libutil/TimestampedBuffer.h 42 devicemanager.h \ 43 fbtypes.h \ 44 iavdevice.h \ 45 threads.h \ 46 freebob-interface.h \ 47 bebob/bebob_avdevice.h \ 48 bebob/bebob_avdevice_subunit.h \ 49 bebob/bebob_avplug.h \ 50 bebob/bebob_dl_bcd.h \ 51 bebob/bebob_dl_codes.h \ 52 bebob/bebob_dl_mgr.h \ 53 bebob/bebob_functionblock.h \ 54 bounce/bounce_avdevice.h \ 55 bounce/bounce_slave_avdevice.h \ 56 maudio/maudio_avdevice.h \ 57 motu/motu_avdevice.h rme/rme_avdevice.h \ 58 metrichalo/mh_avdevice.h \ 59 dice/dice_avdevice.h \ 60 libavc/avc_connect.h \ 61 libavc/avc_definitions.h \ 62 libavc/avc_extended_cmd_generic.h \ 63 libavc/avc_extended_plug_info.h \ 64 libavc/avc_extended_stream_format.h \ 65 libavc/avc_extended_subunit_info.h \ 66 libavc/avc_function_block.h \ 67 libavc/avc_generic.h \ 68 libavc/avc_plug_info.h \ 69 libavc/avc_serialize.h \ 70 libavc/avc_signal_source.h \ 71 libavc/avc_subunit_info.h \ 72 libavc/avc_unit_info.h \ 73 libosc/OscArgument.h \ 74 libosc/OscNode.h \ 75 libosc/OscResponse.h \ 76 libosc/OscServer.h \ 77 libosc/OscMessage.h \ 78 libstreaming/AmdtpPort.h \ 79 libstreaming/AmdtpPortInfo.h \ 80 libstreaming/AmdtpStreamProcessor.h \ 81 libstreaming/AmdtpSlaveStreamProcessor.h \ 82 libstreaming/cip.h \ 83 libstreaming/cycletimer.h \ 84 libstreaming/IsoHandler.h \ 85 libstreaming/IsoHandlerManager.h \ 86 libstreaming/IsoStream.h \ 87 libstreaming/MotuPort.h \ 88 libstreaming/MotuPortInfo.h \ 89 libstreaming/MotuStreamProcessor.h \ 90 libstreaming/Port.h \ 91 libstreaming/PortManager.h \ 92 libstreaming/StreamProcessor.h \ 93 libstreaming/StreamProcessorManager.h \ 94 libutil/Atomic.h \ 95 libutil/cycles.h \ 96 libutil/DelayLockedLoop.h \ 97 libutil/PosixThread.h \ 98 libutil/ringbuffer.h \ 99 libutil/OptionContainer.h \ 100 libutil/PacketBuffer.h \ 101 libutil/StreamStatistics.h \ 102 libutil/serialize.h \ 103 libutil/SystemTimeSource.h \ 104 libutil/Thread.h \ 105 libutil/Time.h \ 106 libutil/TimeSource.h \ 107 libutil/TimestampedBuffer.h 64 108 65 109 # common sources … … 68 112 freebob.cpp \ 69 113 freebob_streaming.cpp \ 114 freebob-interface.cpp \ 70 115 iavdevice.cpp \ 71 116 debugmodule/debugmodule.cpp \ … … 153 198 nobase_dist_pkgdata_DATA = 154 199 # bebob specific 155 bebob_pkgdata = 156 maudio/refdesign.xml\157 maudio/fw410.xml\158 200 bebob_pkgdata = \ 201 maudio/refdesign.xml \ 202 maudio/fw410.xml \ 203 maudio/fwap.xml 159 204 160 205 # programs intended for installation in the 'bin' directory branches/streaming-rework/src/maudio/maudio_avdevice.cpp
r436 r438 108 108 109 109 bool 110 AvDevice::setSampl ingFrequency( ESamplingFrequency eSamplingFrequency)110 AvDevice::setSampleRate( ESampleRate eSampleRate ) 111 111 { 112 112 // not supported … … 114 114 } 115 115 116 int AvDevice::getSamplingFrequency( ) { 117 return 44100; 116 ESampleRate 117 AvDevice::getSampleRate( ) { 118 return parseSampleRate(44100); 118 119 } 119 120 branches/streaming-rework/src/maudio/maudio_avdevice.h
r436 r438 59 59 void showDevice(); 60 60 61 bool setSampl ingFrequency( ESamplingFrequencysamplingFrequency );62 int getSamplingFrequency( );61 bool setSampleRate( ESampleRate samplingFrequency ); 62 ESampleRate getSampleRate( ); 63 63 64 64 bool prepare(); branches/streaming-rework/src/metrichalo/mh_avdevice.cpp
r436 r438 111 111 } 112 112 113 int 114 MHAvDevice::getSampl ingFrequency( ) {115 return 0;113 ESampleRate 114 MHAvDevice::getSampleRate( ) { 115 return eSF_DontCare; 116 116 } 117 117 118 118 bool 119 MHAvDevice::setSampl ingFrequency( ESamplingFrequency samplingFrequency)119 MHAvDevice::setSampleRate( ESampleRate sampleRate ) 120 120 { 121 122 121 return false; 123 122 } branches/streaming-rework/src/metrichalo/mh_avdevice.h
r436 r438 54 54 void showDevice(); 55 55 56 bool setSampl ingFrequency( ESamplingFrequencysamplingFrequency );57 int getSamplingFrequency( );56 bool setSampleRate( ESampleRate samplingFrequency ); 57 ESampleRate getSampleRate( ); 58 58 59 59 int getStreamCount(); branches/streaming-rework/src/motu/motu_avdevice.cpp
r436 r438 139 139 } 140 140 141 int 142 MotuDevice::getSampl ingFrequency( ) {141 ESampleRate 142 MotuDevice::getSampleRate( ) { 143 143 /* 144 144 * Retrieve the current sample rate from the MOTU device. … … 163 163 break; 164 164 } 165 return rate;165 return parseSampleRate(rate); 166 166 } 167 167 168 168 bool 169 MotuDevice::setSampl ingFrequency( ESamplingFrequency samplingFrequency)169 MotuDevice::setSampleRate( ESampleRate sampleRate ) 170 170 { 171 171 /* … … 176 176 int i, supported=true, cancel_adat=false; 177 177 178 switch ( sampl ingFrequency) {178 switch ( sampleRate ) { 179 179 case eSF_22050Hz: 180 180 supported=false; … … 312 312 MotuDevice::prepare() { 313 313 314 int samp_freq = getSampl ingFrequency();314 int samp_freq = getSampleRate(); 315 315 unsigned int optical_in_mode = getOpticalMode(MOTUFW_DIR_IN); 316 316 unsigned int optical_out_mode = getOpticalMode(MOTUFW_DIR_OUT); … … 433 433 // Do the same for the transmit processor 434 434 m_transmitProcessor=new Streaming::MotuTransmitStreamProcessor( 435 m_p1394Service->getPort(), getSamplingFrequency(), event_size_out); 435 m_p1394Service->getPort(), convertESampleRate(getSampleRate()), 436 event_size_out); 436 437 437 438 m_transmitProcessor->setVerboseLevel(getDebugLevel()); … … 664 665 // bytes (6 bytes) and 8 analog audio channels (each 3 bytes long). Note that 665 666 // all audio channels are sent using 3 bytes. 666 signed int sample_rate = getSampl ingFrequency();667 signed int sample_rate = getSampleRate(); 667 668 signed int optical_mode = getOpticalMode(dir); 668 669 signed int size = 4+6+8*3; branches/streaming-rework/src/motu/motu_avdevice.h
r436 r438 101 101 virtual void showDevice(); 102 102 103 virtual bool setSamplingFrequency( ESamplingFrequency samplingFrequency);104 virtual int getSamplingFrequency( );103 bool setSampleRate( ESampleRate ); 104 ESampleRate getSampleRate( ); 105 105 106 106 virtual int getStreamCount(); branches/streaming-rework/src/rme/rme_avdevice.cpp
r436 r438 109 109 } 110 110 111 int112 RmeDevice::getSampl ingFrequency( ) {111 ESampleRate 112 RmeDevice::getSampleRate( ) { 113 113 /* 114 114 * Retrieve the current sample rate from the RME device. 115 115 */ 116 return 48000;116 return parseSampleRate(48000); 117 117 } 118 118 119 119 bool 120 RmeDevice::setSampl ingFrequency( ESamplingFrequencysamplingFrequency )120 RmeDevice::setSampleRate( ESampleRate samplingFrequency ) 121 121 { 122 122 /* branches/streaming-rework/src/rme/rme_avdevice.h
r436 r438 55 55 void showDevice(); 56 56 57 bool setSampl ingFrequency( ESamplingFrequency samplingFrequency);58 int getSamplingFrequency( );57 bool setSampleRate( ESampleRate ); 58 ESampleRate getSampleRate( ); 59 59 60 60 int getStreamCount();