Skip to content

Commit

Permalink
webos-raspberrypi: gstreamer1.0-plugins-good: update patch to apply o…
Browse files Browse the repository at this point in the history
…n 1.22.5 version

:Release Notes:
Upgraded in:
https://git.openembedded.org/openembedded-core/commit/?id=a894c9499863f127380c38f0b17d51b356391821
backported to mickledore in:
https://git.openembedded.org/openembedded-core/commit/?h=mickledore&id=2b41b6054936ee8d5237a981f8cbdcbea54d244c

:Detailed Notes:
Fixes:
http://gecko.lge.com:8000/Errors/Details/673989

patching file sys/v4l2/gstv4l2videodec.c
Hunk #1 FAILED at 753.
1 out of 1 hunk FAILED -- rejects in file sys/v4l2/gstv4l2videodec.c
Patch 0002-Fix-v4l2h264dec-output-caps-to-RGB16.patch does not apply (enforce with -f)

The function was refactored in:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4996/diffs?commit_id=62ada196db06a135788cf896d92b347f940e6020
and now this section had different indentation.

:Testing Performed:
Only build tested.

:QA Notes:
No change to image.

:Issues Addressed:
[WRQ-691] Create GPVB with Yocto 4.3 Nanbield
[WRQ-693] Create GPVB with Yocto 4.2 Mickledore

Change-Id: I351f0af4110493015ae65f6ffee3b7f69aa7bc71
  • Loading branch information
shr-project committed Jun 10, 2024
1 parent 8f20702 commit ff6eb28
Showing 1 changed file with 29 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 52d66651e0b45a266cfb4a56c8d88e5466b0c14d Mon Sep 17 00:00:00 2001
From 5793ad4d803aa7556b4a401008d0b8e0201ed9b3 Mon Sep 17 00:00:00 2001
From: "sapna.kumari" <sapna.kumari@lge.com>
Date: Thu, 27 Aug 2020 06:39:27 +0000
Subject: [PATCH] Fix v4l2h264dec output caps to RGB16
Expand All @@ -11,38 +11,38 @@ Upstream-Status: Pending
1 file changed, 25 insertions(+)

diff --git a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2videodec.c b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2videodec.c
index 562b304777..b3d4b693c1 100644
index 3019a09a13..896c75c471 100644
--- a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2videodec.c
+++ b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2videodec.c
@@ -753,6 +753,31 @@ gst_v4l2_video_dec_handle_frame (GstVideoDecoder * decoder,
@@ -474,6 +474,31 @@ gst_v4l2_video_dec_negotiate (GstVideoDecoder * decoder)
caps = gst_caps_fixate (caps);

GST_DEBUG_OBJECT (self, "Chosen decoded caps: %" GST_PTR_FORMAT, caps);

+ /*Fix : Seeting caps to RGB16 if chosen caps are I420*/
+ GstStructure *s = gst_caps_get_structure(caps, 0);
+
+ const gchar *format = gst_structure_get_string (s, "format");
+ if (g_strcmp0 (format, "I420") == 0) {
+ gint width;
+ gst_structure_get_int(s, "width",&width);
+ gint height;
+ gst_structure_get_int(s,"height", &height);
GST_DEBUG_OBJECT (self, "Chosen decoded caps: %" GST_PTR_FORMAT, caps);
+
+ /*Fix : Seeting caps to RGB16 if chosen caps are I420*/
+ GstStructure *s = gst_caps_get_structure(caps, 0);
+
+ GstCaps *new_caps = gst_caps_new_simple ("video/x-raw",
+ "format", G_TYPE_STRING, "RGB16",
+ "framerate", GST_TYPE_FRACTION, 0, 1,
+ "pixel-aspect-ratio", GST_TYPE_FRACTION, 1, 1,
+ "width", G_TYPE_INT, width,
+ "height", G_TYPE_INT, height,
+ "interlace-mode", G_TYPE_STRING, "progressive",
+ "colorimetry", G_TYPE_STRING, "1:1:5:4",
+ NULL);
+ const gchar *format = gst_structure_get_string (s, "format");
+ if (g_strcmp0 (format, "I420") == 0) {
+ gint width;
+ gst_structure_get_int(s, "width",&width);
+ gint height;
+ gst_structure_get_int(s,"height", &height);
+
+ caps = gst_caps_fixate(new_caps);
+ GstCaps *new_caps = gst_caps_new_simple ("video/x-raw",
+ "format", G_TYPE_STRING, "RGB16",
+ "framerate", GST_TYPE_FRACTION, 0, 1,
+ "pixel-aspect-ratio", GST_TYPE_FRACTION, 1, 1,
+ "width", G_TYPE_INT, width,
+ "height", G_TYPE_INT, height,
+ "interlace-mode", G_TYPE_STRING, "progressive",
+ "colorimetry", G_TYPE_STRING, "1:1:5:4",
+ NULL);
+
+ GST_DEBUG_OBJECT (self, "Chosen decoded caps: %" GST_PTR_FORMAT, caps);
+ }
+ caps = gst_caps_fixate(new_caps);
+
/* Try to set negotiated format, on success replace acquired format */
if (gst_v4l2_object_set_format (self->v4l2capture, caps, &error))
gst_video_info_from_caps (&info, caps);
+ GST_DEBUG_OBJECT (self, "Chosen decoded caps: %" GST_PTR_FORMAT, caps);
+ }

/* Try to set negotiated format, on success replace acquired format */
if (gst_v4l2_object_set_format (self->v4l2capture, caps, &error))

0 comments on commit ff6eb28

Please sign in to comment.