summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@linux-n4oc.site>2016-12-23 18:45:49 +0100
committerMarcus Meissner <marcus@linux-n4oc.site>2016-12-23 18:46:10 +0100
commitf98954b981571c28d433f32d685d29e507bfccb0 (patch)
treea42f4b4198b8631a52882ef87c5ac049d48ef82d /examples
parentf3581ecbc735d9cb651ae1595a1009e3d0669f67 (diff)
downloadlibgphoto2-f98954b981571c28d433f32d685d29e507bfccb0.tar.gz
add event handling to afl
Diffstat (limited to 'examples')
-rw-r--r--examples/sample-afl.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/sample-afl.c b/examples/sample-afl.c
index 04701ff29..2e7c12958 100644
--- a/examples/sample-afl.c
+++ b/examples/sample-afl.c
@@ -62,6 +62,15 @@ int main(int argc, char **argv) {
}
#endif
printf ("OK, %s\n", summary.text);
+ while (1) {
+ CameraEventType evttype;
+ void *data = NULL;
+
+ ret = gp_camera_wait_for_event(camera, 1, &evttype, &data, context);
+ if (ret < GP_OK) break;
+ if (data) free (data);
+ if (evttype == GP_EVENT_TIMEOUT) break;
+ }
/* AFL PART ENDS HERE */
out: