code: private Dimension[] parseResolutions(Pad pad) {
  
  		Caps caps = pad.getCaps();
  
  		format = findPreferredFormat(caps);
  
  		LOG.debug("Best format is {}", format);
  
  		Dimension r = null;
  		Structure s = null;
  		String mime = null;
  
  		final int n = caps.size();
  		int i = 0;
  
  		Map<String, Dimension> map = new HashMap<String, Dimension>();
  
  		do {
  
  			s = caps.getStructure(i++);
  
  			LOG.debug("Found format structure {}", s);
  
  			mime = s.getName();
  
  			if (mime.equals(format)) {
  				if ((r = capStructToResolution(s)) != null) {
  					map.put(r.width + "x" + r.height, r);
  				}
  			}
  
  		} while (i < n);
  
  		final Dimension[] resolutions = new ArrayList<Dimension>(map.values()).toArray(new Dimension[0]);
  
  		if (LOG.isDebugEnabled()) {
  			for (Dimension d : resolutions) {
  				LOG.debug("Resolution detected {} with format {}", d, format);
  			}
  		}
  
  		return resolutions;
  	}
docs: Use GStreamer to get all possible resolutions.
  
  @param pad the pad to get resolutions from
  @return Array of resolutions supported by device connected with pad