mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-07-11 07:52:03 +08:00
bug fixes
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <memory>
|
||||
@@ -34,6 +35,10 @@
|
||||
#define LOG_CAMERA_ID_QCAMERA 3
|
||||
#define LOG_CAMERA_ID_MAX 4
|
||||
|
||||
const bool env_send_front = getenv("SEND_FRONT") != NULL;
|
||||
const bool env_send_rear = getenv("SEND_REAR") != NULL;
|
||||
const bool env_send_wide = getenv("SEND_WIDE") != NULL;
|
||||
|
||||
typedef struct CameraInfo {
|
||||
const char* name;
|
||||
int frame_width, frame_height;
|
||||
@@ -58,6 +63,7 @@ typedef struct LogCameraInfo {
|
||||
|
||||
typedef struct FrameMetadata {
|
||||
uint32_t frame_id;
|
||||
uint64_t timestamp_sof; // only set on tici
|
||||
uint64_t timestamp_eof;
|
||||
unsigned int frame_length;
|
||||
unsigned int integ_lines;
|
||||
@@ -128,6 +134,7 @@ public:
|
||||
typedef void (*process_thread_cb)(MultiCameraState *s, CameraState *c, int cnt);
|
||||
|
||||
void fill_frame_data(cereal::FrameData::Builder &framed, const FrameMetadata &frame_data, uint32_t cnt);
|
||||
void fill_frame_image(cereal::FrameData::Builder &framed, uint8_t *dat, int w, int h, int stride);
|
||||
void create_thumbnail(MultiCameraState *s, CameraState *c, uint8_t *bgr_ptr);
|
||||
void set_exposure_target(CameraState *c, const uint8_t *pix_ptr, int x_start, int x_end, int x_skip, int y_start, int y_end, int y_skip);
|
||||
std::thread start_process_thread(MultiCameraState *cameras, const char *tname,
|
||||
|
||||
@@ -205,6 +205,7 @@ void* visionserver_client_thread(void* arg) {
|
||||
stream_i == VISION_STREAM_YUV_WIDE) {
|
||||
CameraBuf *b = get_camerabuf_by_type(s, (VisionStreamType)stream_i);
|
||||
rep.d.stream_acq.extra.frame_id = b->yuv_metas[idx].frame_id;
|
||||
rep.d.stream_acq.extra.timestamp_sof = b->yuv_metas[idx].timestamp_sof;
|
||||
rep.d.stream_acq.extra.timestamp_eof = b->yuv_metas[idx].timestamp_eof;
|
||||
}
|
||||
vipc_send(fd, &rep);
|
||||
|
||||
@@ -57,6 +57,7 @@ typedef struct VisionStreamBufs {
|
||||
typedef struct VIPCBufExtra {
|
||||
// only for yuv
|
||||
uint32_t frame_id;
|
||||
uint64_t timestamp_sof;
|
||||
uint64_t timestamp_eof;
|
||||
} VIPCBufExtra;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user