From: Jeongmo Yang Date: Mon, 7 Apr 2025 02:40:27 +0000 (+0900) Subject: good:v4l2: Add new option for V4L2 JPEG decoder X-Git-Tag: accepted/tizen/unified/20250530.090449~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=81aaa8063ca6023c3fb594b5e345941f0c8e40ea;p=platform%2Fupstream%2Fgstreamer.git good:v4l2: Add new option for V4L2 JPEG decoder - Default: Disabled [Version] 1.24.11-10 [Issue Type] New option Change-Id: I79d5e5382dbcd10dfeefa808b7a947e6d4f129ba Signed-off-by: Jeongmo Yang --- diff --git a/packaging/gstreamer.spec b/packaging/gstreamer.spec index 4b94e41065..a9d3915337 100644 --- a/packaging/gstreamer.spec +++ b/packaging/gstreamer.spec @@ -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 diff --git a/subprojects/gst-plugins-good/meson_options.txt b/subprojects/gst-plugins-good/meson_options.txt index fd78789ebb..37a51b9469 100644 --- a/subprojects/gst-plugins-good/meson_options.txt +++ b/subprojects/gst-plugins-good/meson_options.txt @@ -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) diff --git a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2videodec.c b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2videodec.c index d38c7c59a9..41c265ffb6 100644 --- a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2videodec.c +++ b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2videodec.c @@ -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); diff --git a/subprojects/gst-plugins-good/sys/v4l2/meson.build b/subprojects/gst-plugins-good/sys/v4l2/meson.build index a7ea51cce6..a5a3f52dc6 100644 --- a/subprojects/gst-plugins-good/sys/v4l2/meson.build +++ b/subprojects/gst-plugins-good/sys/v4l2/meson.build @@ -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