From 993fb64bcbf75d2c447b718dff862c2124fbb062 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Fri, 1 May 2015 19:21:14 +0200 Subject: Use pcitool debugging API --- data.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'data.c') diff --git a/data.c b/data.c index d1b890c..50d431a 100644 --- a/data.c +++ b/data.c @@ -61,15 +61,7 @@ inline static int ipecamera_decode_frame(ipecamera_t *ctx, pcilib_event_id_t eve printf("%lu\n", ctx->raw_size);*/ 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); if (!res) { -#ifdef IPECAMERA_DEBUG_BROKEN_FRAMES - char name[128]; - sprintf(name, "%s/broken.%4lu", IPECAMERA_DEBUG_BROKEN_FRAMES, ctx->event_id); - FILE *f = fopen(name, "w"); - if (f) { - fwrite(ctx->buffer + buf_ptr * ctx->padded_size, ctx->raw_size, 1, f); - fclose(f); - } -#endif /* IPECAMERA_DEBUG_BROKEN_FRAMES */ + 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); err = PCILIB_ERROR_FAILED; ctx->frame[buf_ptr].event.image_broken = err; goto ready; -- cgit v1.2.3