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 732589 - gst_mikey_* not introspection-friendly
gst_mikey_* not introspection-friendly
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
unspecified
Other Linux
: Normal blocker
: 1.3.91
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-07-01 22:40 UTC by Evan Nemerson
Modified: 2014-07-04 12:57 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Evan Nemerson 2014-07-01 22:40:17 UTC
GstMIKEYMessage and GstMIKEYPayload are not registered as boxed types.

Payload already has a copy function, so it would be trivial to make it boxed.

Message is a bit more complicated--I think copying would be prohibitively expensive, so perhaps it could be made reference counting?

Memory management is also a bit tricky since GstMIKEYMessage:payloads effectively stores unowned references, which have a tendency to end up as pointers to already freed memory.  Maybe you could switch to GPtrArray with gst_mikey_payload_free for the free function, and make insert_payload transfer ownership of the payload?
Comment 1 Sebastian Dröge (slomo) 2014-07-02 07:12:26 UTC
It should probably all be refcounted then though. Thanks for noticing!
Comment 2 Wim Taymans 2014-07-02 10:38:10 UTC
I'm making them mini-objects. GPtrArray is not possible because the function to insert an item in the array in only in 2.40.
Comment 3 Wim Taymans 2014-07-02 13:51:11 UTC
commit b108aad77b27e6e9fab89379a064c8da3389b62b
Author: Wim Taymans <wtaymans@redhat.com>
Date:   Wed Jul 2 15:38:41 2014 +0200

    mikey: make message and payload mini-objects
    
    Make the MIKEY message and payload objects miniobjects so that they have
    a GType and are refcounted.
    We can reuse the dispose method to clear our payload objects.
    Add some annotations.
    Implement a copy function for the MIKEY message.
    Fix the unit test.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732589