Add timeout to automatic frame recording in Dimax

Otherwise it could stall the end of waiting because the frame grabbing can be
very demanding on system resources.