/alps/ipecamera

To get this branch, use:
bzr branch http://darksoft.org/webbzr/alps/ipecamera

« back to all changes in this revision

Viewing changes to data.c

  • Committer: Suren A. Chilingaryan
  • Date: 2015-08-13 15:25:54 UTC
  • Revision ID: csa@suren.me-20150813152554-yafqdd9kwo0wcj1j
Add few warning about problems with frames

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
 
59
59
    res = ufo_decoder_decode_frame(ctx->ipedec, ctx->buffer + buf_ptr * ctx->padded_size, ctx->frame[buf_ptr].event.raw_size, pixels, &ctx->frame[buf_ptr].event.meta);
60
60
    if (!res) {
 
61
        pcilib_warning("Decoding of frame %u has failed, ufodecode returns error %i", ctx->event_id, res);
61
62
        ipecamera_debug_buffer(BROKEN_FRAMES, ctx->frame[buf_ptr].event.raw_size, ctx->buffer + buf_ptr * ctx->padded_size, PCILIB_DEBUG_BUFFER_MKDIR, "broken_frame.%4lu", ctx->event_id);
62
63
        err = PCILIB_ERROR_FAILED;
63
64
        ctx->frame[buf_ptr].event.image_broken = err;
192
193
    ipecamera_debug(API, "ipecamera: get (data)");
193
194
 
194
195
    buf_ptr = ipecamera_resolve_event_id(ctx, event_id);
195
 
    if (buf_ptr < 0) return PCILIB_ERROR_OVERWRITTEN;
196
 
    
 
196
    if (buf_ptr < 0) {
 
197
        pcilib_warning("The data of requested frame %zu was overwritten", event_id);
 
198
        return PCILIB_ERROR_OVERWRITTEN;
 
199
    }
 
200
 
197
201
    switch ((ipecamera_data_type_t)data_type) {
198
202
        case IPECAMERA_RAW_DATA:
199
203
            raw_size = ctx->frame[buf_ptr].event.raw_size;