GNOME Bugzilla – Bug 757004
qt: DeviceMonitor support
Last modified: 2018-05-04 14:14:02 UTC
Created attachment 313910 [details] [review] Device/DEviceMonitor wrappers Device & DeviceMonitor wrappers for QGst
Created attachment 313911 [details] [review] Sample project for DeviceMonitor
I did not implement the gst_device_get_properties method wrapper because the returned structure is not shared, and I could not understand how to do the things right in this case.
the properties are just returns as a GstStructure that you own, there is no sharing there.
(In reply to Olivier Crête from comment #3) > the properties are just returns as a GstStructure that you own, there is no > sharing there. Yes, i'm already know it. The problem is on QtGst side. QGst::StructurePtr is typedef QSharedPointer<SharedStructure> StructurePtr; And QGst::SharedStructure requires an owner object to addref him. class QTGSTREAMER_EXPORT SharedStructure : public Structure { public: virtual ~SharedStructure(); /*! \returns a deep copy of the structure */ Structure copy() const; private: //Only these classes can call our constructor, others should use a StructurePtr passed to them friend class Caps; friend class Message; friend class Event; friend class Query; struct Data; QTGSTREAMER_NO_EXPORT SharedStructure(Data *data); QTGSTREAMER_NO_EXPORT static StructurePtr fromMiniObject(GstStructure *structure, const MiniObjectPtr & parent); QTGSTREAMER_NO_EXPORT static StructurePtr fromCaps(GstStructure *structure, const CapsPtr & parent); Q_DISABLE_COPY(SharedStructure); }; I hope that George Kiagiadakis will find a bit of its time to look at it.
Thanks for the patches. Although qt-gstreamer is unmaintained, I have pushed them in an effort to close its tickets while saving as much as possible from what has been contributed in patches. For the record, I believe the structure issue would have been solved if you used QGst::Structure instead of StructurePtr. --- commit 7f298aa319703826ebf78b4b8aaa6caf8e36c292 Author: Pavel Bludov <pbludov@gmail.com> Date: Fri Oct 23 14:56:57 2015 +0800 DeviceMonitor example commit 437a3ae0e0548f5db7515341728a77a4e852ff80 Author: Pavel Bludov <pbludov@gmail.com> Date: Fri Oct 23 14:56:26 2015 +0800 Device & DeviceMonitor support