Changeset 39

Show
Ignore:
Timestamp:
12/04/04 01:54:24 (19 years ago)
Author:
pieterpalmers
Message:

- basic musicplug infoblock parsing

Files:

Legend:

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

    r38 r39  
    3737        } 
    3838         
     39        unsigned int next_block_position=address+0x06+readWord(0x04); 
     40        unsigned int plug_type=readByte(0x06); 
     41        unsigned int plug_id=readWord(0x07); 
     42        unsigned int routing_support=readByte(0x09); 
     43         
     44        unsigned int source_plug_function_type=readByte(0x0A); 
     45        unsigned int source_plug_id=readByte(0x0B); 
     46        unsigned int source_plug_function_block_ID=readByte(0x0C); 
     47        unsigned int source_stream_position=readByte(0x0D); 
     48        unsigned int source_stream_location=readByte(0x0E); 
     49        unsigned int destination_plug_function_type=readByte(0x0F); 
     50        unsigned int destination_plug_id=readByte(0x10); 
     51        unsigned int destination_plug_function_block_ID=readByte(0x11); 
     52        unsigned int destination_stream_position=readByte(0x12); 
     53        unsigned int destination_stream_location=readByte(0x13); 
    3954 
    4055        debugPrint(DEBUG_LEVEL_INFOBLOCK,"AvMusicPlugInfoBlock: Creating... length=0x%04X\n",getLength()); 
     56        debugPrint(DEBUG_LEVEL_INFOBLOCK,"AvMusicPlugInfoBlock:   Music plug id=0x%02X\n",plug_id); 
     57        debugPrint(DEBUG_LEVEL_INFOBLOCK,"AvMusicPlugInfoBlock:   Plug type=0x%02X\n",plug_type); 
     58        debugPrint(DEBUG_LEVEL_INFOBLOCK,"AvMusicPlugInfoBlock:   routing support=0x%02X\n",routing_support); 
     59        debugPrint(DEBUG_LEVEL_INFOBLOCK,"AvMusicPlugInfoBlock:   source plug: type=0x%02X - id=0x%02X - fb_id=0x%02X - pos=%d - loc=%d\n",source_plug_function_type, 
     60                        source_plug_id,source_plug_function_block_ID,source_stream_position,source_stream_location); 
     61        debugPrint(DEBUG_LEVEL_INFOBLOCK,"AvMusicPlugInfoBlock:   dest plug: type=0x%02X - id=0x%02X - fb_id=0x%02X - pos=%d - loc=%d\n",destination_plug_function_type, 
     62                        destination_plug_id,destination_plug_function_block_ID,destination_stream_position,destination_stream_location); 
    4163 
     64         
     65        if(next_block_position<address+getLength()) { 
     66                // parse the optional name block 
     67                AvNameInfoBlock *tmpNameInfoBlock=new AvNameInfoBlock(parent,next_block_position); 
     68                if (tmpNameInfoBlock && (tmpNameInfoBlock->isValid())) { 
     69                        debugPrint(DEBUG_LEVEL_INFOBLOCK,"AvMusicPlugInfoBlock:   Name info=%s\n",tmpNameInfoBlock->getName()); 
     70                 
     71                } else { 
     72                        debugPrint(DEBUG_LEVEL_INFOBLOCK,"AvMusicPlugInfoBlock:   invalid extra name block present\n"); 
     73                } 
     74                if(tmpNameInfoBlock) { 
     75                        delete tmpNameInfoBlock; 
     76                        tmpNameInfoBlock=NULL; 
     77                } 
     78        } 
     79         
    4280         
    4381        debugPrint(DEBUG_LEVEL_INFOBLOCK,"AvMusicPlugInfoBlock: Created\n");