Receives a jpg buffer and a text msg. Receives a jpg bytestring of an OpenCV image. Also receives a text msg, often the image name. Arguments: flags: (optional) zmq flags. copy: (optional) zmq copy flag. track: (optional) zmq track flag.
(self, flags=0, copy=True, track=False)
| 104 | return (md['msg'], A.reshape(md['shape'])) |
| 105 | |
| 106 | def recv_data(self, flags=0, copy=True, track=False): |
| 107 | """Receives a jpg buffer and a text msg. |
| 108 | |
| 109 | Receives a jpg bytestring of an OpenCV image. |
| 110 | Also receives a text msg, often the image name. |
| 111 | |
| 112 | Arguments: |
| 113 | flags: (optional) zmq flags. |
| 114 | copy: (optional) zmq copy flag. |
| 115 | track: (optional) zmq track flag. |
| 116 | |
| 117 | Returns: |
| 118 | msg: image name or text message. |
| 119 | data: bytestring, containing data. |
| 120 | """ |
| 121 | |
| 122 | md = self.recv_json(flags=flags) # metadata text |
| 123 | data = self.recv(flags=flags, copy=copy, track=track) |
| 124 | return (md['msg'], data) |
| 125 | |
| 126 | |
| 127 | class SerializingContext(zmq.Context): |
no outgoing calls
no test coverage detected