DeviceMediaRenderer renderer = (DeviceMediaRenderer)device;
if ( renderer instanceof DeviceUPnPImpl ){
UPnPDevice upnp_device = ((DeviceUPnPImpl)renderer).getUPnPDevice();
if ( upnp_device != null ){
String lc_manufacturer = getOptionalLC( upnp_device.getManufacturer());
String lc_model = getOptionalLC( upnp_device.getModelName());
String lc_fname = getOptionalLC( upnp_device.getFriendlyName());
if ( lc_manufacturer.startsWith( "samsung" )){
device.setPersistentStringProperty( DeviceImpl.PP_REND_CLASSIFICATION, "samsung.generic" );
TranscodeProfile[] profiles = device.getTranscodeProfiles();
if ( profiles.length == 0 ){
device.setTranscodeRequirement( TranscodeTarget.TRANSCODE_NEVER );
}else{
device.setTranscodeRequirement( TranscodeTarget.TRANSCODE_WHEN_REQUIRED );
}
}else if ( lc_manufacturer.startsWith( "western digital" )){
device.setPersistentStringProperty( DeviceImpl.PP_REND_CLASSIFICATION, "western.digital.generic" );
TranscodeProfile[] profiles = device.getTranscodeProfiles();
if ( profiles.length == 0 ){
device.setTranscodeRequirement( TranscodeTarget.TRANSCODE_NEVER );
}else{
device.setTranscodeRequirement( TranscodeTarget.TRANSCODE_WHEN_REQUIRED );
}
}else if ( lc_manufacturer.startsWith( "sony" ) && lc_fname.startsWith( "bravia" )){
device.setPersistentStringProperty( DeviceImpl.PP_REND_CLASSIFICATION, "sony.bravia" );
}else if ( lc_model.equals( "windows media player" )){
String model_number = upnp_device.getModelNumber();
if ( model_number != null ){
try{
int num = Integer.parseInt( model_number );