diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-03-11 19:34:18 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-03-11 19:34:18 -0500 |
commit | a0a8aaf5170eab149ee0fed4d7846e0df856a2e4 (patch) | |
tree | 8e301f0c0279bdd5b592f1c63004b650fab3470f /mpjpeg.h | |
parent | 77f1df1a250d958317c930e6f3a36edf42f11d09 (diff) |
split into separate executables
Diffstat (limited to 'mpjpeg.h')
-rw-r--r-- | mpjpeg.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/mpjpeg.h b/mpjpeg.h new file mode 100644 index 0000000..7a51006 --- /dev/null +++ b/mpjpeg.h @@ -0,0 +1,22 @@ +#pragma once + +#include <pthread.h> + +struct frame { + ssize_t len; + size_t cap; + char *data; +}; + +struct mpjpeg_stream { + struct frame a; + struct frame b; + + struct frame *front; + struct frame *back; + pthread_mutex_t frontlock; +}; + +void mpjpeg_reader(struct mpjpeg_stream *s, int fd, const char *boundary); +void mpjpeg_writer(struct mpjpeg_stream *s, int fd, const char *boundary); +void init_mpjpeg_stream(); |