diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2012-10-23 02:38:08 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2012-10-23 02:38:08 +0200 |
commit | f164f954acfe1171b7b0b3e87dca5e27f5857419 (patch) | |
tree | d38fbb2aa1b77048dd93b9228ad4418222a60f9b /ipecamera/ipecamera.c | |
parent | 5eee7e6aeb3ac256d2a92df33b972e7145ff47c4 (diff) | |
download | ipecamera-f164f954acfe1171b7b0b3e87dca5e27f5857419.tar.gz ipecamera-f164f954acfe1171b7b0b3e87dca5e27f5857419.tar.bz2 ipecamera-f164f954acfe1171b7b0b3e87dca5e27f5857419.tar.xz ipecamera-f164f954acfe1171b7b0b3e87dca5e27f5857419.zip |
More fixes to frame separation in multiframe mode; debugging mode
Diffstat (limited to 'ipecamera/ipecamera.c')
-rw-r--r-- | ipecamera/ipecamera.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ipecamera/ipecamera.c b/ipecamera/ipecamera.c index d1a9102..2868d6b 100644 --- a/ipecamera/ipecamera.c +++ b/ipecamera/ipecamera.c @@ -126,6 +126,14 @@ pcilib_context_t *ipecamera_init(pcilib_t *pcilib) { pcilib_error("Unsupported version of firmware (%lu)", value); } +#ifdef IPECAMERA_BUG_POSTPONED_READ + GET_REG(max_frames_reg, value); + if (value >= ctx->buffer_size) { + ctx->buffer_size = value + 1; + } +#endif /* IPECAMERA_BUG_POSTPONED_READ */ + + ctx->rdma = PCILIB_DMA_ENGINE_INVALID; ctx->wdma = PCILIB_DMA_ENGINE_INVALID; @@ -408,14 +416,14 @@ int ipecamera_start(pcilib_context_t *vctx, pcilib_event_t event_mask, pcilib_ev } // Clean DMA -/* +#ifndef IPECAMERA_BUG_POSTPONED_READ err = pcilib_skip_dma(vctx->pcilib, ctx->rdma); if (err) { ipecamera_stop(vctx, PCILIB_EVENT_FLAGS_DEFAULT); pcilib_error("Can't start grabbing, device continuously writes unexpected data using DMA engine"); return err; } -*/ +#endif /* ! IPECAMERA_BUG_POSTPONED_READ */ if (vctx->params.autostop.duration) { gettimeofday(&ctx->autostop.timestamp, NULL); |