Hi Javier, On Monday 02 January 2012 12:44:08 javier Martin wrote: > Just one more question about this. > > The v4l2 encoder, which is the last element in my processing chain, is > an H.264 encoder that has to know about previous frames to encode. > For these kind of devices it is very useful to know whether a frame > has been lost to introduce a skip frame and improve the encoding > process. > > But, with the current approach we don't have any way to communicate > this to the device. > > One option would be that the user specified a sequence number when > issuing VIDIOC_QBUF at the output queue so that the device could > detect any discontinuity and introduce a skip frame. But this would > break your rule that sequence number introduced at the output queue > has to be ignored by the driver. That's a use case I haven't thought about. Using sequence numbers could indeed help in that case. My concern is that most (if not all) applications don't set the sequence number before queuing a buffer, so requiring them to do so could introduce breakages. This could be limited to H.264 encoders (or more generally codecs) though. Another option would be to queue a 0-bytes frame. That might be a bit hackish though. -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html