From 71e45c737362a152fbdce54091c56cf0f7d27cd2 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Fri, 12 Jun 2015 09:36:55 +0200 Subject: grab: allow setting the exposure time --- bin/tools/grab.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bin/tools/grab.c') diff --git a/bin/tools/grab.c b/bin/tools/grab.c index f355fcb..c6a0d71 100644 --- a/bin/tools/grab.c +++ b/bin/tools/grab.c @@ -33,6 +33,7 @@ typedef struct { gint n_frames; gdouble duration; + gdouble exposure_time; gchar *filename; #ifdef HAVE_LIBTIFF gboolean write_tiff; @@ -219,6 +220,7 @@ main (int argc, char *argv[]) static Options opts = { .n_frames = -1, .duration = -1.0, + .exposure_time = 0.001, .filename = NULL, #ifdef HAVE_LIBTIFF .write_tiff = FALSE, @@ -228,6 +230,7 @@ main (int argc, char *argv[]) static GOptionEntry entries[] = { { "num-frames", 'n', 0, G_OPTION_ARG_INT, &opts.n_frames, "Number of frames to acquire", "N" }, { "duration", 'd', 0, G_OPTION_ARG_DOUBLE, &opts.duration, "Duration in seconds", NULL }, + { "exposure-time", 'e', 0, G_OPTION_ARG_DOUBLE, &opts.exposure_time, "Exposure time in seconds", NULL }, { "output", 'o', 0, G_OPTION_ARG_STRING, &opts.filename, "Output file name", "FILE" }, #ifdef HAVE_LIBTIFF { "write-tiff", 't', 0, G_OPTION_ARG_NONE, &opts.write_tiff, "Write as TIFF", NULL }, @@ -265,6 +268,7 @@ main (int argc, char *argv[]) goto cleanup_camera; } + g_object_set (camera, "exposure-time", opts.exposure_time, NULL); error = record_frames (camera, &opts); if (error != NULL) -- cgit v1.2.3