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 796221 - GstMpegts: missing introspection annotations.
GstMpegts: missing introspection annotations.
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: documentation
git master
Other All
: Normal minor
: 1.15.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-05-17 21:14 UTC by Mike Wey
Modified: 2018-05-19 09:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Putative patch for array parameters (4.98 KB, text/plain)
2018-05-18 09:58 UTC, Russel Winder
  Details
Updated trial patch for checking if thi is the right direction. (6.63 KB, text/plain)
2018-05-18 10:37 UTC, Russel Winder
  Details
Some annotations toreflect that some of the function parameters are arrays. (7.12 KB, patch)
2018-05-18 17:54 UTC, Russel Winder
committed Details | Review

Description Mike Wey 2018-05-17 21:14:27 UTC
With GstMpegts none of the functions that have array parameters are annotated as such.

The following functions are missing the array annotation: 

gst_mpegts_descriptor_parse_ca
gst_mpegts_descriptor_parse_dvb_data_broadcast_id
gst_mpegts_descriptor_parse_dvb_private_data_specifier
gst_mpegts_descriptor_from_custom
gst_mpegts_descriptor_from_custom_with_extension
gst_mpegts_descriptor_from_registration

gst_mpegts_section_new

And 'gst_mpegts_descriptor_parse_dvb_multilingual_component' seems to be missing an 'out' annotation for the 'component_tag' parameter.
Comment 1 Sebastian Dröge (slomo) 2018-05-18 06:47:53 UTC
Thanks! Do you want to provide a patch for that?
Comment 2 Sebastian Dröge (slomo) 2018-05-18 07:39:21 UTC
I see you're working on the D bindings. Do you also have any other annotation problems you noticed in the other libraries, and especially in GStreamer core/base? Or are those all fine?
Comment 3 Russel Winder 2018-05-18 08:16:56 UTC
Sebastian,

Are there examples of how to annotate the C code appropriately, that I could follow to create the necessary patch file – though isn't it about time for GitLab or GitHub pull requests?
Comment 4 Sebastian Dröge (slomo) 2018-05-18 08:41:06 UTC
(In reply to Russel Winder from comment #3)

> Are there examples of how to annotate the C code appropriately, that I could
> follow to create the necessary patch file

https://wiki.gnome.org/action/show/Projects/GObjectIntrospection/Annotations has all the documentation.

The array length example is probably most interesting for you: https://wiki.gnome.org/action/show/Projects/GObjectIntrospection/Annotations#Array_length

> though isn't it about time for GitLab or GitHub pull requests?

No, we're never going to move to GitHub but will probably move at some point this year to GitLab on freedesktop.org. But we did not move yet. Once you can't use Bugzilla anymore you know that we've moved :)
Comment 5 Russel Winder 2018-05-18 09:09:05 UTC
(In reply to Sebastian Dröge (slomo) from comment #4)

OK, I'll get to work. I can understand going with GitLab rather than GitHub, works for me.

In the interim is it OK to work with a clone of the freedesktop Git repository, rebasing any changes, and post a sample patch here to ensure I am doing the right thing.
Comment 6 Russel Winder 2018-05-18 09:11:38 UTC
Should the first parameter in the first example on https://wiki.gnome.org/action/show/Projects/GObjectIntrospection/Annotations#Array_length be @list_store rather than @store
Comment 7 Russel Winder 2018-05-18 09:58:16 UTC
Created attachment 372177 [details]
Putative patch for array parameters
Comment 8 Russel Winder 2018-05-18 10:37:34 UTC
Created attachment 372179 [details]
Updated trial patch for checking if thi is the right direction.

I guess the questions is whether (element-type…) annotations are needed.
Comment 9 Sebastian Dröge (slomo) 2018-05-18 13:41:11 UTC
(In reply to Russel Winder from comment #5)

> In the interim is it OK to work with a clone of the freedesktop Git
> repository, rebasing any changes, and post a sample patch here to ensure I
> am doing the right thing.

Yes, see https://gstreamer.freedesktop.org/documentation/contribute/index.html#how-to-submit-patches
Comment 10 Sebastian Dröge (slomo) 2018-05-18 13:42:02 UTC
(In reply to Russel Winder from comment #8)

> I guess the questions is whether (element-type…) annotations are needed.

Check in the gir file if it puts the correct type automatically. Usually that annotation is only needed for things like GList and GPtrArray.
Comment 11 Russel Winder 2018-05-18 14:22:26 UTC
Gst_Plugins_Bad Meson build won't let me create a trial build with GStreamer 1.14.0, it is insisting on 1.15.0. This is getting to be too big a hurdle for such a small patch.
Comment 12 Tim-Philipp Müller 2018-05-18 14:31:49 UTC
I'm sure it's fine to make a patch against 1.14 branch (requires 1.14.1) or even the 1.14.0 tag of -bad. Not much has changed in this area really.
Comment 13 Russel Winder 2018-05-18 15:21:07 UTC
(In reply to Tim-Philipp Müller from comment #12)

I cloned gst_plugins_bad to make the changes so I am making a patch against master/HEAD, the problem is I cannot fulfil Sebastian's request to check the result of the patch because I can't build master of the plugins without building the whole of GStreamer. But maybe that is the penalty that must be paid?
Comment 14 Russel Winder 2018-05-18 15:41:08 UTC
I tried doing a Meson build from GST_Build but the setup failed in gst-python:

subprojects/gst-python/meson.build:21:0: ERROR:  Native dependency 'pygobject-3.0' not found

No idea where to get this dependency on Debian Sid.
Comment 15 Tim-Philipp Müller 2018-05-18 16:49:39 UTC
$ dpkg -S /usr/lib/x86_64-linux-gnu/pkgconfig/pygobject-3.0.pc 
python-gi-dev: /usr/lib/x86_64-linux-gnu/pkgconfig/pygobject-3.0.pc


Not sure why it tries that at all though, enable_python should default to false according to meson_options.txt
Comment 16 Russel Winder 2018-05-18 17:04:44 UTC
Hummm… that package wasn't there when I looked earlier, now it is. Magic. :-)
Comment 17 Mike Wey 2018-05-18 17:48:45 UTC
(In reply to Sebastian Dröge (slomo) from comment #2)
> I see you're working on the D bindings. Do you also have any other
> annotation problems you noticed in the other libraries, and especially in
> GStreamer core/base? Or are those all fine?

Core seems to be fine, i sill need to check against master but might know a few more for gstBase.

Currently we only have bindings for a small part of Gstreamer, so we might find some more once that is more complete.
Comment 18 Russel Winder 2018-05-18 17:50:32 UTC
I have now compiled the whole of GStreamer with the new changes and it appears that the GIR file has been generated appropriately.

I'll now follow the official process and submit a patch.
Comment 19 Russel Winder 2018-05-18 17:54:58 UTC
Created attachment 372196 [details] [review]
Some annotations toreflect that some of the function parameters are arrays.
Comment 20 Edward Hervey 2018-05-19 09:07:27 UTC
Thanks !