GNOME Bugzilla – Bug 732589
gst_mikey_* not introspection-friendly
Last modified: 2014-07-04 12:57:40 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?
It should probably all be refcounted then though. Thanks for noticing!
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.
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