mirror of
https://github.com/commaai/msgq.git
synced 2026-06-11 23:44:58 +08:00
* add visionbuf make static ignore that * Needs decleration * add test binary * c++ * create some structure * some impl * socket stuff * Accept socket connection * Alloc some buffers * Create pub sockets and send buffer id * make listener private * Implement receive * use error check macros in cl_helpers * constructors to pass in opencl context * add some convenience values in struct * refactor creating buffers * rgb is not so simple * add fake stride and expose buffers * add comment * add extra data struct * support conflate * init opencl on all buffers * make ion compile * fix qcom2 * correctly setup yuv pointers when importing buffer * also included from c * Remove send print statements * send metadata * reveive metadata * also used in c code * dont start listener automatically * Was started in 2 places * set 100ms timeout on socket * verify server id to detect reconnects * handle reconnect * buffer cleanup * let user handle opencl creation * add default values * Add support for aligned rgb buffers * add align macro * dont use namespace * use poller * apple ifdef in ipc.cc * VisionBuf is C++ class * Install opencl headers * cppcheck c++ * remove c header guard * fix mac build * simplify constructors * Update visionipc/visionipc.h Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update visionipc/visionbuf_ion.cc Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * add brackets * s/VIPCBufExtra/VisionIpcBufExtra/g * Add unittesting harness * remove vipc demo * very basic tests * add conflate test * Install opencl * suppress msgq warnings * Make it work using zmq * cl in qcom replay * run unittests in zmq mode as well * non blocking connect * always larger frame queues Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
72 lines
1.5 KiB
Python
72 lines
1.5 KiB
Python
import os
|
|
import platform
|
|
import subprocess
|
|
import sysconfig
|
|
|
|
zmq = 'zmq'
|
|
|
|
arch = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip()
|
|
if platform.system() == "Darwin":
|
|
arch = "Darwin"
|
|
|
|
cereal_dir = Dir('.')
|
|
messaging_dir = Dir('./messaging')
|
|
|
|
cpppath = [
|
|
cereal_dir,
|
|
messaging_dir,
|
|
'/usr/lib/include',
|
|
sysconfig.get_paths()['include'],
|
|
]
|
|
|
|
AddOption('--test',
|
|
action='store_true',
|
|
help='build test files')
|
|
|
|
AddOption('--asan',
|
|
action='store_true',
|
|
help='turn on ASAN')
|
|
|
|
ccflags_asan = ["-fsanitize=address", "-fno-omit-frame-pointer"] if GetOption('asan') else []
|
|
ldflags_asan = ["-fsanitize=address"] if GetOption('asan') else []
|
|
|
|
env = Environment(
|
|
ENV=os.environ,
|
|
CC='clang',
|
|
CXX='clang++',
|
|
CCFLAGS=[
|
|
"-g",
|
|
"-fPIC",
|
|
"-O2",
|
|
"-Wunused",
|
|
"-Werror",
|
|
] + ccflags_asan,
|
|
LDFLAGS=ldflags_asan,
|
|
LINKFLAGS=ldflags_asan,
|
|
|
|
CFLAGS="-std=gnu11",
|
|
CXXFLAGS="-std=c++1z",
|
|
CPPPATH=cpppath,
|
|
CYTHONCFILESUFFIX=".cpp",
|
|
tools=["default", "cython"]
|
|
)
|
|
|
|
QCOM_REPLAY = False
|
|
Export('env', 'zmq', 'arch', 'QCOM_REPLAY')
|
|
|
|
|
|
envCython = env.Clone(LIBS=[])
|
|
envCython["CCFLAGS"] += ["-Wno-#warnings", "-Wno-deprecated-declarations"]
|
|
if arch == "Darwin":
|
|
envCython["LINKFLAGS"] = ["-bundle", "-undefined", "dynamic_lookup"]
|
|
elif arch == "aarch64":
|
|
envCython["LINKFLAGS"] = ["-shared"]
|
|
envCython["LIBS"] = [os.path.basename(python_path)]
|
|
else:
|
|
envCython["LINKFLAGS"] = ["-pthread", "-shared"]
|
|
|
|
Export('envCython')
|
|
|
|
|
|
SConscript(['SConscript'])
|