mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 22:23:56 +08:00
* don't use the codec in video_writer
* this produces broken videos for some reason
* bugfix
* refactor on the class
* works on device
* fix codec
* no codec enum
* fix pc
* move into dirs
* these includes also
* rename it ffmpegencoder
* add avcodec_close
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 2008db47c2
28 lines
919 B
Python
28 lines
919 B
Python
Import('env', 'arch', 'cereal', 'messaging', 'common', 'visionipc')
|
|
|
|
libs = [common, cereal, messaging, visionipc,
|
|
'zmq', 'capnp', 'kj', 'z',
|
|
'avformat', 'avcodec', 'swscale', 'avutil',
|
|
'yuv', 'OpenCL', 'pthread']
|
|
|
|
src = ['logger.cc', 'loggerd.cc', 'encoder/video_writer.cc', 'remote_encoder.cc', 'encoder/encoder.cc']
|
|
if arch == "larch64":
|
|
src += ['encoder/v4l_encoder.cc']
|
|
else:
|
|
src += ['encoder/ffmpeg_encoder.cc']
|
|
|
|
if arch == "Darwin":
|
|
# fix OpenCL
|
|
del libs[libs.index('OpenCL')]
|
|
env['FRAMEWORKS'] = ['OpenCL']
|
|
|
|
logger_lib = env.Library('logger', src)
|
|
libs.insert(0, logger_lib)
|
|
|
|
env.Program('loggerd', ['main.cc'], LIBS=libs)
|
|
env.Program('encoderd', ['encoderd.cc'], LIBS=libs)
|
|
env.Program('bootlog.cc', LIBS=libs)
|
|
|
|
if GetOption('test'):
|
|
env.Program('tests/test_logger', ['tests/test_runner.cc', 'tests/test_loggerd.cc', 'tests/test_logger.cc'], LIBS=libs + ['curl', 'crypto'])
|