secure camera threading