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 633311 - discoverer: use specific types in getters, rename some boolean getters
discoverer: use specific types in getters, rename some boolean getters
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
unspecified
Other Linux
: Normal blocker
: 0.10.31
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-10-28 00:14 UTC by Stefan Sauer (gstreamer, gtkdoc dev)
Modified: 2010-10-30 14:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
discoverer: use specific types in getters (10.05 KB, patch)
2010-10-28 00:14 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
committed Details | Review
use const in most getters (5.66 KB, patch)
2010-10-28 14:40 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
committed Details | Review
Rename _get_is_image() to _is_image() and _get_interlaced() to _is_interlaced(). (7.00 KB, patch)
2010-10-28 15:55 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
committed Details | Review

Description Stefan Sauer (gstreamer, gtkdoc dev) 2010-10-28 00:14:16 UTC
Created attachment 173369 [details] [review]
discoverer: use specific types in getters

Use GstDiscoverer{Audio,Video}Info in getters like
gst_discoverer_{audio,video}_info_get_*(). This avoids the casts in the macros,
help language bindings and is more correct.
Comment 1 Sebastian Dröge (slomo) 2010-10-28 12:52:29 UTC
Looks good but while you're at it you could make all getters take a const GstDiscoverer*Info :)

Would be good to get this done before the next pre-release though... Tim?
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2010-10-28 14:28:41 UTC
Sebastian, yep, let me change that too.

Also what about in:
gboolean gst_discoverer_video_info_get_interlaced (GstDiscovererVideoInfo *info);
gboolean gst_discoverer_video_info_get_is_image (GstDiscovererVideoInfo *info);

rename 
_get_interlaced() to _is_interlaced()
_get_is_image() to _is_image()
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2010-10-28 14:40:36 UTC
Created attachment 173401 [details] [review]
use const in most getters

This patch adds const to get generated getters. There are probably more places that could use const.
Comment 4 Tim-Philipp Müller 2010-10-28 14:58:37 UTC
Comment on attachment 173369 [details] [review]
discoverer: use specific types in getters

Yes, I think we should do this too. It's slightly more 'correct', even if maybe a bit inconvenient for some use cases.
Comment 5 Tim-Philipp Müller 2010-10-28 14:59:15 UTC
> rename 
> _get_interlaced() to _is_interlaced()
> _get_is_image() to _is_image()

Let's do that as well.
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2010-10-28 15:55:55 UTC
Created attachment 173405 [details] [review]
Rename _get_is_image() to _is_image() and _get_interlaced() to _is_interlaced().

This needs fixup on gst-python for the release too! The patches is somewhat ugly as I had to make additional macros (internally).
Comment 7 Tim-Philipp Müller 2010-10-30 14:50:30 UTC
> This needs fixup on gst-python for the release too!

Ok, will do that.

> The patches is somewhat ugly as I had to make additional
> macros (internally).

Yes. Don't like all the macros here. Just used two functions instead ;-)

commit 03eea2364adf3a79bba3c4d63da6b39124e8678b
Author: Stefan Kost <ensonic@users.sf.net>
Date:   Thu Oct 28 18:51:08 2010 +0300

    discoverer: rename boolean getters for consistency
    
    Rename _get_is_image() to _is_image() and _get_interlaced() to _is_interlaced().
    
    https://bugzilla.gnome.org/show_bug.cgi?id=633311