GNOME Bugzilla – Bug 797165
Wrong include directives for gstreamer-base headers
Last modified: 2018-09-19 14:09:02 UTC
Created attachment 373689 [details] [review] Patch to correct documentation Two include directives for headers in gstreamer-base is wrong. gstadapter.h: It was just gst/libs/adapter.h, which doesn't work at all gstaggregator.h: It was gst/libs/base.h, which works but all other include directives used the individual .h files. It looks like base-prelude.h never is included since most places don't include gst/libs/base.h, but rather whatever header file is needed directly. Anyway I made a patch that uniforms the documentation.
Comment on attachment 373689 [details] [review] Patch to correct documentation It would be better to update them all to the single-include headers instead
> gstadapter.h: It was just gst/libs/adapter.h, which doesn't work at all Oops, thanks. > gstaggregator.h: It was gst/libs/base.h, which works but all other include > directives used the individual .h files. > > It looks like base-prelude.h never is included since most places don't > include gst/libs/base.h, but rather whatever header file is needed directly. I think maybe we should change the documentation to include he 'global' header instead, which would also include -prelude.h then, as not doing so may soon become a problem (however, I've also added the prelude include to many header files like gstaggregator.h IIRC since we need to maintain backwards compat to some extent).
Created attachment 373704 [details] [review] Change to include gst/base/base.h
Comment on attachment 373704 [details] [review] Change to include gst/base/base.h Looks good to me, Tim? Should probably do the same for everything in sections.txt :)
I didn't look through everything. Looked like gstcontroller already worked this way, so I didn't do a complete overview. :(
Looks good to me, thanks! :)
commit 2e6089f0c5c6024d026914596c4492d0fc3f6730 (HEAD -> master) Author: Linus Svensson <linussn@axis.com> Date: Tue Sep 18 15:44:24 2018 +0200 docs: Update include directive for gstreamer-base components Change to always include gst/libs/base.h in order to also include base-prelude.h, but also because it's the right thing for people to include anyway. https://bugzilla.gnome.org/show_bug.cgi?id=797165
commit 4aef0fca96b03ea58bf3de9d6fd234db39b3a3c2 Author: Tim-Philipp Müller <tim@centricular.com> Date: Wed Sep 19 15:07:36 2018 +0100 docs: libs: move all includes to canonical single header includes And fix up bogus libs/ prefix for controller lib includes. https://bugzilla.gnome.org/show_bug.cgi?id=797165