refactored code and start work on streaming.

This commit is contained in:
Jordan
2024-03-13 09:02:11 -07:00
parent 5d05c42411
commit cc317d0d24
9 changed files with 191 additions and 85 deletions

20
src/frame.h Normal file
View File

@ -0,0 +1,20 @@
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include "./base.hpp"
typedef struct _Frame
{
FILE *stream;
int w;
int h;
int depth;
} Frame;
FILE *make_buffer(const uint8_t *, const size_t);
_FFI_PLUGIN
const Frame *new_frame_from_handle(FILE *, int, int, int);
_FFI_PLUGIN
const Frame *
new_frame_from_data(const uint8_t *, const size_t, int, int, int);