Exemplo n.º 1
0
 def pull(self):
     """If semaphore was timed out (i.e. nothing was written to the ringbuffer) in mstimeout milliseconds, returns: None, None.  Otherwise returns the index of the shmem segment and the size of data written.
     """
     got = self.core.clientPull(self.index_p, self.isize_p)
     index = core.intp_value(
         self.index_p)
     isize = core.intp_value(self.isize_p)
     # if (self.verbose):
     self.logger.debug("current index, size= %s %s", index, isize)
     if (got):
         return index, isize
     else:
         return None, None
Exemplo n.º 2
0
 def pullFrameThread(self):
     """Use with multithreading
     """
     self.rgb_meta = core.RGB24Meta()
     got = self.core.clientPullFrameThread(self.index_p, self.rgb_meta)
     index = core.intp_value(self.index_p)
     # if (self.verbose):
     self.logger.debug("current index %s ", index) # ShmemRGBClient.metaToString(self.rgb_meta))
     if (got):
         return index, self.rgb_meta
     else:
         return None, None
Exemplo n.º 3
0
 def pullFrameThread(self):
     """Use with multithreading
     """
     self.rgb_meta = core.RGB24Meta()
     got = self.core.clientPullFrameThread(self.index_p, self.rgb_meta)
     index = core.intp_value(self.index_p)
     if (self.verbose):
         print(self.pre, "current index, info", index, ShmemRGBClient.metaToString(rgb_meta))
     if (got):
         return index, self.rgb_meta
     else:
         return None, None
Exemplo n.º 4
0
 def pullFrame(self):
     """If semaphore was timed out (i.e. nothing was written to the ringbuffer) in mstimeout milliseconds, returns: None, None.  Otherwise returns the index of the shmem segment and the size of data written.
     """
     self.rgb_meta = core.RGB24Meta()
     got = self.core.clientPullFrame(self.index_p, self.rgb_meta)
     index = core.intp_value(self.index_p)
     if (self.verbose):
         print(self.pre, "current index, info", index, ShmemRGBClient.metaToString(rgb_meta))
     if (got):
         return index, self.rgb_meta
     else:
         return None, None