Ejemplo n.º 1
0
 def dropIntercom(self):
     if self.intercom_ipc_index is None:
         print("dropIntercom: no intercom")
         return
     self.sendMessageToBack(MessageObject(
         "dropIntercom"
         # ipc_index = ipc_index # event fd index for the intecom channel
     ))
     self.intercom_ipc_index = None
Ejemplo n.º 2
0
 def activateFMP4Client(self,
                        name=None,
                        n_ringbuffer=None,
                        n_size=None,
                        ipc_index=None):
     self.sendMessageToBack(
         MessageObject("activateFMP4Client",
                       name=name,
                       n_ringbuffer=n_ringbuffer,
                       n_size=n_size,
                       ipc_index=ipc_index))
Ejemplo n.º 3
0
 def activateRGB24Client(self,
                         name=None,
                         n_ringbuffer=None,
                         width=None,
                         height=None,
                         ipc_index=None
                         ):
     """Tells process to start getting frames from libValkka cpp side
     """
     self.sendMessageToBack(MessageObject(
         "activateRGB24Client",
         name=name,
         n_ringbuffer=n_ringbuffer,
         width=width,
         height=height,
         ipc_index=ipc_index
     ))
Ejemplo n.º 4
0
    def listenIntercom(self,
                       name=None,
                       n_ringbuffer=None,
                       n_bytes=None,
                       ipc_index=None
                       ):
        if self.intercom_ipc_index is not None:
            print("listenIntercom: already listening to master")
            return

        self.sendMessageToBack(MessageObject(
            "listenIntercom",
            name=name,
            n_ringbuffer=n_ringbuffer,
            n_bytes=n_bytes,
            ipc_index=ipc_index  # event fd index for the intecom channel
        ))
        self.intercom_ipc_index = ipc_index
Ejemplo n.º 5
0
    def deactivateRGB24Client(self, ipc_index):
        """This frontend method returns only after the backend
        method "c__deactivateRGB24Client" exits.

        It's a good idea to do this, for example, when adding/removing rgb shmem
        servers and clients.

        This is done using the SyncIndex context manager:
        """
        with SyncIndex(self.eg) as i:
            # this section exits once the backend
            # call is ready
            self.sendMessageToBack(MessageObject(
                "deactivateRGB24Client",
                ipc_index=ipc_index,
                event_index=i
            ))
        print("deactivateRGB24Client OK", ipc_index)
Ejemplo n.º 6
0
 def customCall(self, parameter=1):
     # your demo custom call :)
     self.sendMessageToBack(MessageObject("customCall",
                                          parameter=parameter))
Ejemplo n.º 7
0
 def deactivateFMP4Client(self, ipc_index=None):
     self.sendMessageToBack(
         MessageObject("deactivateFMP4Client", ipc_index=ipc_index))