From 4d4e865010e88d64df65c4c61c78e233401ba24d Mon Sep 17 00:00:00 2001 From: Jeongmo Yang Date: Mon, 14 Mar 2022 16:25:42 +0900 Subject: [PATCH] good:v4l2: Add new feature to disable colorimetry - V4L2 driver on RPI4 does not support some colorimetry, it causes video playing failure with some contents. [Version] 1.20.0-8 [Issue Type] New feature Change-Id: I87026e658b44784cbcc427551275aa03f03012c1 Signed-off-by: Jeongmo Yang --- packaging/gstreamer.spec | 4 ++-- subprojects/gst-plugins-good/meson.build | 1 + subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packaging/gstreamer.spec b/packaging/gstreamer.spec index 878fac29a8..11c366a9a1 100644 --- a/packaging/gstreamer.spec +++ b/packaging/gstreamer.spec @@ -59,7 +59,7 @@ Name: %{_name} Version: 1.20.0 -Release: 7 +Release: 8 Summary: Streaming-Media Framework Runtime License: LGPL-2.0+ Group: Multimedia/Framework @@ -1266,4 +1266,4 @@ rm -rf $RPM_BUILD_ROOT %endif # plugin -%endif # profile \ No newline at end of file +%endif # profile diff --git a/subprojects/gst-plugins-good/meson.build b/subprojects/gst-plugins-good/meson.build index 6818f93495..8f748f3d46 100644 --- a/subprojects/gst-plugins-good/meson.build +++ b/subprojects/gst-plugins-good/meson.build @@ -449,6 +449,7 @@ cdata.set('TIZEN_FEATURE_RTP_MODIFICATION', true) cdata.set('TIZEN_FEATURE_PULSE_MODIFICATION', true) cdata.set('TIZEN_FEATURE_V4L2_SKIP_ADD_COLORSPACE', true) cdata.set('TIZEN_FEATURE_GST_MUX_ENHANCEMENT', true) +cdata.set('TIZEN_FEATURE_V4L2_DISABLE_COLORIMETRY', true) gio_dep = dependency('gio-2.0') diff --git a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c index 7b381070b5..6f536d8a9c 100644 --- a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c +++ b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c @@ -3891,18 +3891,22 @@ gst_v4l2_object_set_format_full (GstV4l2Object * v4l2object, GstCaps * caps, gst_structure_remove_field (s, "interlace-mode"); } +#ifndef TIZEN_FEATURE_V4L2_DISABLE_COLORIMETRY if (gst_v4l2_object_get_colorspace (v4l2object, &format, &info.colorimetry)) { if (gst_structure_has_field (s, "colorimetry")) { if (!gst_v4l2_video_colorimetry_matches (&info.colorimetry, caps)) goto invalid_colorimetry; } } else { +#endif /* The driver (or libv4l2) is miss-behaving, just ignore colorimetry from * the TRY_FMT */ disable_colorimetry = TRUE; if (gst_structure_has_field (s, "colorimetry")) gst_structure_remove_field (s, "colorimetry"); +#ifndef TIZEN_FEATURE_V4L2_DISABLE_COLORIMETRY } +#endif /* In case we have skipped the try_fmt probes, we'll need to set the * interlace-mode and colorimetry back into the caps. */ -- 2.34.1