summaryrefslogtreecommitdiffstats
path: root/ipecamera/reader.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2011-12-12 15:27:13 +0100
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2011-12-12 15:27:13 +0100
commitd2dc73cab5b1c08822ce0066251e362f01525f10 (patch)
tree7ee30f3670a1df1d2acd0b84e64e8f3fdf7b47a3 /ipecamera/reader.c
parentd1a0a2e0322e6c5b05ba7817c1c0405dc20e5414 (diff)
downloadipecamera-d2dc73cab5b1c08822ce0066251e362f01525f10.tar.gz
ipecamera-d2dc73cab5b1c08822ce0066251e362f01525f10.tar.bz2
ipecamera-d2dc73cab5b1c08822ce0066251e362f01525f10.tar.xz
ipecamera-d2dc73cab5b1c08822ce0066251e362f01525f10.zip
Minor fixes and improvements
Diffstat (limited to 'ipecamera/reader.c')
-rw-r--r--ipecamera/reader.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ipecamera/reader.c b/ipecamera/reader.c
index f02df0f..3719709 100644
--- a/ipecamera/reader.c
+++ b/ipecamera/reader.c
@@ -75,6 +75,8 @@ static int ipecamera_data_callback(void *user, pcilib_dma_flags_t flags, size_t
ctx->frame[ctx->buffer_pos].event.info.seqnum = ((uint32_t*)buf)[6] & 0xF0000000;
ctx->frame[ctx->buffer_pos].event.info.offset = ((uint32_t*)buf)[7] & 0xF0000000;
*/
+ ctx->frame[ctx->buffer_pos].event.info.seqnum = ctx->event_id + 1;
+
gettimeofday(&ctx->frame[ctx->buffer_pos].event.info.timestamp, NULL);
} else {
// pcilib_warning("Frame magic is not found, ignoring broken data...");
@@ -156,7 +158,7 @@ void *ipecamera_reader_thread(void *user) {
}
usleep(IPECAMERA_NOFRAME_SLEEP);
} else pcilib_error("DMA error while reading IPECamera frames, error: %i", err);
- } else printf("no error\n");
+ } //else printf("no error\n");
//usleep(1000);
}