[libcamera-devel] [PATCH v1] gstreamer: Convert cm_singleton_ptr to static variable
Nicolas Dufresne
nicolas at ndufresne.ca
Wed Sep 22 19:37:33 CEST 2021
Le mercredi 22 septembre 2021 à 22:36 +0530, Vedant Paranjape a écrit :
> The global pointer pointing to libcamera's CameraManager isn't used
> outside of the gstlibcamera-utils.cpp compilation unit. Make it static.
>
> Signed-off-by: Vedant Paranjape <vedantparanjape160201 at gmail.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne at collabora.com>
> ---
> src/gstreamer/gstlibcamera-utils.cpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gstreamer/gstlibcamera-utils.cpp b/src/gstreamer/gstlibcamera-utils.cpp
> index 0af91c1acb67..c434bca65174 100644
> --- a/src/gstreamer/gstlibcamera-utils.cpp
> +++ b/src/gstreamer/gstlibcamera-utils.cpp
> @@ -223,7 +223,7 @@ gst_libcamera_resume_task(GstTask *task)
> }
>
> G_LOCK_DEFINE_STATIC(cm_singleton_lock);
> -std::weak_ptr<CameraManager> cm_singleton_ptr;
> +static std::weak_ptr<CameraManager> cm_singleton_ptr;
>
> std::shared_ptr<CameraManager>
> gst_libcamera_get_camera_mananger(int &ret)
More information about the libcamera-devel
mailing list