summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-08-13 00:37:42 +0200
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-09-28 23:53:45 +0200
commit8b9309d38208e944ff31d6c79875d91b9578cdc9 (patch)
treedae46b6bf2f4762f7643b4e5cec17265f290979e /src
parentf65e6b124bc796a7c7282dcb11b8d297432369cf (diff)
libcamera: pipeline: rkisp1: Create RkISP1Frames from camera data
Create RkISP1Frames from camera data instead of picking information out from it. This is done to prepare for multi stream support where more information from the camera data will be needed. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index d6b5073b..e52aadcf 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -54,6 +54,7 @@ constexpr std::array<PixelFormat, 7> RKISP1_RSZ_MP_FORMATS{
class PipelineHandlerRkISP1;
class RkISP1ActionQueueBuffers;
+class RkISP1CameraData;
enum RkISP1ActionType {
SetSensor,
@@ -79,7 +80,7 @@ class RkISP1Frames
public:
RkISP1Frames(PipelineHandler *pipe);
- RkISP1FrameInfo *create(unsigned int frame, Request *request, Stream *stream);
+ RkISP1FrameInfo *create(const RkISP1CameraData *data, Request *request);
int destroy(unsigned int frame);
void clear();
@@ -244,8 +245,10 @@ RkISP1Frames::RkISP1Frames(PipelineHandler *pipe)
{
}
-RkISP1FrameInfo *RkISP1Frames::create(unsigned int frame, Request *request, Stream *stream)
+RkISP1FrameInfo *RkISP1Frames::create(const RkISP1CameraData *data, Request *request)
{
+ unsigned int frame = data->frame_;
+
if (pipe_->availableParamBuffers_.empty()) {
LOG(RkISP1, Error) << "Parameters buffer underrun";
return nullptr;
@@ -258,7 +261,7 @@ RkISP1FrameInfo *RkISP1Frames::create(unsigned int frame, Request *request, Stre
}
FrameBuffer *statBuffer = pipe_->availableStatBuffers_.front();
- FrameBuffer *videoBuffer = request->findBuffer(stream);
+ FrameBuffer *videoBuffer = request->findBuffer(&data->stream_);
pipe_->availableParamBuffers_.pop();
pipe_->availableStatBuffers_.pop();
@@ -878,10 +881,8 @@ void PipelineHandlerRkISP1::stop(Camera *camera)
int PipelineHandlerRkISP1::queueRequestDevice(Camera *camera, Request *request)
{
RkISP1CameraData *data = cameraData(camera);
- Stream *stream = &data->stream_;
- RkISP1FrameInfo *info = data->frameInfo_.create(data->frame_, request,
- stream);
+ RkISP1FrameInfo *info = data->frameInfo_.create(data, request);
if (!info)
return -ENOENT;