linux-4.4.1/vb2_ops
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#m3c8a59c]
#backlinks
*説明 [#gea8c424]
-パス: [[linux-4.4.1/include/media/videobuf2-core.h]]
-FIXME: これは何?
--説明
**参考 [#h73c525f]
*実装 [#z603c67a]
/**
* struct vb2_ops - driver-specific callbacks
*
* @queue_setup: called from VIDIOC_REQBUFS and V...
* handlers before memory allocatio...
* *num_planes != 0, after the allo...
* smaller number of buffers. Drive...
* the required number of buffers i...
* required number of planes per bu...
* size of each plane should be set...
* and optional per-plane allocator...
* alloc_ctxs[] array. When called ...
* fmt == NULL, the driver has to u...
* configured format and *num_buffe...
* of buffers, that are being alloc...
* VIDIOC_CREATE_BUFS, fmt != NULL ...
* target frame format (if the form...
* callback must return -EINVAL). I...
* are being allocated additionally...
* @wait_prepare: release any locks taken while ca...
* it is called before an ioctl nee...
* buffer to arrive; required to av...
* blocking access type.
* @wait_finish: reacquire all locks released in ...
* required to continue operation a...
* waiting for a new buffer to arri...
* @buf_init: called once after allocating a b...
* or after acquiring a new USERPTR...
* perform additional buffer-relate...
* initialization failure (return !...
* queue setup from completing succ...
* @buf_prepare: called every time the buffer is ...
* and from the VIDIOC_PREPARE_BUF ...
* perform any initialization requi...
* hardware operation in this callb...
* access/modify the buffer here as...
* the CPU; drivers that support VI...
* also validate the buffer size; i...
* the buffer will not be queued in...
* @buf_finish: called before every dequeue of t...
* userspace; the buffer is synced ...
* can access/modify the buffer con...
* perform any operations required ...
* accesses the buffer; optional. T...
* one of the following: DONE and E...
* streaming is in progress, and th...
* when the queue has been canceled...
* buffers are being returned to th...
* state. Typically you only have t...
* state is VB2_BUF_STATE_DONE, sin...
* the buffer contents will be igno...
* @buf_cleanup: called once before the buffer is...
* perform any additional cleanup; ...
* @start_streaming: called once to enter 'streaming'...
* receive buffers with @buf_queue ...
* @start_streaming is called; the ...
* of already queued buffers in cou...
* can return an error if hardware ...
* buffers that have been already g...
* callback are to be returned by t...
* @vb2_buffer_done(VB2_BUF_STATE_Q...
* If you need a minimum number of ...
* start streaming, then set @min_b...
* vb2_queue structure. If that is ...
* start_streaming won't be called ...
* many buffers have been queued up...
* @stop_streaming: called when 'streaming' state mu...
* should stop any DMA transactions...
* finish and give back all buffers...
* callback by calling @vb2_buffer_...
* VB2_BUF_STATE_DONE or VB2_BUF_ST...
* vb2_wait_for_all_buffers() funct...
* @buf_queue: passes buffer vb to the driver; ...
* hardware operation on this buffe...
* the buffer back by calling vb2_b...
* it is allways called after calli...
* might be called before start_str...
* pre-queued buffers before callin...
*/
struct vb2_ops {
int (*queue_setup)(struct vb2_queue *q, const vo...
unsigned int *num_buffers, un...
unsigned int sizes[], void *a...
-
--[[linux-4.4.1/vb2_queue]]
void (*wait_prepare)(struct vb2_queue *q);
void (*wait_finish)(struct vb2_queue *q);
int (*buf_init)(struct vb2_buffer *vb);
int (*buf_prepare)(struct vb2_buffer *vb);
void (*buf_finish)(struct vb2_buffer *vb);
void (*buf_cleanup)(struct vb2_buffer *vb);
-
--[[linux-4.4.1/vb2_buffer]]
int (*start_streaming)(struct vb2_queue *q, unsi...
void (*stop_streaming)(struct vb2_queue *q);
void (*buf_queue)(struct vb2_buffer *vb);
};
*コメント [#b363b256]
終了行:
*参照元 [#m3c8a59c]
#backlinks
*説明 [#gea8c424]
-パス: [[linux-4.4.1/include/media/videobuf2-core.h]]
-FIXME: これは何?
--説明
**参考 [#h73c525f]
*実装 [#z603c67a]
/**
* struct vb2_ops - driver-specific callbacks
*
* @queue_setup: called from VIDIOC_REQBUFS and V...
* handlers before memory allocatio...
* *num_planes != 0, after the allo...
* smaller number of buffers. Drive...
* the required number of buffers i...
* required number of planes per bu...
* size of each plane should be set...
* and optional per-plane allocator...
* alloc_ctxs[] array. When called ...
* fmt == NULL, the driver has to u...
* configured format and *num_buffe...
* of buffers, that are being alloc...
* VIDIOC_CREATE_BUFS, fmt != NULL ...
* target frame format (if the form...
* callback must return -EINVAL). I...
* are being allocated additionally...
* @wait_prepare: release any locks taken while ca...
* it is called before an ioctl nee...
* buffer to arrive; required to av...
* blocking access type.
* @wait_finish: reacquire all locks released in ...
* required to continue operation a...
* waiting for a new buffer to arri...
* @buf_init: called once after allocating a b...
* or after acquiring a new USERPTR...
* perform additional buffer-relate...
* initialization failure (return !...
* queue setup from completing succ...
* @buf_prepare: called every time the buffer is ...
* and from the VIDIOC_PREPARE_BUF ...
* perform any initialization requi...
* hardware operation in this callb...
* access/modify the buffer here as...
* the CPU; drivers that support VI...
* also validate the buffer size; i...
* the buffer will not be queued in...
* @buf_finish: called before every dequeue of t...
* userspace; the buffer is synced ...
* can access/modify the buffer con...
* perform any operations required ...
* accesses the buffer; optional. T...
* one of the following: DONE and E...
* streaming is in progress, and th...
* when the queue has been canceled...
* buffers are being returned to th...
* state. Typically you only have t...
* state is VB2_BUF_STATE_DONE, sin...
* the buffer contents will be igno...
* @buf_cleanup: called once before the buffer is...
* perform any additional cleanup; ...
* @start_streaming: called once to enter 'streaming'...
* receive buffers with @buf_queue ...
* @start_streaming is called; the ...
* of already queued buffers in cou...
* can return an error if hardware ...
* buffers that have been already g...
* callback are to be returned by t...
* @vb2_buffer_done(VB2_BUF_STATE_Q...
* If you need a minimum number of ...
* start streaming, then set @min_b...
* vb2_queue structure. If that is ...
* start_streaming won't be called ...
* many buffers have been queued up...
* @stop_streaming: called when 'streaming' state mu...
* should stop any DMA transactions...
* finish and give back all buffers...
* callback by calling @vb2_buffer_...
* VB2_BUF_STATE_DONE or VB2_BUF_ST...
* vb2_wait_for_all_buffers() funct...
* @buf_queue: passes buffer vb to the driver; ...
* hardware operation on this buffe...
* the buffer back by calling vb2_b...
* it is allways called after calli...
* might be called before start_str...
* pre-queued buffers before callin...
*/
struct vb2_ops {
int (*queue_setup)(struct vb2_queue *q, const vo...
unsigned int *num_buffers, un...
unsigned int sizes[], void *a...
-
--[[linux-4.4.1/vb2_queue]]
void (*wait_prepare)(struct vb2_queue *q);
void (*wait_finish)(struct vb2_queue *q);
int (*buf_init)(struct vb2_buffer *vb);
int (*buf_prepare)(struct vb2_buffer *vb);
void (*buf_finish)(struct vb2_buffer *vb);
void (*buf_cleanup)(struct vb2_buffer *vb);
-
--[[linux-4.4.1/vb2_buffer]]
int (*start_streaming)(struct vb2_queue *q, unsi...
void (*stop_streaming)(struct vb2_queue *q);
void (*buf_queue)(struct vb2_buffer *vb);
};
*コメント [#b363b256]
ページ名: