|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
42 return (
B->tv_sec -
A->tv_sec) * 1000000 + (
B->tv_usec -
A->tv_usec);
52 new_listener->
active =
true;
54 new_listener->
next = NULL;
55 new_listener->
async = NULL;
57 new_listener->
id =
id;
126 #if CV_ALLOW_VIDEO_TO_CHANGE_SIZE
205 if (result != NULL) {
void image_create(struct image_t *img, uint16_t width, uint16_t height, enum image_type type)
Create a new image.
struct video_listener * next
enum image_type type
The image type.
static uint32_t timeval_diff(struct timeval *A, struct timeval *B)
struct video_listener * cv_add_to_device(struct video_config_t *device, cv_function func, uint16_t fps, uint8_t id)
int8_t cv_async_function(struct cv_async *async, struct image_t *img)
void image_free(struct image_t *img)
Free the image.
struct video_listener * cv_add_to_device_async(struct video_config_t *device, cv_function func, int nice_level, uint16_t fps, uint8_t id)
static int set_nice_level(int level)
volatile bool thread_running
uint32_t buf_size
The buffer size.
struct video_listener * cv_listener
The first computer vision listener in the linked list for this video device.
struct video_listener * listener
volatile bool img_processed
void image_copy(struct image_t *input, struct image_t *output)
Copy an image from inut to output This will only work if the formats are the same.
void cv_attach_listener(struct video_config_t *device, struct video_listener *new_listener)
volatile int thread_priority
pthread_cond_t img_available
struct image_t *(* cv_function)(struct image_t *img, uint8_t camera_id)
bool add_video_device(struct video_config_t *device)
Keep track of video devices added by modules.
struct timeval ts
The timestamp of creation.
void * buf
Image buffer (depending on the image_type)
void cv_run_device(struct video_config_t *device, struct image_t *img)
void * cv_async_thread(void *args)
pthread_mutex_t img_mutex