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 754567 - video: gst_video_calculate_display_ratio() should have out parameter
video: gst_video_calculate_display_ratio() should have out parameter
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 1.6.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-09-04 11:45 UTC by Viko Adi Rahmawan
Modified: 2015-10-20 07:18 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Viko Adi Rahmawan 2015-09-04 11:45:45 UTC
as dar_n and dar_d is a pointer it should use out parameter to return the calculated uint

c documentation
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#gst-video-calculate-display-ratio

while in vapi it isn't out parameter
http://valadoc.org/#!api=gstreamer-video-1.0/Gst.Video.calculate_display_ratio

I've successfully add the out in the vapi files, but Flo said it might be bad gir file.
Comment 1 Luca Bruno 2015-10-17 13:30:24 UTC
It's indeed missing annotations in the C code: https://github.com/gstreamer-mirror/gst-plugins-base/blob/19d714fa2f95f67c9ad94db7c359a1c7affe40d4/gst-libs/gst/video/video.c#L64

I think it should be something like:

 * @dar_n: (out) (allow-none): Numerator of the calculated display_ratio
 * @dar_d: (out) (allow-none): Denominator of the calculated display_ratio

Reassigning to gstreamer.
Comment 2 Sebastian Dröge (slomo) 2015-10-17 17:38:28 UTC
They're actually not allow-none, but yes. Thanks for reporting :)

commit df0d5aa4d52a53af95fc185fbb9b83aee149d033
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Sat Oct 17 20:36:27 2015 +0300

    video: Add out annotations to the out parameters of gst_video_calculate_display_ratio()
    
    https://bugzilla.gnome.org/show_bug.cgi?id=754567