good:v4l2: Add new option for V4L2 JPEG decoder 37/322237/1
authorJeongmo Yang <jm80.yang@samsung.com>
Mon, 7 Apr 2025 02:40:27 +0000 (11:40 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Mon, 7 Apr 2025 02:40:27 +0000 (11:40 +0900)
- Default: Disabled

[Version] 1.24.11-10
[Issue Type] New option

Change-Id: I79d5e5382dbcd10dfeefa808b7a947e6d4f129ba
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
packaging/gstreamer.spec
subprojects/gst-plugins-good/meson_options.txt
subprojects/gst-plugins-good/sys/v4l2/gstv4l2videodec.c
subprojects/gst-plugins-good/sys/v4l2/meson.build

index 4b94e41065d97fc9088ddc426904248e33a7f514..a9d391533756460129287498d70a98453f84820b 100644 (file)
@@ -5,6 +5,7 @@
 %define _lib_gstreamer_dir %{_libdir}/gstreamer-%{gst_branch}
 %define _lib_girepository %{_libdir}/girepository-%{gst_branch}
 %define _enable_v4l2h264enc 0
+%define _enable_v4l2jpegdec 0
 %define _enable_introspection 0
 
 #######################################################################
@@ -60,7 +61,7 @@
 
 Name:           %{_name}
 Version:        1.24.11
-Release:        9
+Release:        10
 Summary:        Streaming-Media Framework Runtime
 License:        LGPL-2.0+
 Group:          Multimedia/Framework
@@ -615,6 +616,9 @@ meson --auto-features=disabled --prefix=/usr --libdir=%{_libdir} --datadir=%{_da
   %if "%{_enable_v4l2h264enc}" == "1"
     -D %{_good_opt}v4l2h264enc=enabled \
   %endif
+  %if "%{_enable_v4l2jpegdec}" == "1"
+    -D %{_good_opt}v4l2jpegdec=enabled \
+  %endif
   %if "%{tizen_profile_name}" == "tv"
     -D %{_good_opt}tv-profile=true \
     %ifnarch %{arm} aarch64
index fd78789ebb25318d6f42f968be60ce8041d6cd81..37a51b946943012180c2640f2895fa930127a550 100644 (file)
@@ -114,6 +114,7 @@ option('v4l2-probe', type : 'boolean', value : true, description : 'Probe v4l2 d
 option('v4l2-libv4l2', type : 'feature', value : 'auto', description : 'Use libv4l2 for some obscure format conversions')
 option('v4l2-gudev', type : 'feature', value : 'auto', description : 'Use libgudev for probing v4l2 devices')
 option('v4l2h264enc', type : 'feature', value : 'disabled', description : 'Build video4linux2 H.264 encoder plugin')
+option('v4l2jpegdec', type : 'feature', value : 'disabled', description : 'Build video4linux2 JPEG decoder plugin')
 
 # Common feature options
 option('examples', type : 'feature', value : 'auto', yield : true)
index d38c7c59a9541235ebb866c34d3d0db87491633b..41c265ffb6b4cc1e09dfe1e4080b87fc7a41b5df 100644 (file)
@@ -1487,7 +1487,12 @@ G_STMT_START { \
 } G_STMT_END
 
   if (gst_structure_has_name (s, "image/jpeg")) {
+#ifndef TIZEN_FEATURE_ENABLE_V4L2JPEGDEC
+    GST_WARNING ("V4L2 JPEG decoder disabled");
+    return NULL;
+#else
     SET_META ("JPEG");
+#endif
   } else if (gst_structure_has_name (s, "video/mpeg")) {
     gint mpegversion = 0;
     gst_structure_get_int (s, "mpegversion", &mpegversion);
index a7ea51cce6ac4421e533a52e339ba84d90768924..a5a3f52dc64a7af39016e0a91cb627599118603c 100644 (file)
@@ -41,6 +41,11 @@ if v4l2h264enc.enabled()
   cdata.set('TIZEN_FEATURE_ENABLE_V4L2H264ENC', true)
 endif
 
+v4l2jpegdec = get_option('v4l2jpegdec')
+if v4l2jpegdec.enabled()
+  cdata.set('TIZEN_FEATURE_ENABLE_V4L2JPEGDEC', true)
+endif
+
 v4l2 = get_option('v4l2')
 if v4l2.disabled()
   have_v4l2 = false