media: videobuf2-core: add request helper functions
Add a new helper function to tell if a request object is a buffer. Add a new helper function that returns true if a media_request contains at least one buffer. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:

committed by
Mauro Carvalho Chehab

parent
394dc58880
commit
c07aa48ec5
@@ -1172,4 +1172,19 @@ bool vb2_buffer_in_use(struct vb2_queue *q, struct vb2_buffer *vb);
|
||||
*/
|
||||
int vb2_verify_memory_type(struct vb2_queue *q,
|
||||
enum vb2_memory memory, unsigned int type);
|
||||
|
||||
/**
|
||||
* vb2_request_object_is_buffer() - return true if the object is a buffer
|
||||
*
|
||||
* @obj: the request object.
|
||||
*/
|
||||
bool vb2_request_object_is_buffer(struct media_request_object *obj);
|
||||
|
||||
/**
|
||||
* vb2_request_has_buffers() - return true if the request contains buffers
|
||||
*
|
||||
* @req: the request.
|
||||
*/
|
||||
bool vb2_request_has_buffers(struct media_request *req);
|
||||
|
||||
#endif /* _MEDIA_VIDEOBUF2_CORE_H */
|
||||
|
Reference in New Issue
Block a user