[PATCH v2] clients: teach simple-dmabuf-v4l to deal with flipped input
Bryce Harrington
bryce at osg.samsung.com
Wed Feb 8 18:28:58 UTC 2017
On Wed, Feb 08, 2017 at 11:33:29AM -0500, Micah Fedke wrote:
> Bryce,
>
> Here is a branch that uses the legacy VIDIOC_QUERYCTRL to query the
> controls, instead of VIDIOC_QUERY_EXT_CTRL. I believe this will make
> it more compatible with older kernels. Can you test it?
>
> https://git.collabora.com/cgit/user/fedke.m/weston.git/log/?h=yflip_queryctl_legacy_01
>
For some reason I can't check out the branch. ("warning: remote HEAD
refers to nonexistent ref, unable to checkout.") But if I dl and apply
the top patch to current weston trunk it does build and distcheck
properly.
Can't comment on the technicals as I don't know V4L2, but noticed:
+ printf ("\"%s\" control is set, but dmabuf output"
+ "cannot be flipped horizontally\n", hflip_ctrl);
S/b space between 'output' / 'cannot' (or 'cannot'/'be' in original
patch). Also if this is a warning, should fprintf to stderr like other
warnings in this file.
Thanks,
Bryce
> Thanks,
>
> -mf
>
> On 02/07/2017 08:17 PM, Bryce Harrington wrote:
> >On Tue, Feb 07, 2017 at 11:48:47AM +0200, Pekka Paalanen wrote:
> >>On Mon, 6 Feb 2017 12:57:41 -0500
> >>Micah Fedke <micah.fedke at collabora.co.uk> wrote:
> >>
> >>>The v4l2 API can be queried to detect if the input video image is
> >>>horizontally or vertically flipped. If the image is y-flipped, we can
> >>>set the ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_Y_INVERT flag to notify the
> >>>compositor. If the image is h-flipped, we can only print a warning
> >>>since linux_buffer_params_v1 does not support horizontal flipping.
> >>>
> >>>Signed-off-by: Micah Fedke <micah.fedke at collabora.co.uk>
> >>>---
> >>>This version addresses Pekka's comments by renaming check_v4l2_control to
> >>>check_v4l2_control_bool, removing the len parameter, separating out the logic
> >>>tests in check_v4l2_control_bool and fixing spacing issues.
> >>>
> >>> clients/simple-dmabuf-v4l.c | 62 +++++++++++++++++++++++++++++++++++++++------
> >>> 1 file changed, 54 insertions(+), 8 deletions(-)
> >>
> >>Hi,
> >>
> >>looks fine, pushed with my R-b:
> >> 9a200d7..0fee977 master -> master
> >
> >Breaks the build on older linux kernels.
> >
> > CC clients/weston_simple_dmabuf_v4l-simple-dmabuf-v4l.o
> >clients/simple-dmabuf-v4l.c:358:25: warning: ‘struct v4l2_query_ext_ctrl’ declared inside parameter list [enabled by default]
> > const int expected_value)
> > ^
> >clients/simple-dmabuf-v4l.c:358:25: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
> >clients/simple-dmabuf-v4l.c: In function ‘check_v4l2_control_bool’:
> >clients/simple-dmabuf-v4l.c:363:18: error: dereferencing pointer to incomplete type
> > ctrl.id = qectrl->id;
> > ^
> >et al.
> >
> >Builds ok with the patch reverted, or with --disable-simple-dmabuf-v4l-client set.
> >
> >
> >Bryce
> >
> >_______________________________________________
> >wayland-devel mailing list
> >wayland-devel at lists.freedesktop.org
> >https://lists.freedesktop.org/mailman/listinfo/wayland-devel
> >
>
> --
>
> Micah Fedke
> Collabora Ltd.
> +44 1223 362967
> https://www.collabora.com/
> https://twitter.com/collaboraltd
More information about the wayland-devel
mailing list