GstEnginePipeline: Set device-clsid
This commit is contained in:
parent
cb44c71733
commit
a354f6bdc5
|
@ -448,7 +448,38 @@ bool GstEnginePipeline::InitAudioBin(QString &error) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (g_object_class_find_property(G_OBJECT_GET_CLASS(audiosink_), "device-clsid")) {
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
switch (device_.metaType().id()) {
|
||||||
|
#else
|
||||||
|
switch (device_.type()) {
|
||||||
|
#endif
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
case QMetaType::QString:{
|
||||||
|
#else
|
||||||
|
case QVariant::String:{
|
||||||
|
#endif
|
||||||
|
QString device = device_.toString();
|
||||||
|
if (!device.isEmpty()) {
|
||||||
|
qLog(Debug) << "Setting device-clsid" << device << "for" << output_;
|
||||||
|
g_object_set(G_OBJECT(audiosink_), "device-clsid", device.toUtf8().constData(), nullptr);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
case QMetaType::QByteArray:{
|
||||||
|
#else
|
||||||
|
case QVariant::ByteArray:{
|
||||||
|
#endif
|
||||||
|
QByteArray device = device_.toByteArray();
|
||||||
|
if (!device.isEmpty()) {
|
||||||
|
qLog(Debug) << "Setting device-clsid" << device_ << "for" << output_;
|
||||||
|
g_object_set(G_OBJECT(audiosink_), "device-clsid", device.constData(), nullptr);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (g_object_class_find_property(G_OBJECT_GET_CLASS(audiosink_), "port-pattern")) {
|
else if (g_object_class_find_property(G_OBJECT_GET_CLASS(audiosink_), "port-pattern")) {
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
switch (device_.metaType().id()) {
|
switch (device_.metaType().id()) {
|
||||||
|
|
Loading…
Reference in New Issue