GNOME Bugzilla – Bug 761918
gstvalue: Make GValueArray serializable
Last modified: 2016-11-02 08:15:36 UTC
Created attachment 320955 [details] [review] patch For instance very useful for logging GValueArray with GST_PTR_FORMAT GValueArray is the bastard-child of GLib that GStreamer still insists on using, as it has great application for python-bindings etc. Maybe we should adopt it? :)
> For instance very useful for logging GValueArray with GST_PTR_FORMAT Is this (logging) the primary purpose ? How does this work then? I don't think we can log objects/pointers via GST_PTR_FORMAT where we can't check the type. Can we detect a GValueArray pointer as such?
This patch would be welcome :) Without it I get warnings when processing the RTP session stats in OpenWebRTC.
Comment on attachment 320955 [details] [review] patch Looks good but how is this supposed to work with GST_PTR_FORMAT? That one only works for types where we can know the type by reading the GType at the front. Can you explain? :)
(In reply to Sebastian Dröge (slomo) from comment #3) > Comment on attachment 320955 [details] [review] [review] > patch > > Looks good but how is this supposed to work with GST_PTR_FORMAT? That one > only works for types where we can know the type by reading the GType at the > front. > > Can you explain? :) It works when you have a GValueArray inside a GstStructure, like rtpstats are today. It does not (as both you and Tim have pointed out) work when you do GST_PTR_FORMAT on a GValueArray by itself. Still very useful though!
Ah that makes sense
Can this patch be merged after the release then? Or is there something missing?
Comment on attachment 320955 [details] [review] patch Not from my side
https://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/tests/examples/rtp/Makefile.am#n4 # FIXME 0.11: ignore GValueArray warnings for now until this is sorted ERROR_CFLAGS= This should then be removed? ^^
Why would it?
commit c85a30f80b0104d7ed6ee7d1aa0bf53bc7cb2bd1 Author: Stian Selnes <stian@pexip.com> Date: Wed Nov 11 16:43:40 2015 +0100 gstvalue: Make GValueArray serializable For instance very useful for logging GValueArray with GST_PTR_FORMAT https://bugzilla.gnome.org/show_bug.cgi?id=761918
(In reply to Sebastian Dröge (slomo) from comment #9) > Why would it? Just a gut feeling, seeing that comment in RTP tests :)
It's about GLib having deprecated GValueArray, thus compilation giving warnings (or errors with -Werror) if you use any of its API. Which some of the examples do (and still do).