summaryrefslogtreecommitdiffstats
path: root/src/grabbers/me4.c
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 /src/grabbers/me4.c
parentbc152fef853627c971b1fc9eb3aab985af83b248 (diff)
downloadlibuca-8c48a8ad1c6153770c24ae2e8a9b0f9efedfc4af.tar.gz
libuca-8c48a8ad1c6153770c24ae2e8a9b0f9efedfc4af.tar.bz2
libuca-8c48a8ad1c6153770c24ae2e8a9b0f9efedfc4af.tar.xz
libuca-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 'src/grabbers/me4.c')
-rw-r--r--src/grabbers/me4.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/grabbers/me4.c b/src/grabbers/me4.c
index cc7af2c..f1073ff 100644
--- a/src/grabbers/me4.c
+++ b/src/grabbers/me4.c
@@ -138,9 +138,10 @@ uint32_t uca_me4_stop_acquire(struct uca_grabber *grabber)
return UCA_NO_ERROR;
}
-uint32_t uca_me4_grab(struct uca_grabber *grabber, void **buffer, uint32_t *frame_number)
+uint32_t uca_me4_grab(struct uca_grabber *grabber, void **buffer, uint64_t *frame_number)
{
- static int32_t last_frame = 0;
+ static frameindex_t last_frame = 0;
+
if (grabber->asynchronous)
last_frame = Fg_getLastPicNumberEx(GET_FG(grabber), PORT_A, GET_MEM(grabber));
else
@@ -149,7 +150,7 @@ uint32_t uca_me4_grab(struct uca_grabber *grabber, void **buffer, uint32_t *fram
if (last_frame <= 0)
return UCA_ERR_PROP_GENERAL;
- *frame_number = last_frame;
+ *frame_number = (uint64_t) last_frame;
*buffer = Fg_getImagePtrEx(GET_FG(grabber), last_frame, PORT_A, GET_MEM(grabber));
return UCA_NO_ERROR;
}