GNOME Bugzilla – Bug 593764
[v4l2src] format ordering: put emulated formats behind native formats
Last modified: 2009-09-04 07:33:45 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
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.
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
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?
(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.
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.