summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2021-09-09 13:13:20 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2021-09-09 14:42:17 +0100
commit1f795410c0d99aaa15c8155d7d16ae6357487a96 (patch)
tree9558a3736beffa03fd67a26cf1fbad31196ab612
parentb8da445fc72cfd436ed7ddb8a428e7ea11af9fd9 (diff)
simple-cam: Use new metadata API
In libcamera commit 32635054bc76 ("libcamera: framebuffer: Prevent modifying the number of metadata planes"), the planes are returned as a const span rather than a vector from the metadata. This provides better protection on the underlying structures, but was a break in the API. Update simple-cam to use the new API. Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--simple-cam.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/simple-cam.cpp b/simple-cam.cpp
index a8ac3c8..95e472b 100644
--- a/simple-cam.cpp
+++ b/simple-cam.cpp
@@ -58,10 +58,10 @@ static void processRequest(Request *request)
<< " 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())
+ if (++nplane < metadata.planes().size())
std::cout << "/";
}