def read(self):
self.reset()<EOL>for dic in self.datamodel.camera_collection.get(): <EOL><INDENT>if (self.verbose): print(self.pre, "<STR_LIT>", dic)<EOL>if (dic["<STR_LIT>"] == DataModel.RTSPCameraRow.__name__):<EOL><INDENT>affinity = -<NUM_LIT:1><EOL>if self.cpu_scheme:<EOL><INDENT>affinity = self.cpu_scheme.getAV()<EOL><DEDENT>dic.pop("<STR_LIT>")<EOL>device = DataModel.RTSPCameraDevice(**dic) <EOL>print("<STR_LIT>", device.getLiveMainSlot())<EOL>print("<STR_LIT>", device.getMainAddress())<EOL>print("<STR_LIT>", device._id)<EOL>chain = LiveManagedFilterchain( <EOL>livethread  = self.livethread,<EOL>openglthreads<EOL>= self.gpu_handler.openglthreads,<EOL>address     = device.getMainAddress(),<EOL>slot        = device.getLiveMainSlot(),<EOL>_id         = device._id,<EOL>affinity    = affinity,<EOL>msreconnect = <NUM_LIT>,<EOL>verbose     =False,<EOL>shmem_image_dimensions = constant.shmem_image_dimensions,<EOL>shmem_n_buffer = constant.shmem_n_buffer,<EOL>shmem_image_interval = constant.shmem_image_interval<EOL>)<EOL>self.chains.append(chain) <EOL><DEDENT>elif (dic["<STR_LIT>"] == DataModel.USBCameraRow.__name__):<EOL><INDENT>affinity = -<NUM_LIT:1><EOL>if self.cpu_scheme:<EOL><INDENT>affinity = self.cpu_scheme.getAV()<EOL><DEDENT>dic.pop("<STR_LIT>")<EOL>device = DataModel.USBCameraDevice(**dic) <EOL>print("<STR_LIT>", device.getLiveMainSlot())<EOL>print("<STR_LIT>", device.getMainAddress())<EOL>print("<STR_LIT>", device._id)<EOL>chain = USBManagedFilterchain( <EOL>usbthread   = self.usbthread,<EOL>openglthreads<EOL>= self.gpu_handler.openglthreads,<EOL>address     = device.getMainAddress(),<EOL>slot        = device.getLiveMainSlot(),<EOL>_id         = device._id,<EOL>affinity    = affinity,<EOL>msreconnect = <NUM_LIT>,<EOL>verbose     =False,<EOL>shmem_image_dimensions = constant.shmem_image_dimensions,<EOL>shmem_n_buffer = constant.shmem_n_buffer,<EOL>shmem_image_interval = constant.shmem_image_interval<EOL>)<EOL>self.chains.append(chain)<EOL><DEDENT><DEDENT>
Reads all devices from the database and creates filterchains

        TODO: we can, of course, just modify the added / removed cameras