summaryrefslogtreecommitdiffstats
path: root/src/uca-grabber.h
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de>2011-02-28 14:26:32 +0100
committerMatthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de>2011-02-28 14:26:32 +0100
commitf588f10b6fc6e452d42a66abc56028fe21cd56c2 (patch)
tree075e37f2e76936b42fc420071035ea5f6788d869 /src/uca-grabber.h
parent31a9401a4c18fea613d8a508583dd657c41c384c (diff)
downloadlibuca-f588f10b6fc6e452d42a66abc56028fe21cd56c2.tar.gz
libuca-f588f10b6fc6e452d42a66abc56028fe21cd56c2.tar.bz2
libuca-f588f10b6fc6e452d42a66abc56028fe21cd56c2.tar.xz
libuca-f588f10b6fc6e452d42a66abc56028fe21cd56c2.zip
Prepare for frame grabber abstraction
Diffstat (limited to 'src/uca-grabber.h')
-rw-r--r--src/uca-grabber.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/uca-grabber.h b/src/uca-grabber.h
new file mode 100644
index 0000000..b01f453
--- /dev/null
+++ b/src/uca-grabber.h
@@ -0,0 +1,46 @@
+#ifndef __UNIFIED_CAMERA_ACCESS_GRABBER_H
+#define __UNIFIED_CAMERA_ACCESS_GRABBER_H
+
+/*
+ * --- virtual methods --------------------------------------------------------
+ */
+
+/**
+ * \brief Camera probing and initialization
+ * \return UCA_ERR_INIT_NOT_FOUND if camera is not found or could not be initialized
+ */
+typedef uint32_t (*uca_grabber_init) (struct uca_grabber_t **grabber);
+
+/**
+ * \brief Free camera resouces
+ */
+typedef uint32_t (*uca_grabber_destroy) (struct uca_grabber_t *grabber);
+
+/**
+ * \brief Set a property
+ * \param[in] property_name Name of the property as defined in XXX
+ * \return UCA_ERR_PROP_INVALID if property is not supported on the camera or
+ * UCA_ERR_PROP_VALUE_OUT_OF_RANGE if value cannot be set.
+ */
+typedef uint32_t (*uca_grabber_set_property) (struct uca_grabber_t *grabber, enum uca_property_ids property, void *data);
+
+/**
+ * \brief Set a property
+ * \param[in] property_name Name of the property as defined in XXX
+ * \return UCA_ERR_PROP_INVALID if property is not supported on the camera
+ */
+typedef uint32_t (*uca_grabber_get_property) (struct uca_grabber_t *grabber, enum uca_property_ids property, void *data);
+
+
+struct uca_grabber_t {
+ struct uca_grabber_t *next;
+
+ /* Function pointers to grabber-specific methods */
+ uca_grabber_set_property set_property;
+ uca_grabber_get_property get_property;
+
+ /* Private */
+ void *user;
+};
+
+#endif