Added functionality to cap the framerate based on what we're actually getting.