qtcamimagemode.h qtcamvideomode.h qtcammetadata.h qtcamcapability.h \
qtcamzoom.h qtcamflash.h qtcamscene.h qtcamevcomp.h qtcamvideotorch.h \
qtcamwhitebalance.h qtcamcolortone.h qtcamflickerreduction.h \
- qtcamnoisereduction.h
+ qtcamnoisereduction.h qtcamiso.h
SOURCES += qtcamconfig.cpp qtcamera.cpp qtcamscanner.cpp qtcamdevice.cpp qtcamviewfinder.cpp \
qtcammode.cpp qtcamgstreamermessagehandler.cpp qtcamgstreamermessagelistener.cpp \
qtcamimagemode.cpp qtcamvideomode.cpp qtcammetadata.cpp qtcamcapability.cpp \
qtcamzoom.cpp qtcamflash.cpp qtcamscene.cpp qtcamevcomp.cpp qtcamvideotorch.cpp \
qtcamwhitebalance.cpp qtcamcolortone.cpp qtcamflickerreduction.cpp \
- qtcamnoisereduction.cpp
+ qtcamnoisereduction.cpp qtcamiso.cpp
HEADERS += qtcammode_p.h qtcamdevice_p.h qtcamcapability_p.h
}
}
+ bool uintValue(unsigned int *val) {
+ if (!src) {
+ return false;
+ }
+
+ g_object_get(src, prop.toAscii().data(), val, NULL);
+
+ return true;
+ }
+
+ bool setUintValue(unsigned int val) {
+ if (!src) {
+ return false;
+ }
+
+ g_object_set(src, prop.toAscii().data(), val, NULL);
+
+ return true;
+ }
+
bool intValue(int *val) {
if (!src) {
return false;
--- /dev/null
+#include "qtcamiso.h"
+#include "qtcamcapability_p.h"
+
+#define ISO_MIN 0
+#define ISO_MAX 6400
+
+QtCamIso::QtCamIso(QtCamDevice *dev, QObject *parent) :
+ QtCamCapability(new QtCamCapabilityPrivate(dev, QtCamCapability::IsoSpeed, "iso-speed"),
+ parent) {
+ // TODO: QML
+}
+
+QtCamIso::~QtCamIso() {
+
+}
+
+unsigned int QtCamIso::value() {
+ unsigned int val = 0;
+
+ if (!d_ptr->uintValue(&val)) {
+ return 0;
+ }
+
+ return val;
+}
+
+bool QtCamIso::setValue(unsigned int val) {
+ return d_ptr->setUintValue(val);
+}
+
+unsigned int QtCamIso::minimumValue() {
+ return ISO_MIN;
+}
+
+unsigned int QtCamIso::maximumValue() {
+ return ISO_MAX;
+}
--- /dev/null
+// -*- c++ -*-
+
+#ifndef QT_CAM_ISO_H
+#define QT_CAM_ISO_H
+
+#include "qtcamcapability.h"
+
+class QtCamIso : public QtCamCapability {
+ Q_OBJECT
+
+public:
+ QtCamIso(QtCamDevice *dev, QObject *parent = 0);
+ ~QtCamIso();
+
+ unsigned int value();
+ bool setValue(unsigned int val);
+
+ unsigned int minimumValue();
+ unsigned int maximumValue();
+};
+
+#endif /* QT_CAM_ISO_H */