Re: [PATCH] [media] coda: implement encoder stop command

2017-03-03 Thread Philipp Zabel
On Thu, 2017-03-02 at 17:30 +0100, Jean-Michel Hautbois wrote: > > > > + /* If there is no buffer in flight, wake up */ > > + if (ctx->qsequence == ctx->osequence) { > > Not sure about this one, I would have done something like : > if (!(ctx->fh.m2m_ctx->job_flags)) { This field is

Re: [PATCH] [media] coda: implement encoder stop command

2017-03-02 Thread Jean-Michel Hautbois
> + /* If there is no buffer in flight, wake up */ > + if (ctx->qsequence == ctx->osequence) { Not sure about this one, I would have done something like : if (!(ctx->fh.m2m_ctx->job_flags)) { > + dst_vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, > +

Re: [PATCH] [media] coda: implement encoder stop command

2017-03-02 Thread Jean-Michel Hautbois
Hi Philipp, 2017-03-02 10:51 GMT+01:00 Philipp Zabel : > There is no need to call v4l2_m2m_try_schedule to kick off draining the > bitstream buffer for the encoder, but we have to wake up the destination > queue in case there are no new OUTPUT buffers to be encoded and userspace > is already polli

Re: [PATCH] [media] coda: implement encoder stop command

2017-03-02 Thread Philipp Zabel
Hi Jean-Michel, On Thu, 2017-03-02 at 11:02 +0100, Jean-Michel Hautbois wrote: > Hi Philipp, > > 2017-03-02 10:51 GMT+01:00 Philipp Zabel : > > There is no need to call v4l2_m2m_try_schedule to kick off draining the > > bitstream buffer for the encoder, but we have to wake up the destination > >

[PATCH] [media] coda: implement encoder stop command

2017-03-02 Thread Philipp Zabel
There is no need to call v4l2_m2m_try_schedule to kick off draining the bitstream buffer for the encoder, but we have to wake up the destination queue in case there are no new OUTPUT buffers to be encoded and userspace is already polling for new CAPTURE buffers. Signed-off-by: Philipp Zabel ---