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 726453 - v4l2 plugin broken due to bundeling of videodev2.h
v4l2 plugin broken due to bundeling of videodev2.h
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other FreeBSD
: Normal normal
: 1.3.1
Assigned To: Nicolas Dufresne (ndufresne)
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-03-16 13:41 UTC by Koop Mast (kwm)
Modified: 2014-03-16 16:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add mapping code to videodev2.h (1.55 KB, patch)
2014-03-16 13:42 UTC, Koop Mast (kwm)
none Details | Review
Add support for other OS like FreeBSD (2.56 KB, patch)
2014-03-16 14:42 UTC, Nicolas Dufresne (ndufresne)
committed Details | Review

Description Koop Mast (kwm) 2014-03-16 13:41:45 UTC
A copy of the videodev2.h header was recently bundled with the v4l2 plugin. The problem is that it uses __u32 and simular types that aren't portable to other OS's.

The easy solution is to add typedef's to map the unknown types to common types. Doing it this way also allows for easy diffing with videodev2.h upstream for changes to this file.
Comment 1 Koop Mast (kwm) 2014-03-16 13:42:52 UTC
Created attachment 272057 [details] [review]
Add mapping code to videodev2.h
Comment 2 Nicolas Dufresne (ndufresne) 2014-03-16 13:53:16 UTC
(In reply to comment #0)
> The easy solution is to add typedef's to map the unknown types to common types.
> Doing it this way also allows for easy diffing with videodev2.h upstream for
> changes to this file.

Indeed you are right. Thanks for reporting. I think we could also map to GLib associated types, I'll post of patch over here, so you can test before I merged it.
Comment 3 Nicolas Dufresne (ndufresne) 2014-03-16 14:42:55 UTC
Created attachment 272059 [details] [review]
Add support for other OS like FreeBSD

Let me know if that works for FreeBSD.
Comment 4 Nicolas Dufresne (ndufresne) 2014-03-16 14:49:53 UTC
Note, this patch has the benefit that it removes the dependency on having Linux kernel headers, which I just realized I don't check explicitly in the configure.ac.
Comment 5 Koop Mast 2014-03-16 15:36:01 UTC
Review of attachment 272059 [details] [review]:

This new patch also fixes compile on FreeBSD.
Comment 6 Nicolas Dufresne (ndufresne) 2014-03-16 16:41:15 UTC
Comment on attachment 272059 [details] [review]
Add support for other OS like FreeBSD

commit 155d66684573161e2e4e10b9368bdf7e2f3a86ff
Author: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Date:   Sun Mar 16 15:26:04 2014 +0100

    v4l2: Add types compatiblity for other OS
    
    Adds type compatiblity with other OS like BSD. This uses types mapping macro to
    avoid conflict with existing defined types. We resuse glib types as these are
    already available on supported platforms. This is GCC only because of the
    le32 type that uses bitwise attribute.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=726453