summaryrefslogtreecommitdiffstats
path: root/sys/qcam
diff options
context:
space:
mode:
Diffstat (limited to 'sys/qcam')
-rw-r--r--sys/qcam/gstqcamsrc.h48
-rw-r--r--sys/qcam/qcam-Linux.h2
-rw-r--r--sys/qcam/qcam-os.h2
-rw-r--r--sys/qcam/qcam.h117
-rw-r--r--sys/qcam/qcamip.h18
5 files changed, 93 insertions, 94 deletions
diff --git a/sys/qcam/gstqcamsrc.h b/sys/qcam/gstqcamsrc.h
index c6e763d4..0bd201c8 100644
--- a/sys/qcam/gstqcamsrc.h
+++ b/sys/qcam/gstqcamsrc.h
@@ -25,9 +25,8 @@
#include <gst/gst.h>
#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
+extern "C" {
+#endif /* __cplusplus */
/** QuickCam include files */
#include "qcam.h"
@@ -45,38 +44,35 @@ extern "C"
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_QCAMSRC))
/* NOTE: per-element flags start with 16 for now */
- typedef enum
- {
- GST_QCAMSRC_OPEN = GST_ELEMENT_FLAG_LAST,
+typedef enum {
+ GST_QCAMSRC_OPEN = GST_ELEMENT_FLAG_LAST,
- GST_QCAMSRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2,
- } GstQCamSrcFlags;
+ GST_QCAMSRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST+2,
+} GstQCamSrcFlags;
- typedef struct _GstQCamSrc GstQCamSrc;
- typedef struct _GstQCamSrcClass GstQCamSrcClass;
+typedef struct _GstQCamSrc GstQCamSrc;
+typedef struct _GstQCamSrcClass GstQCamSrcClass;
- struct _GstQCamSrc
- {
- GstElement element;
+struct _GstQCamSrc {
+ GstElement element;
- /* pads */
- GstPad *srcpad;
+ /* pads */
+ GstPad *srcpad;
- struct qcam *qcam;
- gboolean autoexposure;
- gint port;
- };
+ struct qcam *qcam;
+ gboolean autoexposure;
+ gint port;
+};
- struct _GstQCamSrcClass
- {
- GstElementClass parent_class;
- };
+struct _GstQCamSrcClass {
+ GstElementClass parent_class;
+};
- GType gst_qcamsrc_get_type (void);
+GType gst_qcamsrc_get_type(void);
#ifdef __cplusplus
}
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-#endif /* __GST_QCAMSRC_H__ */
+#endif /* __GST_QCAMSRC_H__ */
diff --git a/sys/qcam/qcam-Linux.h b/sys/qcam/qcam-Linux.h
index 06c1cb20..46dcbe51 100644
--- a/sys/qcam/qcam-Linux.h
+++ b/sys/qcam/qcam-Linux.h
@@ -28,3 +28,5 @@ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
+
+
diff --git a/sys/qcam/qcam-os.h b/sys/qcam/qcam-os.h
index 06c1cb20..46dcbe51 100644
--- a/sys/qcam/qcam-os.h
+++ b/sys/qcam/qcam-os.h
@@ -28,3 +28,5 @@ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
+
+
diff --git a/sys/qcam/qcam.h b/sys/qcam/qcam.h
index 4697befd..35b2dc26 100644
--- a/sys/qcam/qcam.h
+++ b/sys/qcam/qcam.h
@@ -54,8 +54,7 @@ OTHER DEALINGS IN THE SOFTWARE.
#define MAX_HEIGHT 243
#define MAX_WIDTH 336
-struct qcam
-{
+struct qcam {
int width, height;
int bpp;
int mode;
@@ -64,72 +63,72 @@ struct qcam
int port_mode;
int transfer_scale;
int top, left;
- int fd; /* lock file descriptor
- * It was, unfortunately, necessary to add this member to the
- * struct qcam to conveniently implement POSIX fcntl-style locking.
- * We need a seperate lock file for each struct qcam, for instance,
- * if the same process (using qcam-lib) is accessing multiple
- * QuickCams on (of course) multiple ports.
- * - Dave Plonka (plonka@carroll1.cc.edu)
- */
+ int fd; /* lock file descriptor
+ * It was, unfortunately, necessary to add this member to the
+ * struct qcam to conveniently implement POSIX fcntl-style locking.
+ * We need a seperate lock file for each struct qcam, for instance,
+ * if the same process (using qcam-lib) is accessing multiple
+ * QuickCams on (of course) multiple ports.
+ * - Dave Plonka (plonka@carroll1.cc.edu)
+ */
};
typedef unsigned char scanbuf;
/* General QuickCam handling routines */
-int qc_getbrightness (const struct qcam *q);
-int qc_setbrightness (struct qcam *q, int val);
-int qc_getcontrast (const struct qcam *q);
-int qc_setcontrast (struct qcam *q, int val);
-int qc_getwhitebal (const struct qcam *q);
-int qc_setwhitebal (struct qcam *q, int val);
-void qc_getresolution (const struct qcam *q, int *x, int *y);
-int qc_setresolution (struct qcam *q, int x, int y);
-int qc_getbitdepth (const struct qcam *q);
-int qc_setbitdepth (struct qcam *q, int val);
-int qc_getheight (const struct qcam *q);
-int qc_setheight (struct qcam *q, int y);
-int qc_getwidth (const struct qcam *q);
-int qc_setwidth (struct qcam *q, int x);
-int qc_gettop (const struct qcam *q);
-int qc_settop (struct qcam *q, int val);
-int qc_getleft (const struct qcam *q);
-int qc_setleft (struct qcam *q, int val);
-int qc_gettransfer_scale (const struct qcam *q);
-int qc_settransfer_scale (struct qcam *q, int val);
-int qc_calibrate (struct qcam *q);
-int qc_forceunidir (struct qcam *q);
-void qc_dump (const struct qcam *q, char *file);
-
-struct qcam *qc_init (void);
-int qc_initfile (struct qcam *q, char *fname);
-int qc_open (struct qcam *q);
-int qc_close (struct qcam *q);
-int qc_detect (const struct qcam *q);
-void qc_reset (struct qcam *q);
-void qc_set (struct qcam *q);
-scanbuf *qc_scan (const struct qcam *q);
-scanbuf *qc_convertscan (struct qcam *q, scanbuf * scan);
-void qc_writepgm (const struct qcam *q, FILE * f, scanbuf * scan);
-void qc_wait (int val);
+int qc_getbrightness(const struct qcam *q);
+int qc_setbrightness(struct qcam *q, int val);
+int qc_getcontrast(const struct qcam *q);
+int qc_setcontrast(struct qcam *q, int val);
+int qc_getwhitebal(const struct qcam *q);
+int qc_setwhitebal(struct qcam *q, int val);
+void qc_getresolution(const struct qcam *q, int *x, int *y);
+int qc_setresolution(struct qcam *q, int x, int y);
+int qc_getbitdepth(const struct qcam *q);
+int qc_setbitdepth(struct qcam *q, int val);
+int qc_getheight(const struct qcam *q);
+int qc_setheight(struct qcam *q, int y);
+int qc_getwidth(const struct qcam *q);
+int qc_setwidth(struct qcam *q, int x);
+int qc_gettop(const struct qcam *q);
+int qc_settop(struct qcam *q, int val);
+int qc_getleft(const struct qcam *q);
+int qc_setleft(struct qcam *q, int val);
+int qc_gettransfer_scale(const struct qcam *q);
+int qc_settransfer_scale(struct qcam *q, int val);
+int qc_calibrate(struct qcam *q);
+int qc_forceunidir(struct qcam *q);
+void qc_dump(const struct qcam *q, char *file);
+
+struct qcam *qc_init(void);
+int qc_initfile(struct qcam *q, char *fname);
+int qc_open(struct qcam *q);
+int qc_close(struct qcam *q);
+int qc_detect(const struct qcam *q);
+void qc_reset(struct qcam *q);
+void qc_set(struct qcam *q);
+scanbuf *qc_scan(const struct qcam *q);
+scanbuf *qc_convertscan(struct qcam *q, scanbuf *scan);
+void qc_writepgm(const struct qcam *q, FILE *f, scanbuf *scan);
+void qc_wait(int val);
/* OS/hardware specific routines */
-int read_lpstatus (const struct qcam *q);
-int read_lpcontrol (const struct qcam *q);
-int read_lpdata (const struct qcam *q);
-void write_lpdata (const struct qcam *q, int d);
-void write_lpcontrol (const struct qcam *q, int d);
-int enable_ports (const struct qcam *q);
-int disable_ports (const struct qcam *q);
-int qc_unlock (struct qcam *q);
-int qc_lock (struct qcam *q);
-void qc_wait (int val);
-int qc_probe (struct qcam *q);
+int read_lpstatus(const struct qcam *q);
+int read_lpcontrol(const struct qcam *q);
+int read_lpdata(const struct qcam *q);
+void write_lpdata(const struct qcam *q, int d);
+void write_lpcontrol(const struct qcam *q, int d);
+int enable_ports(const struct qcam *q);
+int disable_ports(const struct qcam *q);
+int qc_unlock(struct qcam *q);
+int qc_lock(struct qcam *q);
+void qc_wait(int val);
+int qc_probe(struct qcam *q);
/* Image processing routines */
-int fixdark (const struct qcam *q, scanbuf * scan);
-int qc_edge_detect (const struct qcam *q, scanbuf * scan, int tolerance);
+int fixdark(const struct qcam *q, scanbuf *scan);
+int qc_edge_detect(const struct qcam *q, scanbuf *scan, int tolerance);
-#endif /*! _QCAM_H */
+#endif /*! _QCAM_H*/
diff --git a/sys/qcam/qcamip.h b/sys/qcam/qcamip.h
index e3bc5c2e..3bab6faf 100644
--- a/sys/qcam/qcamip.h
+++ b/sys/qcam/qcamip.h
@@ -55,13 +55,13 @@ SOFTWARE.
/* Prototypes for image processing routines */
-int qcip_autoexposure (struct qcam *q, scanbuf * scan);
-int qcip_set_luminance_target (struct qcam *q, int val);
-int qcip_set_luminance_tolerance (struct qcam *q, int val);
-int qcip_set_luminance_std_target (struct qcam *q, int val);
-int qcip_set_luminance_std_tolerance (struct qcam *q, int val);
-int qcip_set_autoexposure_mode (int val);
-void qcip_histogram (struct qcam *q, scanbuf * scan, int *histogram);
-void qcip_display_histogram (struct qcam *q, scanbuf * scan);
+int qcip_autoexposure(struct qcam *q, scanbuf *scan);
+int qcip_set_luminance_target(struct qcam *q, int val);
+int qcip_set_luminance_tolerance(struct qcam *q, int val);
+int qcip_set_luminance_std_target(struct qcam *q, int val);
+int qcip_set_luminance_std_tolerance(struct qcam *q, int val);
+int qcip_set_autoexposure_mode(int val);
+void qcip_histogram(struct qcam *q, scanbuf *scan, int *histogram);
+void qcip_display_histogram(struct qcam *q, scanbuf *scan);
-#endif /*! _QCAMIP_H */
+#endif /*! _QCAMIP_H*/