summaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2018-05-21 04:54:51 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-08-31 11:20:10 -0400
commitc07aa48ec57eca649e987e8f19a336d4373b8da6 (patch)
treeb663c201f8732e4911fe11e35379ce58de848793 /include/media
parent394dc588809158826e2877adb670391829f91c63 (diff)
downloadlinux-c07aa48ec57eca649e987e8f19a336d4373b8da6.tar.bz2
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>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/videobuf2-core.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h
index 957b11c675cb..a9f2a7eae49a 100644
--- a/include/media/videobuf2-core.h
+++ b/include/media/videobuf2-core.h
@@ -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 */