5.9. ioctl MEDIA_IOC_REQUEST_ALLOC¶
MEDIA_IOC_REQUEST_ALLOC - Allocate a request
File descriptor returned by
Pointer to an integer.
If the media device supports requests, then
this ioctl can be used to allocate a request. If it is not supported, then
errno is set to
ENOTTY. A request is accessed through a file descriptor
that is returned in
If the request was successfully allocated, then the request file descriptor can be passed to the VIDIOC_QBUF, VIDIOC_G_EXT_CTRLS, VIDIOC_S_EXT_CTRLS and VIDIOC_TRY_EXT_CTRLS ioctls.
In addition, the request can be queued by calling ioctl MEDIA_REQUEST_IOC_QUEUE and re-initialized by calling ioctl MEDIA_REQUEST_IOC_REINIT.
Finally, the file descriptor can be polled to wait for the request to complete.
The request will remain allocated until all the file descriptors associated
with it are closed by
close() and the driver no
longer uses the request internally. See also
here for more information.
5.9.5. Return Value¶
On success 0 is returned, on error -1 and the
errno variable is set
appropriately. The generic error codes are described at the
Generic Error Codes chapter.
The driver has no support for requests.