Merge "Wait for all the thread loop to exit to finish the filter/dvr/frontend close/stop API Call" into sc-dev