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 684402 - [0.11] Can't access GstPadProbeInfo data pointer from introspection
[0.11] Can't access GstPadProbeInfo data pointer from introspection
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.11.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-09-19 20:09 UTC by Olivier Crête
Modified: 2012-09-20 19:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
pad: Add functions to safely access GstProbeInfo data pointer (2.72 KB, patch)
2012-09-19 20:09 UTC, Olivier Crête
none Details | Review
pad: Add functions to safely access GstProbeInfo data pointer (3.83 KB, patch)
2012-09-19 20:33 UTC, Olivier Crête
accepted-commit_now Details | Review
pad: Add functions to safely access GstProbeInfo data pointer (3.84 KB, patch)
2012-09-19 21:19 UTC, Olivier Crête
committed Details | Review

Description Olivier Crête 2012-09-19 20:09:45 UTC
The introspection can't use the macros to cast the GstPadProbeInfo. I'll attach a patch that adds functions that do the same thing.
Comment 1 Olivier Crête 2012-09-19 20:09:59 UTC
Created attachment 224778 [details] [review]
pad: Add functions to safely access GstProbeInfo data pointer
Comment 2 Tim-Philipp Müller 2012-09-19 20:18:36 UTC
<__tim> I guess the other alternative was to do a (named) union?
<__tim> The functions are fine with me, but will it work with bindings like that? Do we also need to register the probe info struct as boxed type?
<__tim> And they also need adding to the -sections.txt file in docs and the .def file (make check-exports in top-level)
<__tim> and could you align the function names and argument please (with spaces) :)
<__tim> in the header file
<__tim> oh, also: shouldn't the first checks for the type be g_return_val_if_fail() ?
<__tim> do you think it's useful to handle it gracefully? (not that I think it makes a difference, just can't imagine a case where it's not likely to be a programming error)
Comment 3 Olivier Crête 2012-09-19 20:33:30 UTC
Created attachment 224781 [details] [review]
pad: Add functions to safely access GstProbeInfo data pointer

I tested with pygi, there is seems to work fine. other points addressed in this updated patch
Comment 4 Tim-Philipp Müller 2012-09-19 20:45:41 UTC
Comment on attachment 224781 [details] [review]
pad: Add functions to safely access GstProbeInfo data pointer

Looks good to me.

Two more tiny nitpicks: could you mention in the commit message that this is for bindings/g-i. And in the docs, the "Returns:" should probably no longer have an allow-none annotation?
Comment 5 Olivier Crête 2012-09-19 21:19:51 UTC
Created attachment 224783 [details] [review]
pad: Add functions to safely access GstProbeInfo data pointer

This is so that introspection based bindings can access it.
Comment 6 Olivier Crête 2012-09-20 19:26:48 UTC
commit 25b3e02b94df664423c0a23e34829af75f9be0c4
Author: Olivier Crête <olivier.crete@collabora.com>
Date:   Wed Sep 19 15:01:46 2012 -0400

    pad: Add functions to safely access GstProbeInfo data pointer
    
    This is so that introspection based bindings can access it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=684402