Re: V4L2_DEC_CMD_STOP and last_buffer_dequeued

2016-10-17 Thread 李務誠
We found videobuf2-core.h has a function vb2_clear_last_buffer_dequeued to clear last_buffer_dequeued. We call vb2_clear_last_buffer_dequeued in the driver when it gets CMD_START. Everything works now. On Mon, Oct 17, 2016 at 9:46 PM, Nicolas Dufresne wrote: > Le samedi 15 octobre 2016 à 08:16 +0

Re: V4L2_DEC_CMD_STOP and last_buffer_dequeued

2016-10-17 Thread Nicolas Dufresne
Le samedi 15 octobre 2016 à 08:16 +0800, Wu-Cheng Li (李務誠) a écrit : > last_buffer_dequeued is only cleared to false when CAPTURE queue is > STREAMOFF (#1). Queuing a header to OUTPUT queue won't clear > last_buffer_dequeued of CAPTURE queue. It looks to me that v4l2 core > needs to intercept CMD_S

Re: V4L2_DEC_CMD_STOP and last_buffer_dequeued

2016-10-14 Thread 李務誠
On Sat, Oct 15, 2016 at 2:20 AM, Nicolas Dufresne wrote: > > Le mercredi 12 octobre 2016 à 23:33 +0800, Wu-Cheng Li (李務誠) a écrit : > > I'm trying to use V4L2_DEC_CMD_STOP to implement flush. First the > > userspace sent V4L2_DEC_CMD_STOP to initiate the flush. The driver > > set > > V4L2_BUF_FLAG

Re: V4L2_DEC_CMD_STOP and last_buffer_dequeued

2016-10-14 Thread Nicolas Dufresne
Le mercredi 12 octobre 2016 à 23:33 +0800, Wu-Cheng Li (李務誠) a écrit : > I'm trying to use V4L2_DEC_CMD_STOP to implement flush. First the > userspace sent V4L2_DEC_CMD_STOP to initiate the flush. The driver > set > V4L2_BUF_FLAG_LAST on the last CAPTURE buffer. I thought implementing > V4L2_DEC_CM

V4L2_DEC_CMD_STOP and last_buffer_dequeued

2016-10-12 Thread 李務誠
Hi, I'm trying to use V4L2_DEC_CMD_STOP to implement flush. First the userspace sent V4L2_DEC_CMD_STOP to initiate the flush. The driver set V4L2_BUF_FLAG_LAST on the last CAPTURE buffer. I thought implementing V4L2_DEC_CMD_START in the driver was enough to start the decoder. But last_buffer_dequeu