Skip to content

Commit cd1ab66

Browse files
deanleespektor56
authored andcommitted
Camerad: small cleanup (commaai#24992)
* remove CameraExpInfo * remove release callback
1 parent 4df8f3f commit cd1ab66

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

system/camerad/cameras/camera_common.cc

+2-5
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,10 @@ class Debayer {
8888
bool hdr_;
8989
};
9090

91-
void CameraBuf::init(cl_device_id device_id, cl_context context, CameraState *s, VisionIpcServer * v, int frame_cnt, VisionStreamType init_rgb_type, VisionStreamType init_yuv_type, release_cb init_release_callback) {
91+
void CameraBuf::init(cl_device_id device_id, cl_context context, CameraState *s, VisionIpcServer * v, int frame_cnt, VisionStreamType init_rgb_type, VisionStreamType init_yuv_type) {
9292
vipc_server = v;
9393
this->rgb_type = init_rgb_type;
9494
this->yuv_type = init_yuv_type;
95-
this->release_callback = init_release_callback;
9695

9796
const CameraInfo *ci = &s->ci;
9897
camera_state = s;
@@ -204,9 +203,7 @@ bool CameraBuf::acquire() {
204203
}
205204

206205
void CameraBuf::release() {
207-
if (release_callback) {
208-
release_callback((void*)camera_state, cur_buf_idx);
209-
}
206+
// Empty
210207
}
211208

212209
void CameraBuf::queue(size_t buf_idx) {

system/camerad/cameras/camera_common.h

+1-9
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ const bool env_disable_driver = getenv("DISABLE_DRIVER") != NULL;
4949
const bool env_debug_frames = getenv("DEBUG_FRAMES") != NULL;
5050
const bool env_log_raw_frames = getenv("LOG_RAW_FRAMES") != NULL;
5151

52-
typedef void (*release_cb)(void *cookie, int buf_idx);
53-
5452
typedef struct CameraInfo {
5553
uint32_t frame_width, frame_height;
5654
uint32_t frame_stride;
@@ -86,11 +84,6 @@ typedef struct FrameMetadata {
8684
float processing_time;
8785
} FrameMetadata;
8886

89-
typedef struct CameraExpInfo {
90-
int op_id;
91-
float grey_frac;
92-
} CameraExpInfo;
93-
9487
struct MultiCameraState;
9588
struct CameraState;
9689
class Debayer;
@@ -109,7 +102,6 @@ class CameraBuf {
109102
SafeQueue<int> safe_queue;
110103

111104
int frame_buf_count;
112-
release_cb release_callback;
113105

114106
public:
115107
cl_command_queue q;
@@ -125,7 +117,7 @@ class CameraBuf {
125117

126118
CameraBuf() = default;
127119
~CameraBuf();
128-
void init(cl_device_id device_id, cl_context context, CameraState *s, VisionIpcServer * v, int frame_cnt, VisionStreamType rgb_type, VisionStreamType yuv_type, release_cb release_callback=nullptr);
120+
void init(cl_device_id device_id, cl_context context, CameraState *s, VisionIpcServer * v, int frame_cnt, VisionStreamType rgb_type, VisionStreamType yuv_type);
129121
bool acquire();
130122
void release();
131123
void queue(size_t buf_idx);

0 commit comments

Comments
 (0)