add function available_streams to visionipc_pyx.pyx (#424)

This commit is contained in:
Dean Lee 2023-03-22 01:52:27 +08:00 committed by GitHub
parent 7492dc3f45
commit 494cd28f3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -3,6 +3,7 @@
from libcpp.string cimport string
from libcpp.vector cimport vector
from libcpp.set cimport set
from libc.stdint cimport uint32_t, uint64_t
from libcpp cimport bool
@ -40,3 +41,5 @@ cdef extern from "cereal/visionipc/visionipc_client.h":
VisionBuf * recv(VisionIpcBufExtra *, int)
bool connect(bool)
bool is_connected()
@staticmethod
set[VisionStreamType] getAvailableStreams(string, bool)

View File

@ -97,3 +97,7 @@ cdef class VisionIpcClient:
def is_connected(self):
return self.client.is_connected()
@staticmethod
def available_streams(string name, bool block):
return cppVisionIpcClient.getAvailableStreams(name, block)