You could of course write e.g. a gstreamer plugin right now to perform autofocus (contrast based) and return whatever info you wanted from it.