From 33fedea818e2b6a9ed68ac86acf194b1a2da8828 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sat, 14 Mar 2020 16:14:27 +0200 Subject: libcamera: pipeline_handler: Fold buffer management with start/stop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There's no need anymore to have the Camera object control how and when pipeline handlers allocate and free the buffers for the application-facing video devices. Fold those operations, currently performed by importFrameBuffers() and freeFrameBuffers(), into the start() and stop() functions. This simplifies the pipeline handler API, its implementation, and the implementation of the Camera class. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- src/libcamera/camera.cpp | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'src/libcamera/camera.cpp') diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp index 3192dfb4..5593c1b3 100644 --- a/src/libcamera/camera.cpp +++ b/src/libcamera/camera.cpp @@ -915,13 +915,6 @@ int Camera::start() LOG(Camera, Debug) << "Starting capture"; - for (Stream *stream : p_->activeStreams_) { - ret = p_->pipe_->invokeMethod(&PipelineHandler::importFrameBuffers, - ConnectionTypeDirect, this, stream); - if (ret < 0) - return ret; - } - ret = p_->pipe_->invokeMethod(&PipelineHandler::start, ConnectionTypeBlocking, this); if (ret) @@ -959,10 +952,6 @@ int Camera::stop() p_->pipe_->invokeMethod(&PipelineHandler::stop, ConnectionTypeBlocking, this); - for (Stream *stream : p_->activeStreams_) - p_->pipe_->invokeMethod(&PipelineHandler::freeFrameBuffers, - ConnectionTypeBlocking, this, stream); - return 0; } -- cgit v1.2.1