summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2011-03-23 09:36:41 +0100
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2011-03-23 09:36:41 +0100
commit8c48a8ad1c6153770c24ae2e8a9b0f9efedfc4af (patch)
tree5b39b777aec9dd10b61b1d117fd97c33cc397019 /test
parentbc152fef853627c971b1fc9eb3aab985af83b248 (diff)
downloaduca-8c48a8ad1c6153770c24ae2e8a9b0f9efedfc4af.tar.gz
uca-8c48a8ad1c6153770c24ae2e8a9b0f9efedfc4af.tar.bz2
uca-8c48a8ad1c6153770c24ae2e8a9b0f9efedfc4af.tar.xz
uca-8c48a8ad1c6153770c24ae2e8a9b0f9efedfc4af.zip
Some very important person at SiSo decided to have 64-bit frame numbers on 64-
bit systems and 32-bit frame numbers on 32-bit systems. This commit changes the API to the former, which means it now takes 1.44x10^10 years to have an overflow at a very slow frame rate of 1000 frames per second.
Diffstat (limited to 'test')
-rw-r--r--test/grab-async.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/grab-async.c b/test/grab-async.c
index 5f3694e..058ec3f 100644
--- a/test/grab-async.c
+++ b/test/grab-async.c
@@ -11,18 +11,18 @@ struct image_props {
uint32_t bits;
};
-void grab_callback(uint32_t image_number, void *buffer, void *meta_data, void *user)
+void grab_callback(uint64_t image_number, void *buffer, void *meta_data, void *user)
{
struct image_props *props = (struct image_props *) user;
const int pixel_size = props->bits == 8 ? 1 : 2;
char filename[256];
- sprintf(filename, "out-%04i.raw", image_number);
+ sprintf(filename, "out-%04lu.raw", image_number);
FILE *fp = fopen(filename, "wb");
fwrite(buffer, props->width * props->height, pixel_size, fp);
fclose(fp);
- printf("grabbed picture %i at %p (%ix%i @ %i bits)\n", image_number, buffer, props->width, props->height, props->bits);
+ printf("grabbed picture %lu at %p (%ix%i @ %i bits)\n", image_number, buffer, props->width, props->height, props->bits);
}
int main(int argc, char *argv[])