code: private Dimension getRequestedDimension() {
  
      // check for fixed dimensions from media args
      if (mediaArgs.getFixedWidth() > 0 || mediaArgs.getFixedHeight() > 0) {
        return new Dimension(mediaArgs.getFixedWidth(), mediaArgs.getFixedHeight());
      }
  
      // check for dimensions from mediaformat (evaluate only first media format)
      MediaFormat[] mediaFormats = mediaArgs.getMediaFormats();
      if (mediaFormats != null && mediaFormats.length > 0) {
        Dimension dimension = mediaFormats[0].getMinDimension();
        if (dimension != null) {
          return dimension;
        }
      }
  
      // fallback to 0/0 - no specific dimension requested
      return new Dimension(0, 0);
    }
docs: Requested dimensions either from media format or fixed dimensions from media args.
  @return Requested dimensions