code: def clearDevice(self):
          
          print(self.pre, "clearDevice")
          if not self.device:
              return
          
          self.filterchain.delViewPort(self.viewport)
          
          self.filterchain = None
          self.device = None
          
          self.video.update()
docs: Remove the current stream