QObject::connect(d_ptr->listener, SIGNAL(started()), this, SIGNAL(started()));
QObject::connect(d_ptr->listener, SIGNAL(stopped()), this, SIGNAL(stopped()));
+ g_signal_connect(d_ptr->cameraBin, "notify::idle",
+ G_CALLBACK(QtCamDevicePrivate::on_idle_changed), d_ptr);
+
d_ptr->image = new QtCamImageMode(d_ptr, this);
d_ptr->video = new QtCamVideoMode(d_ptr, this);
}
void error(const QString& message, int code, const QString& debug);
void started();
void stopped();
+ void idleStateChanged(bool isIdle);
private:
Q_PRIVATE_SLOT(d_ptr, void _d_error(const QString&, int, const QString&))
}
}
+ static void on_idle_changed(GObject *obj, GParamSpec *pspec, QtCamDevicePrivate *d) {
+ Q_UNUSED(obj);
+ Q_UNUSED(pspec);
+
+ QMetaObject::invokeMethod(d->q_ptr, "idleStateChanged", Qt::QueuedConnection,
+ Q_ARG(bool, d->q_ptr->isIdle()));
+ }
+
QString name;
QVariant id;