[media] videobuf2-core.h: improve documentation
Document that drivers can access/modify the buffer contents in buf_prepare and buf_finish. That was not clearly stated before. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Pawel Osciak <pawel@osciak.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
Родитель
ef33d901db
Коммит
cf227429c7
|
@ -270,22 +270,24 @@ struct vb2_buffer {
|
||||||
* queue setup from completing successfully; optional.
|
* queue setup from completing successfully; optional.
|
||||||
* @buf_prepare: called every time the buffer is queued from userspace
|
* @buf_prepare: called every time the buffer is queued from userspace
|
||||||
* and from the VIDIOC_PREPARE_BUF ioctl; drivers may
|
* and from the VIDIOC_PREPARE_BUF ioctl; drivers may
|
||||||
* perform any initialization required before each hardware
|
* perform any initialization required before each
|
||||||
* operation in this callback; drivers that support
|
* hardware operation in this callback; drivers can
|
||||||
* VIDIOC_CREATE_BUFS must also validate the buffer size;
|
* access/modify the buffer here as it is still synced for
|
||||||
* if an error is returned, the buffer will not be queued
|
* the CPU; drivers that support VIDIOC_CREATE_BUFS must
|
||||||
* in driver; optional.
|
* also validate the buffer size; if an error is returned,
|
||||||
|
* the buffer will not be queued in driver; optional.
|
||||||
* @buf_finish: called before every dequeue of the buffer back to
|
* @buf_finish: called before every dequeue of the buffer back to
|
||||||
* userspace; drivers may perform any operations required
|
* userspace; the buffer is synced for the CPU, so drivers
|
||||||
* before userspace accesses the buffer; optional. The
|
* can access/modify the buffer contents; drivers may
|
||||||
* buffer state can be one of the following: DONE and
|
* perform any operations required before userspace
|
||||||
* ERROR occur while streaming is in progress, and the
|
* accesses the buffer; optional. The buffer state can be
|
||||||
* PREPARED state occurs when the queue has been canceled
|
* one of the following: DONE and ERROR occur while
|
||||||
* and all pending buffers are being returned to their
|
* streaming is in progress, and the PREPARED state occurs
|
||||||
* default DEQUEUED state. Typically you only have to do
|
* when the queue has been canceled and all pending
|
||||||
* something if the state is VB2_BUF_STATE_DONE, since in
|
* buffers are being returned to their default DEQUEUED
|
||||||
* all other cases the buffer contents will be ignored
|
* state. Typically you only have to do something if the
|
||||||
* anyway.
|
* state is VB2_BUF_STATE_DONE, since in all other cases
|
||||||
|
* the buffer contents will be ignored anyway.
|
||||||
* @buf_cleanup: called once before the buffer is freed; drivers may
|
* @buf_cleanup: called once before the buffer is freed; drivers may
|
||||||
* perform any additional cleanup; optional.
|
* perform any additional cleanup; optional.
|
||||||
* @start_streaming: called once to enter 'streaming' state; the driver may
|
* @start_streaming: called once to enter 'streaming' state; the driver may
|
||||||
|
|
Загрузка…
Ссылка в новой задаче