After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 757004 - qt: DeviceMonitor support
qt: DeviceMonitor support
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: qt-gstreamer
git master
Other All
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-10-23 07:03 UTC by Pavel Bludov
Modified: 2018-05-04 14:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Device/DEviceMonitor wrappers (48.51 KB, patch)
2015-10-23 07:03 UTC, Pavel Bludov
none Details | Review
Sample project for DeviceMonitor (15.07 KB, patch)
2015-10-23 07:04 UTC, Pavel Bludov
none Details | Review

Description Pavel Bludov 2015-10-23 07:03:30 UTC
Created attachment 313910 [details] [review]
Device/DEviceMonitor wrappers

Device & DeviceMonitor wrappers for QGst
Comment 1 Pavel Bludov 2015-10-23 07:04:13 UTC
Created attachment 313911 [details] [review]
Sample project for DeviceMonitor
Comment 2 Pavel Bludov 2015-10-23 07:08:26 UTC
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.
Comment 3 Olivier Crête 2015-10-23 18:36:51 UTC
the properties are just returns as a GstStructure that you own, there is no sharing there.
Comment 4 Pavel Bludov 2015-10-29 07:44:47 UTC
(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.
Comment 5 George Kiagiadakis 2018-05-04 14:14:02 UTC
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