Commit 4083f5e2 authored by Éric Thiébaut's avatar Éric Thiébaut
Browse files

Count dropped frames

parent 111c5822
......@@ -749,7 +749,13 @@ static tao_status on_wait_buffer(
max_pending = dev->pending;
}
while (dev->buf.data != NULL || dev->pending > max_pending) {
dev->buf.data = NULL; // never automatically release more than once
if (dev->buf.data == NULL) {
// Count this as a lost frame.
++dev->base.info.lostframes;
} else {
// Never automatically release more than once.
dev->buf.data = NULL;
}
etStat code = PHX_StreamRead(dev->handle, PHX_BUFFER_RELEASE, NULL);
if (code != PHX_OK) {
// Not being able to release the buffer require more elaborated
......@@ -902,7 +908,7 @@ static void acquisition_callback(
}
if (dev->events != 0) {
// Signal condition for waiting thread.
tao_camera_broadcast(cam);
tao_camera_broadcast(cam); // FIXME: check status
}
if (tao_camera_unlock(cam) != TAO_OK) {
tao_panic();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment