[PATCH v3] treewide: Query list of cameras just once

Barnabás Pőcze pobrn at protonmail.com
Tue Apr 30 21:27:41 CEST 2024


2024. április 30., kedd 21:25 keltezéssel, Barnabás Pőcze <pobrn at protonmail.com> írta:

> This is more efficient since only a single vector will be constructed,
> and furthermore, it prevents the TOCTOU issue that might arise when
> the list of cameras changes between the two queries.
> 
> Signed-off-by: Barnabás Pőcze pobrn at protonmail.com
> 
> ---
> 
> changes in v3
> * drop std::move() from this change
> * extend note in documentation
> * limit scope of `cameras` in `CameraSession::CameraSession()`
> 
> changes in v2
> * fix code block in documentation
> * add comment noting that the camera may disappear
> 
> ---
> Documentation/guides/application-developer.rst | 12 +++++++-----
> src/apps/cam/camera_session.cpp | 11 ++++++++---
> src/gstreamer/gstlibcamerasrc.cpp | 5 +++--
> 3 files changed, 18 insertions(+), 10 deletions(-)
> 
> [...]


Sorry, please ignore, I resent it by accident.


Regards,
Barnabás Pőcze


More information about the libcamera-devel mailing list