// -*- c++ -*-
+/*!
+ * This file is part of CameraPlus.
+ *
+ * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
#ifndef QT_CAM_CAPABILITY_P_H
#define QT_CAM_CAPABILITY_P_H
#include <gst/gst.h>
+#include "qtcamcapability.h"
#include "qtcamdevice.h"
#include "qtcamdevice_p.h"
}
+ GParamSpec *paramSpec() {
+ if (!src || prop.isEmpty()) {
+ return 0;
+ }
+
+ return g_object_class_find_property(G_OBJECT_GET_CLASS(src), prop.toUtf8().constData());
+ }
+
void startMonitoring() {
if (src) {
QString p = QString("notify::%1").arg(prop);
- handler = g_signal_connect(src, p.toAscii().data(), G_CALLBACK(camera_src_notify), this);
+ handler = g_signal_connect(src, p.toLatin1().data(), G_CALLBACK(camera_src_notify), this);
}
}
return false;
}
- g_object_get(src, prop.toAscii().data(), val, NULL);
+ g_object_get(src, prop.toLatin1().data(), val, NULL);
return true;
}
return false;
}
- g_object_set(src, prop.toAscii().data(), val, NULL);
+ g_object_set(src, prop.toLatin1().data(), val, NULL);
return true;
}
return false;
}
- g_object_get(src, prop.toAscii().data(), val, NULL);
+ g_object_get(src, prop.toLatin1().data(), val, NULL);
return true;
}
}
if (force) {
- g_object_set(src, prop.toAscii().data(), val, NULL);
+ g_object_set(src, prop.toLatin1().data(), val, NULL);
return true;
}
int old = 0;
- g_object_get(src, prop.toAscii().data(), &old, NULL);
+ g_object_get(src, prop.toLatin1().data(), &old, NULL);
if (old != val) {
- g_object_set(src, prop.toAscii().data(), val, NULL);
+ g_object_set(src, prop.toLatin1().data(), val, NULL);
}
return true;
return false;
}
- g_object_get(src, prop.toAscii().data(), val, NULL);
+ g_object_get(src, prop.toLatin1().data(), val, NULL);
return true;
}
return false;
}
- g_object_set(src, prop.toAscii().data(), val, NULL);
+ g_object_set(src, prop.toLatin1().data(), val, NULL);
return true;
}