AsciiCam/C/include/thread_sharing.h

23 lines
474 B
C
Raw Normal View History

2026-05-24 17:13:03 +05:30
#ifndef THREAD_SHARING_H
#include <pthread.h>
#include <stdint.h>
#include "ascii.h"
typedef struct {
2026-05-24 17:13:03 +05:30
uint8_t *buf[2]; // Double buffer
int width, height;
int ascii_w, ascii_h;
int ready_idx;
int has_frame;
pthread_mutex_t lock;
2026-05-24 17:13:03 +05:30
pthread_cond_t cond;
volatile int stop;
ascii_opts_t opts;
} shared_frame_t;
2026-05-24 17:13:03 +05:30
void *capture_thread(void *arg);
void *render_thread (void *arg);
#endif