100 GstElementOrDescription elementOrDesc,
103 Q_ASSERT(!platformCamera);
105 auto maybePlatformCamera = QPlatformMediaIntegration::instance()->createGStreamerVideoSource(
106 source, elementOrDesc);
107 if (!maybePlatformCamera) {
108 qWarning() <<
"Failed to initialize QGStreamerVideoSource" << maybePlatformCamera.error();
112 if (
auto gstBinDesc = std::get_if<QString>(&elementOrDesc))
113 gstBinDescription = std::move(*gstBinDesc);
115 platformCamera = *maybePlatformCamera;
118 platformCamera->setActive(
true);
120 QObject::connect(platformCamera, &QPlatformVideoSource::activeChanged, source,
121 &QGStreamerVideoSource::activeChanged);
150QGStreamerVideoSource::QGStreamerVideoSource(
const QString &gstBinDescription, QObject *parent)
151 : QGStreamerVideoSource(parent)
153 Q_D(QGStreamerVideoSource);
154 d->createPlatformCamera(
this, gstBinDescription);