summaryrefslogtreecommitdiffstats
path: root/test/grab.c
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2012-06-01 09:58:23 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2012-06-01 09:58:23 +0200
commit5d04be2bb442fb9e52bdc1ea490c498cf8667a24 (patch)
tree3c03ba827f106db287e776385d2272e607ca35d6 /test/grab.c
parentacef0fad9a74a133b65c0754082a8cf875387699 (diff)
downloadlibuca-5d04be2bb442fb9e52bdc1ea490c498cf8667a24.tar.gz
libuca-5d04be2bb442fb9e52bdc1ea490c498cf8667a24.tar.bz2
libuca-5d04be2bb442fb9e52bdc1ea490c498cf8667a24.tar.xz
libuca-5d04be2bb442fb9e52bdc1ea490c498cf8667a24.zip
Allow only possible pixel rates when setting
Diffstat (limited to 'test/grab.c')
-rw-r--r--test/grab.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/grab.c b/test/grab.c
index b23420c..5e163b9 100644
--- a/test/grab.c
+++ b/test/grab.c
@@ -38,7 +38,7 @@ int main(int argc, char *argv[])
{
GError *error = NULL;
(void) signal(SIGINT, sigint_handler);
- guint sensor_width, sensor_height, roi_width, roi_height, roi_x, roi_y, bits;
+ guint sensor_width, sensor_height, roi_width, roi_height, roi_x, roi_y, bits, sensor_rate;
g_type_init();
camera = uca_camera_new("pco", &error);
@@ -65,10 +65,11 @@ int main(int argc, char *argv[])
"roi-x", &roi_x,
"roi-y", &roi_y,
"sensor-bitdepth", &bits,
+ "sensor-pixelrate", &sensor_rate,
NULL);
- g_print("Sensor: %ix%i px, ROI %ix%i @ (%i, %i)\n",
- sensor_width, sensor_height, roi_width, roi_height, roi_x, roi_y);
+ g_print("Sensor: %ix%i px, ROI %ix%i @ (%i, %i) and %i Hz\n",
+ sensor_width, sensor_height, roi_width, roi_height, roi_x, roi_y, sensor_rate);
const int pixel_size = bits == 8 ? 1 : 2;
gpointer buffer = g_malloc0(roi_width * roi_height * pixel_size);