From 32635054bc76e2ababd8ea2177fca1f88229541a Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 2 Sep 2021 04:29:03 +0300 Subject: libcamera: framebuffer: Prevent modifying the number of metadata planes The number of metadata planes should always match the number of frame buffer planes. Enforce this by making the vector private and providing accessor functions. As this changes the public API, update all in-tree users accordingly. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Jean-Michel Hautbois Reviewed-by: Hirokazu Honda --- Documentation/guides/application-developer.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Documentation') diff --git a/Documentation/guides/application-developer.rst b/Documentation/guides/application-developer.rst index 462efe24..84e522c0 100644 --- a/Documentation/guides/application-developer.rst +++ b/Documentation/guides/application-developer.rst @@ -427,10 +427,10 @@ the Frame sequence number and details of the planes. std::cout << " seq: " << std::setw(6) << std::setfill('0') << metadata.sequence << " bytesused: "; unsigned int nplane = 0; - for (const FrameMetadata::Plane &plane : metadata.planes) + for (const FrameMetadata::Plane &plane : metadata.planes()) { std::cout << plane.bytesused; - if (++nplane < metadata.planes.size()) std::cout << "/"; + if (++nplane < metadata.planes().size()) std::cout << "/"; } std::cout << std::endl; -- cgit v1.2.1