RendererConfiguration conf = RendererConfiguration.getRendererConfigurationByName("Playstation 3");
assertNotNull("Renderer named \"Playstation 3\" found.", conf);
// Construct regular two channel MPG information
DLNAMediaInfo info = new DLNAMediaInfo();
info.setContainer("avi");
DLNAMediaAudio audio = new DLNAMediaAudio();
audio.setCodecA("ac3");
audio.getAudioProperties().setNumberOfChannels(5);
List<DLNAMediaAudio> audioCodes = new ArrayList<DLNAMediaAudio>();
audioCodes.add(audio);
info.setAudioTracksList(audioCodes);
info.setCodecV("mp4");
Format format = new MPG();
format.match("test.avi");
assertEquals("PS3 is compatible with MPG", true,
conf.isCompatible(info, format));
// Construct MPG with wmv codec that the PS3 does not support natively
info.setCodecV("wmv");
assertEquals("PS3 is incompatible with MPG with wmv codec", false,
conf.isCompatible(info, format));
}