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 761918 - gstvalue: Make GValueArray serializable
gstvalue: Make GValueArray serializable
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal enhancement
: 1.11.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-02-12 10:40 UTC by Håvard Graff (hgr)
Modified: 2016-11-02 08:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (5.45 KB, patch)
2016-02-12 10:40 UTC, Håvard Graff (hgr)
committed Details | Review

Description Håvard Graff (hgr) 2016-02-12 10:40:20 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? :)
Comment 1 Tim-Philipp Müller 2016-02-15 11:27:20 UTC
> 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?
Comment 2 Philippe Normand 2016-10-14 15:53:17 UTC
This patch would be welcome :)

Without it I get warnings when processing the RTP session stats in OpenWebRTC.
Comment 3 Sebastian Dröge (slomo) 2016-10-20 10:54:22 UTC
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? :)
Comment 4 Håvard Graff (hgr) 2016-10-20 18:04:23 UTC
(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!
Comment 5 Sebastian Dröge (slomo) 2016-10-20 18:06:15 UTC
Ah that makes sense
Comment 6 Philippe Normand 2016-10-24 12:04:45 UTC
Can this patch be merged after the release then? Or is there something missing?
Comment 7 Sebastian Dröge (slomo) 2016-10-24 12:16:00 UTC
Comment on attachment 320955 [details] [review]
patch

Not from my side
Comment 8 Philippe Normand 2016-10-27 11:08:54 UTC
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? ^^
Comment 9 Sebastian Dröge (slomo) 2016-10-31 10:33:12 UTC
Why would it?
Comment 10 Sebastian Dröge (slomo) 2016-11-01 18:31:02 UTC
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
Comment 11 Philippe Normand 2016-11-02 07:53:33 UTC
(In reply to Sebastian Dröge (slomo) from comment #9)
> Why would it?

Just a gut feeling, seeing that comment in RTP tests :)
Comment 12 Sebastian Dröge (slomo) 2016-11-02 08:15:36 UTC
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).