good:v4l2: Add new feature to disable colorimetry 96/272296/3
authorJeongmo Yang <jm80.yang@samsung.com>
Mon, 14 Mar 2022 07:25:42 +0000 (16:25 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Tue, 15 Mar 2022 02:48:21 +0000 (11:48 +0900)
- 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 <jm80.yang@samsung.com>
packaging/gstreamer.spec
subprojects/gst-plugins-good/meson.build
subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c

index 878fac29a8773995adc135ff591ddc6f6245f058..11c366a9a1cc496622ca0826bcfbd64fea26032b 100644 (file)
@@ -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
index 6818f934955fde9369e53a1364dfda46adc88bb5..8f748f3d46bf5507f1ebe439eadf7752381ad412 100644 (file)
@@ -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')
 
index 7b381070b5b9b8af1f96ee128422f8479ececf7a..6f536d8a9c537bf0932d19de44b130f1d58c41e1 100644 (file)
@@ -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. */