diff options
author | Piotr Srebrny <piotr.srebrny@qt.io> | 2022-10-12 16:47:46 +0200 |
---|---|---|
committer | Piotr Srebrny <piotr.srebrny@qt.io> | 2022-10-24 15:04:36 +0200 |
commit | 6156d0c27b37cc8322a243dd54e1d3d83d1b9d4b (patch) | |
tree | 359edbd4e902f04e2cd682d38c9afe5b7030ff44 /src/multimedia/platform/gstreamer/qgstreamermediadevices_p.h | |
parent | 572a89e2d433d1c935b96d6d9b966e459930c663 (diff) |
Don't use device.path gst property for device ID, instead generate it
The gst_device_get_properties does not work for libcamera; thus, we
cannot use the device.path property as the device ID. Instead, we
generate ID locally and bind it with GstDevice* in one object.
Fixes: QTBUG-104226
Change-Id: I837b74175e48ee15d3fbb3ab26cf21d6a5fea794
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
(cherry picked from commit 31430b1d1b2f89cc81a7301013e381cc3fab1a75)
Diffstat (limited to 'src/multimedia/platform/gstreamer/qgstreamermediadevices_p.h')
-rw-r--r-- | src/multimedia/platform/gstreamer/qgstreamermediadevices_p.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/multimedia/platform/gstreamer/qgstreamermediadevices_p.h b/src/multimedia/platform/gstreamer/qgstreamermediadevices_p.h index e3f34433f..121e080e6 100644 --- a/src/multimedia/platform/gstreamer/qgstreamermediadevices_p.h +++ b/src/multimedia/platform/gstreamer/qgstreamermediadevices_p.h @@ -55,6 +55,7 @@ #include <gst/gst.h> #include <qset.h> #include <qaudiodevice.h> +#include <vector> QT_BEGIN_NAMESPACE @@ -76,7 +77,14 @@ public: GstDevice *videoDevice(const QByteArray &id) const; private: - QSet<GstDevice *> m_videoSources; + struct QGstDevice { + GstDevice *gstDevice = nullptr; + QByteArray id; + }; + + quint64 m_idGenerator = 0; + std::vector<QGstDevice> m_videoSources; + QSet<GstDevice *> m_audioSources; QSet<GstDevice *> m_audioSinks; }; |