[libcamera-devel] [PATCH v5] libcamera, android, cam, gstreamer, qcam, v4l2: Reuse Request
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Wed Oct 7 04:29:31 CEST 2020
Hi Paul,
On Wed, Oct 07, 2020 at 05:26:47AM +0300, Laurent Pinchart wrote:
> On Tue, Oct 06, 2020 at 07:17:43PM +0900, Paul Elder wrote:
> > Allow reuse of the Request object by implementing reuse(). This means
> > the applications now have the responsibility of freeing the Request
> > objects, so make all libcamera users (cam, qcam, v4l2-compat, gstreamer,
> > android) do so.
> >
> > Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
> >
> > ---
> > I'm having a problem getting doxygen to recognize the existence of the
> > documentation for Request::reuse(). I'll keep looking into it.
Replace /* with /** and it should work better :-)
> > Changes in v5:
> > - rename reset() to reuse()
> > - make reuse()'s reuseBuffers parameter into enum instead of bool
> > - fix qcam qt assertion error on the first queueRequest, where
> > freeQueue_ is empty
> >
> > Changes in v4:
> > - no more implicit calls of anything that we added in this patch
> > - make reset() take a reuseBuffers boolean parameters
> > - use transient request - delete request
> > - reuse request, reset buffers - reset()
> > - reuse request, reuse buffesr - reset(true)
> > - update apps and tests and documentation accordingly
> >
> > Changes in v3:
> > - reset() is called in Camera::queueRequest()
> > - apps that use transient request (android, gstreamer) delete the
> > request at the end of the completion handler
> > - apps that want to reuse the buffers (cam) use reAddBuffers()
> > - apps that need to change the buffers (qcam, v4l2) use clearBuffers()
> > - update the documentation accordingly
> >
> > Changes in v2:
> > - clear controls_ and metadata_ and validator_ in Request::reset()
> > - use unique_ptr on application side, prior to queueRequest, and use
> > regular pointer for completion handler
> > - make qcam's reuse request nicer
> > - update Camera::queueRequest() and Camera::createRequest() documentation
> > - add documentation for Request::reset()
> > - make v4l2-compat reuse request
> > - make gstreamer and android use the new createRequest API, though they
> > do not actually reuse the requests
> > ---
> > include/libcamera/camera.h | 2 +-
> > include/libcamera/request.h | 7 +++++
> > src/android/camera_device.cpp | 14 +++++++---
> > src/cam/capture.cpp | 29 +++++---------------
> > src/cam/capture.h | 3 +++
> > src/gstreamer/gstlibcamerasrc.cpp | 14 ++++++----
> > src/libcamera/camera.cpp | 14 ++++------
> > src/libcamera/request.cpp | 39 +++++++++++++++++++++++++++
> > src/qcam/main_window.cpp | 44 ++++++++++++++++++-------------
> > src/qcam/main_window.h | 26 +++++-------------
> > src/v4l2/v4l2_camera.cpp | 38 ++++++++++++++++++--------
> > src/v4l2/v4l2_camera.h | 4 ++-
> > test/camera/buffer_import.cpp | 13 ++++-----
> > test/camera/capture.cpp | 13 ++++-----
> > test/camera/statemachine.cpp | 9 +++----
> > 15 files changed, 161 insertions(+), 108 deletions(-)
[snip]
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list