Hi Ming, On 12/14/2011 04:57 PM, Ming Lei wrote: > Hi, > > On Wed, Dec 14, 2011 at 11:34 PM, Sakari Ailus <sakari.ailus@xxxxxx> wrote: > >>> + case VIDIOC_G_FD_RESULT: >>> + { >>> + struct v4l2_fd_result *fr = arg; >>> + >>> + if (!ops->vidioc_g_fd_result) >>> + break; >>> + >>> + ret = ops->vidioc_g_fd_result(file, fh, fr); >>> + >>> + dbgarg(cmd, "index=%d", fr->buf_index); >>> + break; >>> + } >>> + case VIDIOC_G_FD_COUNT: >>> + { >>> + struct v4l2_fd_count *fc = arg; >>> + >>> + if (!ops->vidioc_g_fd_count) >>> + break; >>> + >>> + ret = ops->vidioc_g_fd_count(file, fh, fc); >>> + >>> + dbgarg(cmd, "index=%d", fc->buf_index); >>> + break; >>> + } >> >> The patch description tells these ioctls may be called between... what? I'd > > In fact, these ioctls should be called after return from poll. > >> think such information could be better provided as events. > > Yes, I still think so, but the length of returned data is variant, also > event has the 64 byte length's limitation. Right, I'm afraid it's not even enough for single object description. I have been thinking about adding variable payload support to v4l2 event API. >> How is face detection enabled or disabled? > > Currently, streaming on will trigger detection enabling, and streaming off > will trigger detection disabling. We would need to develop a boolean control for this I think, this seems one of the basic features for the configuration interface. >> Could you detect other objects than faces? > > The -v2 has been extended to detect objects, not limited to faces. > >> Would events be large enough to deliver you the necessary data? We could > > Looks like event(64 bytes) is not large enough to deliver the data. > >> also consider delivering the information as a data structure on a separate >> plane. > > Could you let me know how to do it? You would have to use multi-planar interface for that, which would introduce additional complexity at user interface. Moreover variable plane count is not supported in vb2. Relatively significant effort is required to add this IMHO. -- Regards, Sylwester -- 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