libcamera: request: Move metadata_ to Private

Address a long standing \todo item that suggested to implement a
read-only interface for the Request::metadata() accessor and deflect to
the internal implementation for the read-write accessor used by pipeline
handlers.

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Acked-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
This commit is contained in:
Jacopo Mondi
2025-11-25 15:07:23 +01:00
parent a8b8485aca
commit dce2ef36f2
13 changed files with 61 additions and 52 deletions
+5 -5
View File
@@ -26,7 +26,6 @@
#include <libcamera/formats.h>
#include <libcamera/framebuffer.h>
#include <libcamera/property_ids.h>
#include <libcamera/request.h>
#include <libcamera/stream.h>
#include <libcamera/transform.h>
@@ -45,6 +44,7 @@
#include "libcamera/internal/media_device.h"
#include "libcamera/internal/media_pipeline.h"
#include "libcamera/internal/pipeline_handler.h"
#include "libcamera/internal/request.h"
#include "libcamera/internal/v4l2_subdevice.h"
#include "libcamera/internal/v4l2_videodevice.h"
#include "libcamera/internal/yaml_parser.h"
@@ -507,7 +507,7 @@ void RkISP1CameraData::metadataReady(unsigned int frame, const ControlList &meta
if (!info)
return;
info->request->metadata().merge(metadata);
info->request->_d()->metadata().merge(metadata);
info->metadataProcessed = true;
pipe()->tryCompleteRequest(info);
@@ -1643,8 +1643,8 @@ void PipelineHandlerRkISP1::imageBufferReady(FrameBuffer *buffer)
* \todo The sensor timestamp should be better estimated by connecting
* to the V4L2Device::frameStart signal.
*/
request->metadata().set(controls::SensorTimestamp,
metadata.timestamp);
request->_d()->metadata().set(controls::SensorTimestamp,
metadata.timestamp);
if (isRaw_) {
const ControlList &ctrls =
@@ -1686,7 +1686,7 @@ void PipelineHandlerRkISP1::imageBufferReady(FrameBuffer *buffer)
return;
}
dewarper_->populateMetadata(&data->mainPathStream_, request->metadata());
dewarper_->populateMetadata(&data->mainPathStream_, request->_d()->metadata());
}
void PipelineHandlerRkISP1::dewarpBufferReady(FrameBuffer *buffer)