Changeset 731
- Timestamp:
- 11/27/07 11:26:05 (15 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/ppalmers-streaming/src/libavc/descriptors/avc_descriptor.cpp
r626 r731 146 146 AVCDescriptor::reload() 147 147 { 148 m_loaded =false;148 m_loaded = false; 149 149 return load(); 150 150 } … … 178 178 } 179 179 180 debugOutput(DEBUG_LEVEL_VERBOSE, " Read statusdescriptor\n");180 debugOutput(DEBUG_LEVEL_VERBOSE, " Read descriptor\n"); 181 181 ReadDescriptorCmd readDescCmd(m_unit->get1394Service()); 182 182 readDescCmd.m_specifier=&m_specifier; … … 199 199 if (bytes_read < 2) { 200 200 debugOutput(DEBUG_LEVEL_VERBOSE, " Descriptor length field not present\n"); 201 return false; 202 } 203 201 return false; 202 } 203 204 #ifdef DEBUG 205 if(getDebugLevel() >= DEBUG_LEVEL_VERY_VERBOSE) { 206 debugOutput(DEBUG_LEVEL_VERBOSE, " Read result:\n"); 207 printBufferBytes( DEBUG_LEVEL_VERY_VERBOSE, bytes_read, readDescCmd.m_data ); 208 } 209 #endif 210 204 211 // obtain descriptor length 205 212 m_descriptor_length=(readDescCmd.m_data[0]<<8) + (readDescCmd.m_data[1]); … … 274 281 return false; 275 282 } 276 283 #ifdef DEBUG 284 if(getDebugLevel() >= DEBUG_LEVEL_VERY_VERBOSE) { 285 debugOutput(DEBUG_LEVEL_VERBOSE, " Descriptor content:\n"); 286 printBufferBytes( DEBUG_LEVEL_VERY_VERBOSE, m_descriptor_length, m_data ); 287 } 288 #endif 277 289 debugOutput(DEBUG_LEVEL_VERBOSE, " Parse descriptor\n"); 278 290 // parse the descriptor … … 347 359 } 348 360 361 void 362 AVCDescriptor::printBufferBytes( unsigned int level, size_t length, byte_t* buffer ) const 363 { 364 365 for ( unsigned int i=0; i < length; ++i ) { 366 if ( ( i % 16 ) == 0 ) { 367 if ( i > 0 ) { 368 debugOutputShort(level,"\n"); 369 } 370 debugOutputShort(level," %4d: ",i*16); 371 } 372 debugOutputShort(level,"%02X ",buffer[i]); 373 } 374 debugOutputShort(level,"\n"); 375 } 376 349 377 // --- Info block 350 378 AVCInfoBlock::AVCInfoBlock( ) branches/ppalmers-streaming/src/libavc/descriptors/avc_descriptor.h
r618 r731 137 137 138 138 protected: 139 void printBufferBytes(unsigned int level, size_t length, byte_t* buffer) const; 139 140 140 141 Unit* m_unit; branches/ppalmers-streaming/src/libavc/descriptors/avc_descriptor_cmd.cpp
r618 r731 179 179 return false; 180 180 } 181 return true;182 181 return true; 183 182 }