{
final MyBasicPlugIn p = new MyBasicPlugIn();
{
final Format in = new VideoFormat(null, null, -1, null, -1.0f);
final Format[] outs = new Format[]{
new AudioFormat("ULAW", 8000.0, 8, 1, -1, -1, -1, -1.0, Format.byteArray),
new RGBFormat(null, -1, Format.intArray, -1.0f, 32, 0xff0000, 0xff00, 0xff, 1, -1, 0, -1)
};
assertTrue(BasicPlugIn.matches(in, outs) == outs[1]);
// Sun's BasicPlugIn throws an NPE in this situation. So for now, so will FMJ's.
try
{
BasicPlugIn.matches(null, outs);
assertTrue(false);
}
catch (NullPointerException e)
{
}
}
{
final Format in = new VideoFormat(null, null, -1, null, -1.0f);
final Format[] outs = new Format[]{
new AudioFormat("ULAW", 8000.0, 8, 1, -1, -1, -1, -1.0, Format.byteArray),
new AudioFormat("ULAW", 8000.0, 8, 1, -1, -1, -1, -1.0, Format.intArray)
};
assertTrue(BasicPlugIn.matches(in, outs) == null);
}
{
final Format in = new VideoFormat(null, null, -1, null, -1.0f);
final Format[] outs = new Format[]{
};
assertTrue(BasicPlugIn.matches(in, outs) == null);