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 688785 - Provide single include headers
Provide single include headers
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other Linux
: Normal blocker
: 1.1.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-11-21 09:32 UTC by Evan Nemerson
Modified: 2012-12-12 17:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add missing single include headers and use them in GIRs (8.43 KB, patch)
2012-11-21 09:32 UTC, Evan Nemerson
committed Details | Review
[gst-plugins-base] Add missing single include headers and use them in GIRs (27.55 KB, patch)
2012-11-21 09:34 UTC, Evan Nemerson
committed Details | Review

Description Evan Nemerson 2012-11-21 09:32:04 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.
Comment 1 Evan Nemerson 2012-11-21 09:34:05 UTC
Created attachment 229556 [details] [review]
[gst-plugins-base] Add missing single include headers and use them in GIRs

Similar patch for gst-plugins-base.
Comment 2 Sebastian Dröge (slomo) 2012-11-21 10:02:15 UTC
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
Comment 3 Tim-Philipp Müller 2012-11-23 13:37:43 UTC
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
Comment 4 Tim-Philipp Müller 2012-11-23 13:39:42 UTC
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)
Comment 5 Evan Nemerson 2012-11-23 18:07:28 UTC
(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.
Comment 6 Sebastian Dröge (slomo) 2012-11-26 08:43:14 UTC
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.
Comment 7 Sebastian Dröge (slomo) 2012-12-12 17:14:20 UTC
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