|
|
@ -351,10 +351,8 @@ void set_exposure_target(CameraState *c, const uint8_t *pix_ptr, int x_start, in |
|
|
|
extern volatile sig_atomic_t do_exit; |
|
|
|
extern volatile sig_atomic_t do_exit; |
|
|
|
|
|
|
|
|
|
|
|
void *processing_thread(MultiCameraState *cameras, const char *tname, |
|
|
|
void *processing_thread(MultiCameraState *cameras, const char *tname, |
|
|
|
CameraState *cs, int priority, process_thread_cb callback) { |
|
|
|
CameraState *cs, process_thread_cb callback) { |
|
|
|
set_thread_name(tname); |
|
|
|
set_thread_name(tname); |
|
|
|
int err = set_realtime_priority(priority); |
|
|
|
|
|
|
|
LOG("%s start! setpriority returns %d", tname, err); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int cnt = 0; !do_exit; cnt++) { |
|
|
|
for (int cnt = 0; !do_exit; cnt++) { |
|
|
|
if (!cs->buf.acquire()) continue; |
|
|
|
if (!cs->buf.acquire()) continue; |
|
|
@ -367,8 +365,8 @@ void *processing_thread(MultiCameraState *cameras, const char *tname, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
std::thread start_process_thread(MultiCameraState *cameras, const char *tname, |
|
|
|
std::thread start_process_thread(MultiCameraState *cameras, const char *tname, |
|
|
|
CameraState *cs, int priority, process_thread_cb callback) { |
|
|
|
CameraState *cs, process_thread_cb callback) { |
|
|
|
return std::thread(processing_thread, cameras, tname, cs, priority, callback); |
|
|
|
return std::thread(processing_thread, cameras, tname, cs, callback); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void common_camera_process_front(SubMaster *sm, PubMaster *pm, CameraState *c, int cnt) { |
|
|
|
void common_camera_process_front(SubMaster *sm, PubMaster *pm, CameraState *c, int cnt) { |
|
|
|