v4l2object: use G_SELECTION instead of G_CROP in gst_v4l2_object_acquire_format
authorPhilipp Zabel <p.zabel@pengutronix.de>
Fri, 13 May 2016 12:45:02 +0000 (14:45 +0200)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Mon, 6 Jun 2016 21:33:27 +0000 (17:33 -0400)
commit74f020fd2f1dc645efe35a7ba1f951f9c5ee7c4c
tree8700dcbbb04ebc7ad0aed282bd3acbc4bd7c8d20
parentb18031cf4b5c3089c87831db9f43350bda9ffa18
v4l2object: use G_SELECTION instead of G_CROP in gst_v4l2_object_acquire_format

The gst_v4l2_object_acquire_format() function is used by v4l2videodec to obtain
the currently set capture format. Since G_FMT returns the coded size, the
visible size needs to be obtained from the compose rectangle in order to
negotiate it with downstream elements. The G_CROP call hasn't worked on mem2mem
capture queues for a long time. Instead use the G_SELECTION call to obtain the
compose rectangle and only fall back to G_CROP for ancient kernels.

https://bugzilla.gnome.org/show_bug.cgi?id=766381
sys/v4l2/gstv4l2object.c