summaryrefslogtreecommitdiffstats
path: root/data.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2015-05-01 19:21:14 +0200
committerSuren A. Chilingaryan <csa@suren.me>2015-05-01 19:21:14 +0200
commit993fb64bcbf75d2c447b718dff862c2124fbb062 (patch)
treece03e8a995123b66980d1cf731fc021b97129d81 /data.c
parentab46db4c388d126095e8e4d8fc3d7aa191a3d649 (diff)
downloadipecamera-993fb64bcbf75d2c447b718dff862c2124fbb062.tar.gz
ipecamera-993fb64bcbf75d2c447b718dff862c2124fbb062.tar.bz2
ipecamera-993fb64bcbf75d2c447b718dff862c2124fbb062.tar.xz
ipecamera-993fb64bcbf75d2c447b718dff862c2124fbb062.zip
Use pcitool debugging API
Diffstat (limited to 'data.c')
-rw-r--r--data.c10
1 files changed, 1 insertions, 9 deletions
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;