From a0a8aaf5170eab149ee0fed4d7846e0df856a2e4 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 11 Mar 2016 19:34:18 -0500 Subject: split into separate executables --- mpjpeg.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 mpjpeg.h (limited to 'mpjpeg.h') 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 + +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(); -- cgit v1.2.3-54-g00ecf