gstreamer: Make format_map[] const
diff mbox series

Message ID 20250725041617.9715-1-uajain@igalia.com
State New
Headers show
Series
  • gstreamer: Make format_map[] const
Related show

Commit Message

Umang Jain July 25, 2025, 4:16 a.m. UTC
format_map[] is the mapping between GstVideoFormat and libcamera's
PixelFormat. Make it const as it is not meant to be changed.

Signed-off-by: Umang Jain <uajain@igalia.com>
---
 src/gstreamer/gstlibcamera-utils.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Barnabás Pőcze July 25, 2025, 7:18 a.m. UTC | #1
Hi

2025. 07. 25. 6:16 keltezéssel, Umang Jain írta:
> format_map[] is the mapping between GstVideoFormat and libcamera's
> PixelFormat. Make it const as it is not meant to be changed.
> 
> Signed-off-by: Umang Jain <uajain@igalia.com>

Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.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 a548b0c1..66fc8642 100644
> --- a/src/gstreamer/gstlibcamera-utils.cpp
> +++ b/src/gstreamer/gstlibcamera-utils.cpp
> @@ -13,7 +13,7 @@
>   
>   using namespace libcamera;
>   
> -static struct {
> +static const struct {
>   	GstVideoFormat gst_format;
>   	PixelFormat format;
>   } format_map[] = {
Laurent Pinchart July 25, 2025, 11:47 a.m. UTC | #2
On Fri, Jul 25, 2025 at 09:18:58AM +0200, Barnabás Pőcze wrote:
> 2025. 07. 25. 6:16 keltezéssel, Umang Jain írta:
> > format_map[] is the mapping between GstVideoFormat and libcamera's
> > PixelFormat. Make it const as it is not meant to be changed.
> > 
> > Signed-off-by: Umang Jain <uajain@igalia.com>
> 
> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.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 a548b0c1..66fc8642 100644
> > --- a/src/gstreamer/gstlibcamera-utils.cpp
> > +++ b/src/gstreamer/gstlibcamera-utils.cpp
> > @@ -13,7 +13,7 @@
> >   
> >   using namespace libcamera;
> >   
> > -static struct {
> > +static const struct {
> >   	GstVideoFormat gst_format;
> >   	PixelFormat format;
> >   } format_map[] = {

Patch
diff mbox series

diff --git a/src/gstreamer/gstlibcamera-utils.cpp b/src/gstreamer/gstlibcamera-utils.cpp
index a548b0c1..66fc8642 100644
--- a/src/gstreamer/gstlibcamera-utils.cpp
+++ b/src/gstreamer/gstlibcamera-utils.cpp
@@ -13,7 +13,7 @@ 
 
 using namespace libcamera;
 
-static struct {
+static const struct {
 	GstVideoFormat gst_format;
 	PixelFormat format;
 } format_map[] = {