g_signal_connect(d_ptr->cameraBin, "notify::idle",
G_CALLBACK(QtCamDevicePrivate::on_idle_changed), d_ptr);
+ g_signal_connect(d_ptr->wrapperVideoSource, "notify::ready-for-capture",
+ G_CALLBACK(QtCamDevicePrivate::on_ready_for_capture_changed), d_ptr);
+
d_ptr->image = new QtCamImageMode(d_ptr, this);
d_ptr->video = new QtCamVideoMode(d_ptr, this);
}
#include "qtcamconfig.h"
#include "qtcamviewfinder.h"
#include "qtcamdevice.h"
+#include "qtcammode.h"
class QtCamGStreamerMessageListener;
class QtCamMode;
return ready == TRUE;
}
+ static void on_ready_for_capture_changed(GObject *obj, GParamSpec *pspec,
+ QtCamDevicePrivate *d) {
+ Q_UNUSED(obj);
+ Q_UNUSED(pspec);
+
+ if (!d->active) {
+ return;
+ }
+
+ QMetaObject::invokeMethod(d->active, "canCaptureChanged", Qt::QueuedConnection);
+ }
+
static void on_idle_changed(GObject *obj, GParamSpec *pspec, QtCamDevicePrivate *d) {
Q_UNUSED(obj);
Q_UNUSED(pspec);