Changeset 38

Show
Ignore:
Timestamp:
12/03/04 15:04:03 (19 years ago)
Author:
pieterpalmers
Message:

- Added classes to parse the infoblocks new to the 1.1 version of the AV/C Music Subunit spec
- Implemented some prototype parsing in these classes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/freebob/src/avdevice.cpp

    r35 r38  
    138138                                                        case 0x0C: // music subunit 
    139139                                                                tmpAvDeviceSubunit=new AvDeviceMusicSubunit(this,subunit_id); 
    140                                                                 { // just a test 
     140                                                                /*{ // just a test 
    141141                                                                AvDeviceMusicSubunit tmpAvDeviceSubunit2(this,subunit_id); 
    142142                                                                tmpAvDeviceSubunit2.printMusicPlugInfo(); 
     
    144144                                                                tmpAvDeviceSubunit2.printOutputPlugConnections(); 
    145145                                                                tmpAvDeviceSubunit2.test(); 
    146                                                                 } 
     146                                                                }*/ 
    147147                                                        break; 
    148148 
  • trunk/freebob/src/avmusicstatusdescriptor.cpp

    r26 r38  
    3131#include "avsourcepluginfoblock.h" 
    3232#include "avoutputplugstatusinfoblock.h" 
     33#include "avroutingstatusinfoblock.h" 
    3334 
    3435AvMusicStatusDescriptor::AvMusicStatusDescriptor(AvDevice *parent, unsigned char id) : AvDescriptor(parent, AVC1394_SUBUNIT_TYPE_MUSIC | (id << 16),0x80) { 
     
    8586        offset += cOutputPlugStatusInfoBlock->getLength()+2; 
    8687         
     88        debugPrint (DEBUG_LEVEL_DESCRIPTOR, "AvMusicStatusDescriptor: Creating AvRoutingStatusInfoBlock... (offset=0x%04X)\n",offset); 
     89        cRoutingStatusInfoBlock=new AvRoutingStatusInfoBlock(this,offset); 
     90        if (!(cRoutingStatusInfoBlock) || !(cRoutingStatusInfoBlock->isValid())) { 
     91                debugPrint (DEBUG_LEVEL_DESCRIPTOR, "AvMusicStatusDescriptor:  AvRoutingStatusInfoBlock not found!\n"); 
     92                bValid=false; 
     93                return; 
     94        } 
     95        debugPrint (DEBUG_LEVEL_DESCRIPTOR, "AvMusicStatusDescriptor:  AvRoutingStatusInfoBlock found: length=0x%04X\n",cRoutingStatusInfoBlock->getLength()); 
     96         
     97        offset += cRoutingStatusInfoBlock->getLength()+2; 
     98         
    8799        // start parsing the optional infoblock(s) 
    88100        AvInfoBlock *tmpInfoBlock = NULL; 
  • trunk/freebob/src/avmusicstatusdescriptor.h

    r26 r38  
    3333class AvGeneralMusicInfoBlock; 
    3434class AvOutputPlugStatusInfoBlock; 
     35class AvRoutingStatusInfoBlock; 
    3536 
    3637class AvMusicStatusDescriptor : public AvDescriptor { 
     
    4243 
    4344 protected: 
    44        AvGeneralMusicInfoBlock      *cGeneralMusicInfoBlock; 
    45        AvOutputPlugStatusInfoBlock  *cOutputPlugStatusInfoBlock; 
    46         
     45       AvGeneralMusicInfoBlock         *cGeneralMusicInfoBlock; 
     46       AvOutputPlugStatusInfoBlock     *cOutputPlugStatusInfoBlock; 
     47       AvRoutingStatusInfoBlock                *cRoutingStatusInfoBlock; 
    4748 private: 
    4849 
  • trunk/freebob/src/avsourcepluginfoblock.cpp

    r26 r38  
    9090                                break; 
    9191                                default: 
    92                                         debugPrint(DEBUG_LEVEL_INFOBLOCK,"AvSourcePlugInfoBlock: Skipping unknown block\n"); 
     92                                        debugPrint(DEBUG_LEVEL_INFOBLOCK,"AvSourcePlugInfoBlock: Skipping unknown block type 0x%04X\n",tmpInfoBlock->getType()); 
    9393                                break; 
    9494                                 
  • trunk/freebob/src/debugmodule.h

    r35 r38  
    3636 
    3737#define DEBUG_LEVEL_MODERATE (DEBUG_LEVEL_INFO | DEBUG_LEVEL_DEVICE | DEBUG_LEVEL_SUBUNIT) 
     38#define DEBUG_LEVEL_HIGH     (DEBUG_LEVEL_MODERATE | DEBUG_LEVEL_DESCRIPTOR | DEBUG_LEVEL_INFOBLOCK) 
    3839 
    39 #define DEBUG_LEVEL DEBUG_LEVEL_MODERATE  
     40#define DEBUG_LEVEL DEBUG_LEVEL_HIGH  
    4041 
    4142#define DEBUG 
  • trunk/freebob/src/ieee1394service.cpp

    r26 r38  
    218218                        debugPrint (DEBUG_LEVEL_INFO, "    Deleting AvMusicIdentifierDescriptor...\n"); 
    219219                        delete testdesc_mid; 
     220#endif 
    220221                         
    221222                        // test the AvMusicStatusDescriptor 
     
    224225                        debugPrint (DEBUG_LEVEL_INFO, "    Created...\n"); 
    225226                        testdesc_mid2->printCapabilities(); 
    226                        
     227#if 0  
    227228                        // test the AvInfoBlock 
    228229                        debugPrint (DEBUG_LEVEL_INFO, "    Trying to create an AvInfoBlock...\n"); 
     
    314315                        delete testblock8; 
    315316                        debugPrint (DEBUG_LEVEL_INFO, "    Deleting AvMusicStatusDescriptor...\n"); 
     317#endif                   
    316318                        delete testdesc_mid2;                    
    317 #endif                   
    318319                } 
    319320                debugPrint (DEBUG_LEVEL_INFO, "   Deleting AvDevice...\n"); 
  • trunk/freebob/src/Makefile.am

    r28 r38  
    6565        avoutputplugstatusinfoblock.h \ 
    6666        avoutputplugstatusinfoblock.cpp \ 
     67        avroutingstatusinfoblock.h \ 
     68        avroutingstatusinfoblock.cpp \ 
     69        avpluginfoblock.h \ 
     70        avpluginfoblock.cpp \ 
     71        avmusicpluginfoblock.h \ 
     72        avmusicpluginfoblock.cpp \ 
     73        avclusterinfoblock.h \ 
     74        avclusterinfoblock.cpp \ 
    6775        debugmodule.cpp \ 
    6876        main.cpp