Beispiel #1
0
 @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);
 }
Beispiel #2
0
  @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;
  }