diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2015-08-06 03:08:42 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2015-08-06 03:08:42 +0200 |
commit | 8b83e894d3b8859703304936b1b21f3d3ff6d211 (patch) | |
tree | c4c7f7e8249d8ec1475f47a115adf1f22ad921b1 /private.h | |
parent | 3e4b1ebf881a61900c4bab96dc7a7f3963b6d891 (diff) | |
download | ipecamera-8b83e894d3b8859703304936b1b21f3d3ff6d211.tar.gz ipecamera-8b83e894d3b8859703304936b1b21f3d3ff6d211.tar.bz2 ipecamera-8b83e894d3b8859703304936b1b21f3d3ff6d211.tar.xz ipecamera-8b83e894d3b8859703304936b1b21f3d3ff6d211.zip |
Use new locking subsystem to ensure integrity
Diffstat (limited to 'private.h')
-rw-r--r-- | private.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -4,6 +4,7 @@ #include <pthread.h> #include <pcilib/model.h> #include <pcilib/debug.h> +#include <pcilib/locking.h> #include "ipecamera.h" #include "env.h" @@ -163,6 +164,13 @@ struct ipecamera_s { pcilib_context_t event; UfoDecoder *ipedec; + pcilib_lock_t *run_lock; /**< Lock protecting global camera operation */ + pcilib_lock_t *stream_lock; /**< Lock protecting stream/next_frame operations */ + pcilib_lock_t *trigger_lock; /**< Lock protecting stream/next_frame operations */ + int run_locked; /**< Flag indicating if camera is currently locked */ + int stream_locked; /**< Flag indicating if camera is currently locked */ + int trigger_locked; /**< Flag indicating if camera is currently locked */ + char *data; ipecamera_pixel_t *image; size_t size; |