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 593764 - [v4l2src] format ordering: put emulated formats behind native formats
[v4l2src] format ordering: put emulated formats behind native formats
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal enhancement
: 0.10.17
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 571772
Blocks:
 
 
Reported: 2009-09-01 09:15 UTC by Tim-Philipp Müller
Modified: 2009-09-04 07:33 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26



Description Tim-Philipp Müller 2009-09-01 09:15:54 UTC
+++ This bug was initially created as a clone of Bug #571772 +++

> Open action items for libv4l:
> 
>  - provide API to differentiate between emulated
>    and native formats? (please file new bug once
>    that exists)
> 

Done, the new libv4l-0.6.1 release (made minutes ago) now has an API for this:
http://linuxtv.org/hg/~hgoede/libv4l/rev/38927bb366e0
http://linuxtv.org/hg/~hgoede/gspca/rev/58a65a9e65af
Comment 1 Sebastian Dröge (slomo) 2009-09-03 18:39:58 UTC
commit 4fda384a83346d6056c34f409412a9c40e294433
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Thu Sep 3 20:38:50 2009 +0200

    v4l2: Put emulated formats behind native formats
    
    Fixes bug #593764.
Comment 2 Hans de Goede 2009-09-04 06:41:58 UTC
Hi,

I noticed you do the following:

+#ifdef V4L2_FMT_FLAG_EMULATED
+ gboolean emulated = ((flags & V4L2_FMT_FLAG_EMULATED) != 0);
+#else
+ gboolean emulated = FALSE;
+#endif

Notice however that the V4L2_FMT_FLAG_EMULATED won't show up in Linux kernel
headers until 2.6.32, where as many distro's will (hopefully) have libv4l-0.6.1 which sets this flag before then.

libv4l contains the following which you may want to use (for a while atleast) instead:

#ifndef V4L2_FMT_FLAG_EMULATED   
#define V4L2_FMT_FLAG_EMULATED 0x0002
#endif

Regards,

Hans
Comment 3 Sebastian Dröge (slomo) 2009-09-04 07:16:30 UTC
But if libv4l defines this already where is the problem? :) Or is it only defined in some private source file instead of some public header?
Comment 4 Hans de Goede 2009-09-04 07:19:40 UTC
(In reply to comment #3)
> But if libv4l defines this already where is the problem? :) Or is it only
> defined in some private source file instead of some public header?

It is only in a private header to get libv4l to compile, the flag is part of
the v4l2 API, not the libv4l2 API, although AFAIK libv4l2 is the only user.
Comment 5 Sebastian Dröge (slomo) 2009-09-04 07:33:45 UTC
Ok :)

commit 686f8376a833bbf12749198111a1e24fb9781e78
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Fri Sep 4 09:32:42 2009 +0200

    v4l2: Define V4L2_FMT_FLAG_EMULATED if it's not defined yet
    
    libv4l2 already uses this flag, even on Linux kernel versions
    before 2.6.32.