/alps/ipecamera

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/ipecamera

« back to all changes in this revision

Viewing changes to dma/nwl_engine.c

  • Committer: Suren A. Chilingaryan
  • Date: 2011-12-12 04:45:35 UTC
  • Revision ID: csa@dside.dyndns.org-20111212044535-6no1q7g230i8uvlv
multithread preprocessing of ipecamera frames and code reorganization

Show diffs side-by-side

added added

removed removed

Lines of Context:
267
267
 
268
268
int dma_nwl_stream_read(pcilib_dma_context_t *vctx, pcilib_dma_engine_t dma, uintptr_t addr, size_t size, pcilib_dma_flags_t flags, pcilib_timeout_t timeout, pcilib_dma_callback_t cb, void *cbattr) {
269
269
    int err, ret = PCILIB_STREAMING_REQ_PACKET;
 
270
    pcilib_timeout_t wait = 0;
270
271
    size_t res = 0;
271
272
    size_t bufnum;
272
273
    size_t bufsize;
273
 
    pcilib_timeout_t wait;
274
274
    
275
275
    nwl_dma_t *ctx = (nwl_dma_t*)vctx;
276
276
 
277
 
    size_t buf_size;
278
277
    int eop;
279
278
 
280
279
    pcilib_nwl_engine_description_t *info = ctx->engines + dma;
286
285
        switch (ret&PCILIB_STREAMING_TIMEOUT_MASK) {
287
286
            case PCILIB_STREAMING_CONTINUE: wait = PCILIB_DMA_TIMEOUT; break;
288
287
            case PCILIB_STREAMING_WAIT: wait = timeout; break;
289
 
            case PCILIB_STREAMING_CHECK: wait = 0; break;
 
288
//          case PCILIB_STREAMING_CHECK: wait = 0; break;
290
289
        }
291
290
    
292
291
        bufnum = dma_nwl_wait_buffer(ctx, info, &bufsize, &eop, wait);