Add recorder

Implement recording in a separate "class".
This commit is contained in:
Romain Vimont
2018-11-09 12:21:17 +01:00
parent d706c5df39
commit 27686e9361
6 changed files with 168 additions and 55 deletions

View File

@@ -15,13 +15,13 @@ struct decoder {
socket_t video_socket;
SDL_Thread *thread;
SDL_mutex *mutex;
const char *out_filename;
struct size frame_size;
struct recorder *recorder;
int remaining;
};
void decoder_init(struct decoder *decoder, struct frames *frames, socket_t video_socket, struct size frame_size);
SDL_bool decoder_start(struct decoder *decoder, const char *out_filename);
void decoder_init(struct decoder *decoder, struct frames *frames,
socket_t video_socket, struct recorder *recoder);
SDL_bool decoder_start(struct decoder *decoder);
void decoder_stop(struct decoder *decoder);
void decoder_join(struct decoder *decoder);