@@ -40,6 +40,11 @@ public:
void cancel();
void reset();
+ void resetMetadata()
+ {
+ _o<Request>()->metadata().clear();
+ }
+
void prepare(std::chrono::milliseconds timeout = 0ms);
Signal<> prepared;
@@ -945,7 +945,7 @@ void Vc4CameraData::tryRunPipeline()
* related controls. We clear it first because the request metadata
* may have been populated if we have dropped the previous frame.
*/
- request->metadata().clear();
+ request->_d()->resetMetadata();
fillRequestMetadata(bayerFrame.controls, request);
/* Set our state to say the pipeline is active. */
In order to prepare to restrict access to the metadata list stored in a request, provide a function that allows pipeline handlers to reset the metadata pack. The only user is at the moment the vc4 pipeline handler. Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> --- include/libcamera/internal/request.h | 5 +++++ src/libcamera/pipeline/rpi/vc4/vc4.cpp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-)