summaryrefslogtreecommitdiffstats
path: root/ipecamera
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2012-07-24 23:37:22 +0200
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2012-07-24 23:37:22 +0200
commite97510491597e7f5abd7d0c822fde060d22e15cb (patch)
treea70a2230e37fb20cccd54bbf4dc36112e13338a7 /ipecamera
parent94051a28c0cd484e47b115f4251fa42d0edba7e5 (diff)
downloadipecamera-e97510491597e7f5abd7d0c822fde060d22e15cb.tar.gz
ipecamera-e97510491597e7f5abd7d0c822fde060d22e15cb.tar.bz2
ipecamera-e97510491597e7f5abd7d0c822fde060d22e15cb.tar.xz
ipecamera-e97510491597e7f5abd7d0c822fde060d22e15cb.zip
Pass through the ipecamera metadata
Diffstat (limited to 'ipecamera')
-rw-r--r--ipecamera/data.c3
-rw-r--r--ipecamera/ipecamera.h3
2 files changed, 4 insertions, 2 deletions
diff --git a/ipecamera/data.c b/ipecamera/data.c
index d753d43..ab3f483 100644
--- a/ipecamera/data.c
+++ b/ipecamera/data.c
@@ -38,7 +38,6 @@ inline static int ipecamera_decode_frame(ipecamera_t *ctx, pcilib_event_id_t eve
int err = 0;
size_t res;
uint16_t *pixels;
- UfoDecoderMeta meta;
int buf_ptr = ipecamera_resolve_event_id(ctx, event_id);
if (buf_ptr < 0) return PCILIB_ERROR_TIMEOUT;
@@ -54,7 +53,7 @@ inline static int ipecamera_decode_frame(ipecamera_t *ctx, pcilib_event_id_t eve
pixels = ctx->image + buf_ptr * ctx->image_size;
memset(ctx->cmask + ctx->buffer_pos * ctx->dim.height, 0, ctx->dim.height * sizeof(ipecamera_change_mask_t));
- res = ufo_decoder_decode_frame(ctx->ipedec, ctx->buffer + buf_ptr * ctx->padded_size, ctx->raw_size, pixels, &meta);
+ res = ufo_decoder_decode_frame(ctx->ipedec, ctx->buffer + buf_ptr * ctx->padded_size, ctx->raw_size, pixels, &ctx->frame[buf_ptr].event.meta);
if (!res) {
ctx->frame[buf_ptr].event.image_broken = 1;
err = PCILIB_ERROR_FAILED;
diff --git a/ipecamera/ipecamera.h b/ipecamera/ipecamera.h
index 19c123b..673eea1 100644
--- a/ipecamera/ipecamera.h
+++ b/ipecamera/ipecamera.h
@@ -1,6 +1,8 @@
#ifndef _IPECAMERA_H
#define _IPECAMERA_H
+#include <ufodecode.h>
+
typedef struct ipecamera_s ipecamera_t;
typedef struct {
@@ -25,6 +27,7 @@ typedef uint16_t ipecamera_pixel_t;
typedef struct {
pcilib_event_info_t info;
+ UfoDecoderMeta meta; /**< Frame metadata declared in ufodecode.h */
int image_ready; /**< Indicates if image data is parsed */
int image_broken; /**< Unlike the info.flags this is bound to the reconstructed image (i.e. is not updated on rawdata overwrite) */
size_t raw_size; /**< Indicates the actual size of raw data */