Camerad: small cleanup (#24992)

* remove CameraExpInfo

* remove release callback
pull/24964/head
Dean Lee 3 years ago committed by GitHub
parent 7178800d84
commit e20d2cfa9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      system/camerad/cameras/camera_common.cc
  2. 10
      system/camerad/cameras/camera_common.h

@ -66,11 +66,10 @@ private:
bool hdr_;
};
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) {
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) {
vipc_server = v;
this->rgb_type = init_rgb_type;
this->yuv_type = init_yuv_type;
this->release_callback = init_release_callback;
const CameraInfo *ci = &s->ci;
camera_state = s;
@ -169,9 +168,7 @@ bool CameraBuf::acquire() {
}
void CameraBuf::release() {
if (release_callback) {
release_callback((void*)camera_state, cur_buf_idx);
}
// Empty
}
void CameraBuf::queue(size_t buf_idx) {

@ -48,8 +48,6 @@ const bool env_disable_driver = getenv("DISABLE_DRIVER") != NULL;
const bool env_debug_frames = getenv("DEBUG_FRAMES") != NULL;
const bool env_log_raw_frames = getenv("LOG_RAW_FRAMES") != NULL;
typedef void (*release_cb)(void *cookie, int buf_idx);
typedef struct CameraInfo {
uint32_t frame_width, frame_height;
uint32_t frame_stride;
@ -85,11 +83,6 @@ typedef struct FrameMetadata {
float processing_time;
} FrameMetadata;
typedef struct CameraExpInfo {
int op_id;
float grey_frac;
} CameraExpInfo;
struct MultiCameraState;
struct CameraState;
class Debayer;
@ -108,7 +101,6 @@ private:
SafeQueue<int> safe_queue;
int frame_buf_count;
release_cb release_callback;
public:
cl_command_queue q;
@ -124,7 +116,7 @@ public:
CameraBuf() = default;
~CameraBuf();
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);
void init(cl_device_id device_id, cl_context context, CameraState *s, VisionIpcServer * v, int frame_cnt, VisionStreamType rgb_type, VisionStreamType yuv_type);
bool acquire();
void release();
void queue(size_t buf_idx);

Loading…
Cancel
Save