04-13-2011 05:12 AM
I've been playing around a bit with AMMS and CameraControl. There are two methods for retrieving and setting the camera resolution:
CameraControl.getSupportedStillResolutions(); CameraControl.setStillResolutions(int index);
Well, these are the results on a 6.0 9780 simulator:
>>> LIST OF SUPPORTED EXPOSURE MODES auto >>> LIST OF SUPPORTED RESOLUTIONS 2048 x 1536 1024 x 768 480 x 360
Tried setting the lower (480 x 360), and it throws an IllegalArgumentException. JavaDoc says it is thrown when the resolution is not supported. Then, why it is returned as supported?
NOTE: I remember something similar happened me with this pair of methods:
System.getProperty("video.snapshot.encodings"); VideoControl.getSnapshot(String encoding);
In that sense, the AMMS is as good as the old plain MMAPI.
Solved! Go to Solution.
04-14-2011 10:17 AM
Sorry, it was my fault.
The setStillResolution int parameter is not an index related to the supported resolutions array, but the number of the pair of resolution. Read the javadoc for more info.
I thougth these methods were not reliable, based on past experiences with this old method:
which usually produces invalid resolutions.
I'm closing this as solved.