code: def clearDevice(self):
          
          print(self.pre, "clearDevice: ")
          
          self.report("clearDevice")
          if not self.device:
              return
          if (self.mvision_process==None):
              return
          
          self.filterchain.delViewPort(self.viewport)
          self.filterchain.releaseShmem(self.shmem_name)
  
          self.mvision_process.deactivate() # put process back to sleep ..
          
          self.main_layout.removeWidget(self.mvision_widget)
          
          self.filterchain = None
          self.device = None
          
          self.video.update()
docs: Remove the current stream