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. > How is face detection enabled or disabled? Currently, streaming on will trigger detection enabling, and streaming off will trigger detection disabling. > > 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? >> +/** >> + * struct v4l2_fd_result - VIDIOC_G_FD_RESULT argument >> + * @buf_index: entry, index of v4l2_buffer for face detection >> + * @face_cnt: return, how many faces detected from the @buf_index >> + * @fd: return, result of faces' detection >> + */ >> +struct v4l2_fd_result { >> + __u32 buf_index; >> + __u32 face_cnt; >> + __u32 reserved[6]; >> + struct v4l2_fd_detection *fd; > > Aligning structure sizes to a power of two is considered to be a good > practice. There are many changes on these structure in -v2. thanks, -- Ming Lei -- 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