GNOME Bugzilla – Bug 688785
Provide single include headers
Last modified: 2012-12-12 17:14:20 UTC
Created attachment 229555 [details] [review] Add missing single include headers and use them in GIRs While some gstreamer libraries (like gstreamer-1.0) provide a single header file which include all the other headers for that library, many do not. It would be nice (and very helpful for the Vala bindings) if gstreamer consistently provided these files. FWIW most libraries I come across provide similar headers. Many (like gtk+) go so far as to emit an error or warning when directly including other headers.
Created attachment 229556 [details] [review] [gst-plugins-base] Add missing single include headers and use them in GIRs Similar patch for gst-plugins-base.
commit 1afb1f12ef5b7dfbd3fc4ad2bc68f191d1b78e62 Author: Evan Nemerson <evan@coeus-group.com> Date: Tue Nov 20 23:13:33 2012 -0800 libs: Add missing single include headers and use them in GIRs commit 4d77fba46c3363e80d589393a597111c57dd7f55 Author: Evan Nemerson <evan@coeus-group.com> Date: Tue Nov 20 23:22:27 2012 -0800 libs: Add missing single include headers and use them in GIRs
You guys should try 'make check' some time ;) commit 2d85c0f18c79106ecf73e2766aa5abb93249cba0 Author: Tim-Philipp Müller <tim@centricular.net> Date: Fri Nov 23 13:32:07 2012 +0000 tests: fix clock unit test build failure after header changes https://bugzilla.gnome.org/show_bug.cgi?id=688785
I also find the gst prefixes a bit ugly, e.g. in -base I think it should be gst/foo/foo.h not gst/foo/gstfoo.h and if foo.h already exists, any additional includes could probably just be added there... (e.g. gst/audio/audio.h)
(In reply to comment #4) > I also find the gst prefixes a bit ugly, e.g. in -base I think it should be > > gst/foo/foo.h > > not > > gst/foo/gstfoo.h I was actually a bit torn on this. I like the first way but gstfoo.h seemed like a better fit with everything else. Currently 155 of the 194 headers in my $prefix/include/gstreamer-1.0 directory (and its subdirectories) are gst*.h. Either way there are plenty of cases where the desired header already exists. All of the includes in $prefix/include/gstreamer-1.0 (no subdirectories) are gst*.h, so another option (where there wouldn't be any conflicts) would would be gst/foo.h.
After some more thinking about that IMHO using gst/foo/foo.h is the better solution. If the file already exists we can just add the additional includes to it.
commit 3f82e919ddbe9dfeae5249059b4649bb5f5073b1 Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Wed Dec 12 17:13:10 2012 +0000 libs: Use foo/foo.h as single-include header consistently everywhere https://bugzilla.gnome.org/show_bug.cgi?id=688785 commit e58dabc75047d92f80cc44d09c9081df7cfd819f Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Wed Dec 12 16:44:14 2012 +0000 libs: Use foo/foo.h as single-include header consistently everywhere https://bugzilla.gnome.org/show_bug.cgi?id=688785