Adding camera information support

This commit is contained in:
Sergey Lapin
2021-03-31 22:37:29 +03:00
parent 1ff618469f
commit 47e16949db

View File

@@ -568,6 +568,23 @@ QVector<QGstUtils::CameraInfo> QGstUtils::enumerateCameras(GstElementFactory *fa
} }
} else if (g_object_class_find_property(objectClass, "video-source")) { } else if (g_object_class_find_property(objectClass, "video-source")) {
hasVideoSource = true; hasVideoSource = true;
/* hack for pinephone configuration */
const CameraInfo primary = {
QStringLiteral("rear"),
QGstreamerVideoInputDeviceControl::primaryCamera(),
270,
QCamera::BackFace,
QByteArray()
};
const CameraInfo secondary = {
QStringLiteral("front"),
QGstreamerVideoInputDeviceControl::secondaryCamera(),
90,
QCamera::FrontFace,
QByteArray()
};
devices.append(primary);
devices.append(secondary);
} }
g_type_class_unref(objectClass); g_type_class_unref(objectClass);