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;
}
}
GstElement *createAndAddElement(const QString& elementName, const char *prop, const char *name) {
- GstElement *elem = gst_element_factory_make(elementName.toAscii(), name);
+ GstElement *elem = gst_element_factory_make(elementName.toLatin1(), name);
if (!elem) {
qWarning() << "Failed to create" << elementName;
return 0;
if (videoSource) {
if (conf->deviceScannerType() == SCANNER_TYPE_ENUM) {
int dev = id.toInt();
- g_object_set(videoSource, conf->deviceScannerProperty().toAscii().constData(), dev, NULL);
+ g_object_set(videoSource, conf->deviceScannerProperty().toLatin1().constData(), dev, NULL);
}
else {
QString dev = id.toString();
- g_object_set(videoSource, conf->deviceScannerProperty().toAscii().constData(),
- dev.toAscii().constData(), NULL);
+ g_object_set(videoSource, conf->deviceScannerProperty().toLatin1().constData(),
+ dev.toLatin1().constData(), NULL);
}
}
}
void setAudioCaptureCaps() {
QString captureCaps = conf->audioCaptureCaps();
if (!captureCaps.isEmpty()) {
- GstCaps *caps = gst_caps_from_string(captureCaps.toAscii().data());
+ GstCaps *caps = gst_caps_from_string(captureCaps.toLatin1().data());
if (caps) {
g_object_set(cameraBin, "audio-capture-caps", caps, NULL);
gst_caps_unref(caps);
else {
QString preview = QString(PREVIEW_CAPS).arg(size.width()).arg(size.height());
- GstCaps *caps = gst_caps_from_string(preview.toAscii());
+ GstCaps *caps = gst_caps_from_string(preview.toLatin1());
g_object_set(dev->cameraBin, "preview-caps", caps, "post-previews", TRUE, NULL);
void QtCamScannerPrivate::scanEnum() {
// Too bad there's no way to get the values of an enum without creating the element :(
- GstElement *elem = gst_element_factory_make(conf->videoSource().toAscii(), NULL);
+ GstElement *elem = gst_element_factory_make(conf->videoSource().toLatin1(), NULL);
if (!elem) {
return;
}
GParamSpec *spec = g_object_class_find_property(G_OBJECT_GET_CLASS(elem),
- conf->deviceScannerProperty().toAscii());
+ conf->deviceScannerProperty().toLatin1());
if (!spec) {
gst_object_unref(elem);
return;
}
if (!m_sink) {
- m_sink = gst_element_factory_make(m_conf->viewfinderSink().toAscii().data(),
+ m_sink = gst_element_factory_make(m_conf->viewfinderSink().toLatin1().data(),
"QtCamViewfinderRendererMeeGoSink");
if (!m_sink) {
qCritical() << "Failed to create" << m_conf->viewfinderSink();