@Override public Format setInputFormat(Format format) { final VideoFormat videoFormat = (VideoFormat) format; if (videoFormat.getSize() == null) return null; // must set a size. // TODO: check VideoFormat and compatibility return super.setInputFormat(format); }
@Override public Format[] getSupportedOutputFormats(Format input) { if (input == null) return supportedOutputFormats; final VideoFormat inputCast = (VideoFormat) input; final Format[] result = new Format[] { new RGBFormat( inputCast.getSize(), -1, Format.byteArray, inputCast.getFrameRate(), -1, -1, -1, -1) }; // TODO: we don't know the details of the output format (pixel masks, // etc) until we actually parse one! return result; }
@Override protected void copy(Format f) { super.copy(f); final GIFFormat oCast = (GIFFormat) f; // it has to be a GIFFormat, or // ClassCastException will be // thrown. }