diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2011-05-12 14:55:14 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2011-05-12 14:55:14 +0200 |
commit | 50d25aa6d552e41509ad1be75e3d222abd49c900 (patch) | |
tree | d19a5d8c9c8d3bae47ea99365e870c34db4b6a7f | |
parent | b0a0f5c0aabb534bbd00267dcc70a44927d7b707 (diff) | |
download | uca-50d25aa6d552e41509ad1be75e3d222abd49c900.tar.gz uca-50d25aa6d552e41509ad1be75e3d222abd49c900.tar.bz2 uca-50d25aa6d552e41509ad1be75e3d222abd49c900.tar.xz uca-50d25aa6d552e41509ad1be75e3d222abd49c900.zip |
Add binning and "fix" that damn 64-bit format thing in grab-async.c
-rw-r--r-- | src/uca.c | 2 | ||||
-rw-r--r-- | src/uca.h | 2 | ||||
-rw-r--r-- | test/grab-async.c | 6 |
3 files changed, 8 insertions, 2 deletions
@@ -58,6 +58,8 @@ static struct uca_property property_map[UCA_PROP_LAST+1] = { { "Image.Offset.y", uca_pixel, uca_uint32t, uca_readwrite }, { "Image.Offset.y.Min", uca_pixel, uca_uint32t, uca_read }, { "Image.Offset.y.Max", uca_pixel, uca_uint32t, uca_read }, + { "Image.Binning.x", uca_pixel, uca_uint32t, uca_readwrite }, + { "Image.Binning.y", uca_pixel, uca_uint32t, uca_readwrite }, { "Image.Bitdepth", uca_bits, uca_uint32t, uca_read}, { "Time.Exposure", uca_us, uca_uint32t, uca_readwrite }, { "Time.Exposure.Min", uca_us, uca_uint32t, uca_read }, @@ -81,6 +81,8 @@ enum uca_property_ids { UCA_PROP_Y_OFFSET, UCA_PROP_Y_OFFSET_MIN, UCA_PROP_Y_OFFSET_MAX, + UCA_PROP_BINNING_X, + UCA_PROP_BINNING_Y, UCA_PROP_BITDEPTH, UCA_PROP_EXPOSURE, UCA_PROP_EXPOSURE_MIN, diff --git a/test/grab-async.c b/test/grab-async.c index 0a7d33f..945bf15 100644 --- a/test/grab-async.c +++ b/test/grab-async.c @@ -16,12 +16,14 @@ void grab_callback(uint64_t image_number, void *buffer, void *meta_data, void *u const int pixel_size = props->bits == 8 ? 1 : 2; char filename[256]; - sprintf(filename, "out-%04llu.raw", image_number); + sprintf(filename, "out-%04i.raw", (int) image_number); FILE *fp = fopen(filename, "wb"); fwrite(buffer, props->width * props->height, pixel_size, fp); fclose(fp); - printf("grabbed picture %llu at %p (%ix%i @ %i bits)\n", image_number, buffer, props->width, props->height, props->bits); + printf("grabbed picture %i at %p (%ix%i @ %i bits)\n", + (int) image_number, buffer, + props->width, props->height, props->bits); } int main(int argc, char *argv[]) |