mirror of
https://github.com/Harshit-Dhanwalkar/AsciiCam.git
synced 2026-07-21 12:11:01 +02:00
Add hot loading plugins system
This commit is contained in:
parent
509554ba1d
commit
4c7d32663e
12 changed files with 475 additions and 82 deletions
|
|
@ -1,22 +1,23 @@
|
|||
#ifndef THREAD_SHARING_H
|
||||
#define THREAD_SHARING_H
|
||||
|
||||
#include "ascii.h"
|
||||
#include <pthread.h>
|
||||
#include <stdint.h>
|
||||
#include "ascii.h"
|
||||
|
||||
typedef struct {
|
||||
uint8_t *buf[2]; // Double buffer
|
||||
int width, height;
|
||||
int ascii_w, ascii_h;
|
||||
int ready_idx;
|
||||
int has_frame;
|
||||
uint8_t *buf[2]; // Double buffer, one slot per thread
|
||||
int width, height; // capture dimensions
|
||||
int ascii_w, ascii_h;
|
||||
int ready_idx; // which slot has the freshest frame
|
||||
int has_frame; // non-zero once producer has written once
|
||||
pthread_mutex_t lock;
|
||||
pthread_cond_t cond;
|
||||
volatile int stop;
|
||||
ascii_opts_t opts;
|
||||
pthread_cond_t cond;
|
||||
volatile int stop;
|
||||
ascii_opts_t opts;
|
||||
} shared_frame_t;
|
||||
|
||||
void *capture_thread(void *arg);
|
||||
void *render_thread (void *arg);
|
||||
void *render_thread(void *arg);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue