def __init__(self, **kwargs): # auxiliary string for debugging output self.pre = self.__class__.__name__ self.logger = getLogger(self.pre) # check kwargs agains parameter_defs, attach ok'd parameters to this # object as attributes parameterInitCheck(ShmemRGBClient.parameter_defs, kwargs, self) self.index_p = core.new_intp() self.isize_p = core.new_intp() # self.rgb_meta = RGB24Meta() # print(self.pre,"shmem name=",self.name) # shmem ring buffer on the client side self.core = core.SharedMemRingBufferRGB( self.name, self.n_ringbuffer, self.width, self.height, self.mstimeout, False) """ # legacy self.shmem_list = [] for i in range(self.n_ringbuffer): # if you're looking for this, it's defined in the .i swig interface file. # :) self.shmem_list.append(core.getNumpyShmem(self.core, i)) """ #""" #print(self.pre,"shmem get list") self.shmem_list = self.core.getBufferListPy()
def __init__(self, **kwargs): # auxiliary string for debugging output self.pre = self.__class__.__name__ self.logger = getLogger(self.pre) # check kwargs agains parameter_defs, attach ok'd parameters to this # object as attributes parameterInitCheck(ShmemRGBServer.parameter_defs, kwargs, self) # shmem ring buffer on the server side self.core = core.SharedMemRingBufferRGB( self.name, self.n_ringbuffer, self.width, self.height, 1000, # dummy value True) # True indicates server-side if self.use_event_fd: self.core.useEventFd()
def __init__(self, **kwargs): self.pre = self.__class__.__name__ + " : " # auxiliary string for debugging output parameterInitCheck( ShmemRGBClient.parameter_defs, kwargs, self ) # check kwargs agains parameter_defs, attach ok'd parameters to this object as attributes self.index_p = core.new_intp() self.isize_p = core.new_intp() # print(self.pre,"shmem name=",self.name) self.core = core.SharedMemRingBufferRGB( self.name, self.n_ringbuffer, self.width, self.height, self.mstimeout, False) # shmem ring buffer on the client side self.shmem_list = [] for i in range(self.n_ringbuffer): self.shmem_list.append( core.getNumpyShmem(self.core, i) ) # if you're looking for this, it's defined in the .i swig interface file. :)