diff options
Diffstat (limited to 'bin/tools')
-rw-r--r-- | bin/tools/grab.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bin/tools/grab.c b/bin/tools/grab.c index 50c70a8..a3dd544 100644 --- a/bin/tools/grab.c +++ b/bin/tools/grab.c @@ -77,7 +77,7 @@ write_tiff (UcaRingBuffer *buffer, gpointer data; gsize offset = 0; - data = uca_ring_buffer_get_pointer (buffer, i); + data = uca_ring_buffer_get_read_pointer (buffer); TIFFSetField (tif, TIFFTAG_IMAGEWIDTH, width); TIFFSetField (tif, TIFFTAG_IMAGELENGTH, height); @@ -119,7 +119,7 @@ write_raw (UcaRingBuffer *buffer, filename = g_strdup_printf ("frame-%08i.raw", i); fp = fopen(filename, "wb"); - data = uca_ring_buffer_get_pointer (buffer, i); + data = uca_ring_buffer_get_read_pointer (buffer); fwrite (data, size, 1, fp); fclose (fp); @@ -169,8 +169,7 @@ record_frames (UcaCamera *camera, Options *opts) while (1) { gdouble elapsed; - uca_camera_grab (camera, uca_ring_buffer_get_current_pointer (buffer), &error); - uca_ring_buffer_proceed (buffer); + uca_camera_grab (camera, uca_ring_buffer_get_write_pointer (buffer), &error); if (error != NULL) return error; |