ProcessOutput.write_frame() takes ndarray, not bytes

pull/357/head
nyanpasu64 2018-08-15 03:31:05 -07:00
rodzic 961356bd3f
commit fccfb61649
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -93,7 +93,9 @@ class ProcessOutput(Output):
# Python documentation discourages accessing popen.stdin. It's wrong.
# https://stackoverflow.com/a/9886747
def write_frame(self, frame: bytes) -> None:
def write_frame(self, frame: 'np.ndarray') -> None:
# frame.tobytes() avoids PyCharm complaining about type mismatch,
# but results in slightly higher CPU consumption.
self._stream.write(frame)
def close(self):