Does directshow have callback after camera autofcus completed? I've encounteted problem when taking picture with directshow, the camera support autofocus, but I need to wait a long time to make sure the camera has focused, does anyone know is there callback function to notify focus finished? I know android API have such callback, but not sure about Directsohw.
besides, does anyone know is open-source autofoucs algorithms for camera that can set focus area? I know DS can set the focal distance, but don't know which distance is best for my interested area.
I saw traditional implementation algorithm is taking several images and compute the gredient of the whole image, and select best one. is there any other better method or performance optimized implementation? how about media-foundation?

There is no focus callback in DirectShow (at least standard, vendor specific might exist, though unlikely).
Not sure about Media Foundation, odds are that it does not have it either.