GNOME Bugzilla – Bug 633311
discoverer: use specific types in getters, rename some boolean getters
Last modified: 2010-10-30 14:51:07 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.
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?
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()
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 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.
> rename > _get_interlaced() to _is_interlaced() > _get_is_image() to _is_image() Let's do that as well.
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).
> 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