camera: send GST_EVENT_LIVE_FLUSH in ::unblock
authorAlessandro Decina <alessandro.decina@collabora.co.uk>
Fri, 6 May 2011 14:02:26 +0000 (16:02 +0200)
committerAlessandro Decina <alessandro.decina@collabora.co.uk>
Thu, 26 May 2011 19:23:43 +0000 (21:23 +0200)
commitb4986f0c8bb77132b07f0227a0978aa27607b093
tree7cbe10381a72de2310959f2c6e45ab7ff99ce873
parent113b0c8bd9c3fe12faf5d3b8d8c4ce9db2a2aae0
camera: send GST_EVENT_LIVE_FLUSH in ::unblock

When setting omx_camera from PLAYING to PAUSED, it can happen that ::create is
blocked in buffer_alloc, blocking on v4l2sink. That's a source of possible
deadlocks since in PAUSED v4l2sink stops processing buffers and so buffer_alloc
can wait forever.

We avoid this sending a GST_EVENT_LIVE_FLUSH event (similar to a FLUSH_START
event, but it doesn't reset the running-time, nor sets pads flushing etc) to
instruct v4l2sink to unblock.
omx/gstomx_base_src.c