From: Jeongmo Yang Date: Wed, 13 Apr 2022 08:32:33 +0000 (+0900) Subject: good:v4l2h264enc: Add new feature for v4l2h264enc and disable it X-Git-Tag: submit/tizen/20220415.001132^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F53%2F273753%2F3;p=platform%2Fupstream%2Fgstreamer.git good:v4l2h264enc: Add new feature for v4l2h264enc and disable it [Version] 1.20.0-16 [Issue Type] New feature Change-Id: Ie45e133815607e8f8d24d950b5d853aed8e7a892 Signed-off-by: Jeongmo Yang --- diff --git a/packaging/gstreamer.spec b/packaging/gstreamer.spec index 381d9aa6d7..6c0120d0c5 100644 --- a/packaging/gstreamer.spec +++ b/packaging/gstreamer.spec @@ -3,6 +3,7 @@ %define gst_branch 1.0 %define _lib_gstreamer_dir %{_libdir}/gstreamer-%{gst_branch} %define _lib_girepository %{_libdir}/girepository-%{gst_branch} +%define _enable_v4l2h264enc 0 ####################################################################### ## how to build each plugin : @@ -59,7 +60,7 @@ Name: %{_name} Version: 1.20.0 -Release: 15 +Release: 16 Summary: Streaming-Media Framework Runtime License: LGPL-2.0+ Group: Multimedia/Framework @@ -619,6 +620,9 @@ meson --auto-features=disabled --prefix=/usr --libdir=%{_libdir} --datadir=%{_da -D %{_good_opt}soup=enabled \ -D %{_good_opt}vpx=enabled \ -D %{_good_opt}tbm=true \ + %if "%{_enable_v4l2h264enc}" == "1" + -D %{_good_opt}v4l2h264enc=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 3c9e6db055..f2792cc99d 100644 --- a/subprojects/gst-plugins-good/meson_options.txt +++ b/subprojects/gst-plugins-good/meson_options.txt @@ -90,6 +90,7 @@ option('v4l2', type : 'feature', value : 'auto', description : 'Build video4linu option('v4l2-probe', type : 'boolean', value : true, description : 'Probe v4l2 devices when the v4l2 plugin is loaded') 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') # Common feature options option('examples', type : 'feature', value : 'auto', yield : true) diff --git a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2.c b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2.c index 888c26384a..2a9b8ae08c 100644 --- a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2.c +++ b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2.c @@ -209,9 +209,11 @@ gst_v4l2_probe_and_register (GstPlugin * plugin) gst_v4l2_fwht_enc_register (plugin, basename, it->device_path, sink_caps, src_caps); +#ifdef TIZEN_FEATURE_ENABLE_V4L2H264ENC if (gst_v4l2_is_h264_enc (sink_caps, src_caps)) gst_v4l2_h264_enc_register (plugin, basename, it->device_path, video_fd, sink_caps, src_caps); +#endif if (gst_v4l2_is_h265_enc (sink_caps, src_caps)) gst_v4l2_h265_enc_register (plugin, basename, it->device_path, diff --git a/subprojects/gst-plugins-good/sys/v4l2/meson.build b/subprojects/gst-plugins-good/sys/v4l2/meson.build index 6bbec541b1..ea8fad91ad 100644 --- a/subprojects/gst-plugins-good/sys/v4l2/meson.build +++ b/subprojects/gst-plugins-good/sys/v4l2/meson.build @@ -17,7 +17,6 @@ v4l2_sources = [ 'gstv4l2fwhtenc.c', 'gstv4l2h263enc.c', 'gstv4l2h264codec.c', - 'gstv4l2h264enc.c', 'gstv4l2h265codec.c', 'gstv4l2h265enc.c', 'gstv4l2jpegenc.c', @@ -36,6 +35,12 @@ v4l2_sources = [ 'tunernorm.c' ] +v4l2h264enc = get_option('v4l2h264enc') +if v4l2h264enc.enabled() + v4l2_sources += [ 'gstv4l2h264enc.c' ] + cdata.set('TIZEN_FEATURE_ENABLE_V4L2H264ENC', true) +endif + v4l2 = get_option('v4l2') if v4l2.disabled() have_v4l2 = false