diff options
author | nathansmith <nathansmith@posteo.com> | 2025-04-26 17:24:04 +0000 |
---|---|---|
committer | nathansmith <nathansmith@posteo.com> | 2025-04-26 17:24:04 +0000 |
commit | 6d338602aa98cc9dfab39b83702af0e548286596 (patch) | |
tree | 8127ea3ea5431d91a1c9c6e3c3a4a0f533807288 /src/ffmpeg.h | |
parent | 607d9eacb2c3b0a7be5bba3cf5cc8dc80388342c (diff) | |
download | sldj-6d338602aa98cc9dfab39b83702af0e548286596.tar.gz sldj-6d338602aa98cc9dfab39b83702af0e548286596.tar.bz2 sldj-6d338602aa98cc9dfab39b83702af0e548286596.zip |
Working on ffmpeg finally
Diffstat (limited to 'src/ffmpeg.h')
-rw-r--r-- | src/ffmpeg.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/ffmpeg.h b/src/ffmpeg.h index 56ef6d9..71277a5 100644 --- a/src/ffmpeg.h +++ b/src/ffmpeg.h @@ -1,10 +1,35 @@ +#include <assert.h> #include <stdio.h> +#include <stdint.h> #include <stdlib.h> +#include <string.h> +#include <errno.h> + +#include <signal.h> +#include <sys/types.h> +#include <sys/wait.h> +#include <unistd.h> + +#include <raylib.h> #include "sldjConfig.h" +// stolen code: https://github.com/tsoding/musializer/blob/master/src/ffmpeg_posix.c + #ifndef FFMPEG_H #define FFMPEG_H +#define READ_END 0 +#define WRITE_END 1 + +typedef struct FFMPEG { + int pipe; + pid_t pid; +} FFMPEG; + +FFMPEG* ffmpegStart(const char* filename, int width, int height, int fps); +int ffmpegSendFrame(FFMPEG* ffmpeg, void* data, int widtth, int height); +int ffmpegEnd(FFMPEG* ffmpeg); + #endif |