Skip to content

Commit dadef86

Browse files
ricardosalvetibkosuri
authored andcommitted
gstreamer1.0-plugins-bad: refresh patches based on v1.28.2
Refresh local changes on top of the v1.28.2 release, which is now available in oe-core. Also drop patches which were merged upstream. Co-developed-by: Bala Sai Kosuri <bkosuri@qti.qualcomm.com> Signed-off-by: Bala Sai Kosuri <bkosuri@qti.qualcomm.com> Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
1 parent 2b1340c commit dadef86

4 files changed

Lines changed: 31 additions & 78 deletions

recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-wayland-Add-support-for-NV12_Q08C-compressed-8-bit-f.patch

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ Subject: [PATCH] wayland: Add support for NV12_Q08C (compressed 8-bit)
1111
Upstream-Status: Denied [Adding NV12_Q08C format is denied by upstream, for compatibility, need to maintain this patch. https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9712 ]
1212

1313
Signed-off-by: Raja Ganapathi Busam <rbusam@qti.qualcomm.com>
14+
Signed-off-by: Bala Sai Kosuri <bkosuri@qti.qualcomm.com>
1415
---
1516
ext/wayland/gstwaylandsink.c | 34 +++++++++++++++++++++++++
16-
gst-libs/gst/wayland/gstwlvideoformat.c | 1 +
17-
gst-libs/gst/wayland/gstwlvideoformat.h | 6 +++--
18-
3 files changed, 39 insertions(+), 2 deletions(-)
17+
gst-libs/gst/wayland/gstwlvideoformat.c | 5 ++++
18+
gst-libs/gst/wayland/gstwlvideoformat.h | 4 +--
19+
3 files changed, 41 insertions(+), 2 deletions(-)
1920

2021
diff --git a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c
2122
index 19a3e8c..030fe1b 100644
@@ -65,11 +66,11 @@ index 19a3e8c..030fe1b 100644
6566

6667
@@ -706,6 +729,17 @@ gst_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
6768
if (!gst_video_info_dma_drm_from_video_info (&self->drm_info,
68-
&self->video_info, DRM_FORMAT_MOD_LINEAR))
69+
&self->render_info, DRM_FORMAT_MOD_LINEAR))
6970
gst_video_info_dma_drm_init (&self->drm_info);
7071
+
7172
+ if (GST_VIDEO_INFO_FORMAT (&self->video_info) == GST_VIDEO_FORMAT_NV12_Q08C) {
72-
+ self->drm_info.vinfo = self->video_info;
73+
+ self->drm_info.vinfo = self->render_info;
7374
+ self->drm_info.drm_fourcc = gst_video_dma_drm_fourcc_from_format (
7475
+ GST_VIDEO_FORMAT_NV12);
7576
+ self->drm_info.drm_modifier = DRM_FORMAT_MOD_QCOM_COMPRESSED;
@@ -80,36 +81,39 @@ index 19a3e8c..030fe1b 100644
8081
+ }
8182
}
8283

83-
self->video_info_changed = TRUE;
84+
self->have_mastering_info =
8485
diff --git a/gst-libs/gst/wayland/gstwlvideoformat.c b/gst-libs/gst/wayland/gstwlvideoformat.c
8586
index 1c0ea59..1800243 100644
8687
--- a/gst-libs/gst/wayland/gstwlvideoformat.c
8788
+++ b/gst-libs/gst/wayland/gstwlvideoformat.c
88-
@@ -94,6 +94,7 @@ static const wl_VideoFormat wl_formats[] = {
89-
{WL_SHM_FORMAT_YVU420, DRM_FORMAT_YVU420, GST_VIDEO_FORMAT_YV12},
90-
{WL_SHM_FORMAT_YUV422, DRM_FORMAT_YUV422, GST_VIDEO_FORMAT_Y42B},
91-
{WL_SHM_FORMAT_YUV444, DRM_FORMAT_YUV444, GST_VIDEO_FORMAT_v308},
92-
+ {WL_SHM_FORMAT_NV12, DRM_FORMAT_NV12, GST_VIDEO_FORMAT_NV12_Q08C},
93-
};
89+
@@ -53,6 +53,11 @@ static const wl_VideoFormat wl_formats[] = {
9490

95-
enum wl_shm_format
91+
drm_format = gst_video_dma_drm_format_from_gst_format (format, &modifier);
92+
93+
+ // Since modifier for NV12_Q08C is not linear, this is required to bypass shm format check.
94+
+ // caps negotiation passes only when a format is supported in shm interface.
95+
+ if (format == GST_VIDEO_FORMAT_NV12_Q08C)
96+
+ return drm_format;
97+
+
98+
if (drm_format == DRM_FORMAT_INVALID || modifier != DRM_FORMAT_MOD_LINEAR) {
99+
GST_WARNING ("wayland shm video format not found");
100+
return -1;
96101
diff --git a/gst-libs/gst/wayland/gstwlvideoformat.h b/gst-libs/gst/wayland/gstwlvideoformat.h
97102
index 5d7eb7c..a07e110 100644
98103
--- a/gst-libs/gst/wayland/gstwlvideoformat.h
99104
+++ b/gst-libs/gst/wayland/gstwlvideoformat.h
100-
@@ -39,11 +39,13 @@ G_BEGIN_DECLS
101-
#if G_BYTE_ORDER == G_BIG_ENDIAN
102-
#define GST_WL_VIDEO_FORMATS "{ AYUV, RGBA, ARGB, BGRA, ABGR, P010_10LE, " \
103-
"NV12_10LE40, v308, RGBx, xRGB, BGRx, xBGR, RGB, BGR, Y42B, NV16, NV61, " \
104-
- "YUY2, YVYU, UYVY, I420, YV12, NV12, NV21, Y41B, YUV9, YVU9, BGR16, RGB16 }"
105-
+ "YUY2, YVYU, UYVY, I420, YV12, NV12, NV21, Y41B, YUV9, YVU9, BGR16, RGB16, " \
106-
+ "NV12_Q08C }"
105+
@@ -40,12 +40,12 @@ G_BEGIN_DECLS
106+
#define GST_WL_VIDEO_FORMATS "{ BGR10A2_LE, RGB10A2_LE, AYUV, RGBA, ARGB, " \
107+
"BGRA, ABGR, BGR10x2_LE, RGB10x2_LE, P010_10LE, NV12_10LE40, Y444, v308, " \
108+
"RGBx, xRGB, BGRx, xBGR, RGB, BGR, Y42B, NV16, NV61, YUY2, YVYU, UYVY, " \
109+
- "I420, YV12, NV12, NV21, Y41B, YUV9, YVU9, BGR16, RGB16 }"
110+
+ "I420, YV12, NV12, NV21, Y41B, YUV9, YVU9, BGR16, RGB16, NV12_Q08C }"
107111
#elif G_BYTE_ORDER == G_LITTLE_ENDIAN
108-
#define GST_WL_VIDEO_FORMATS "{ AYUV, RGBA, ARGB, BGRA, ABGR, P010_10LE, " \
109-
"NV12_10LE40, v308, RGBx, xRGB, BGRx, xBGR, RGB, BGR, Y42B, NV16, NV61, " \
110-
- "YUY2, YVYU, UYVY, I420, YV12, NV12, NV21, Y41B, YUV9, YVU9, BGR16, RGB16 }"
111-
+ "YUY2, YVYU, UYVY, I420, YV12, NV12, NV21, Y41B, YUV9, YVU9, BGR16, RGB16, " \
112-
+ "NV12_Q08C }"
112+
#define GST_WL_VIDEO_FORMATS "{ BGR10A2_LE, RGB10A2_LE, AYUV, RGBA, ARGB, " \
113+
"BGRA, ABGR, BGR10x2_LE, RGB10x2_LE, P010_10LE, NV12_10LE40, Y444, v308, " \
114+
"RGBx, xRGB, BGRx, xBGR, RGB, BGR, Y42B, NV16, NV61, YUY2, YVYU, UYVY, " \
115+
- "I420, YV12, NV12, NV21, Y41B, YUV9, YVU9, BGR16, RGB16 }"
116+
+ "I420, YV12, NV12, NV21, Y41B, YUV9, YVU9, BGR16, RGB16, NV12_Q08C }"
113117
#endif
114118

115119
GST_WL_API

recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-waylandsink-Release-pending-buffers-during-PAUSED-to.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ index c580565..2542efb 100644
3636
+++ b/gst-libs/gst/wayland/gstwldisplay.c
3737
@@ -767,3 +767,19 @@ gst_wl_display_has_own_display (GstWlDisplay * self)
3838

39-
return priv->own_display;
39+
return output;
4040
}
4141
+
4242
+void
@@ -60,7 +60,7 @@ index b2f0ca3..a4b3803 100644
6060
+++ b/gst-libs/gst/wayland/gstwldisplay.h
6161
@@ -121,4 +121,7 @@ struct wp_single_pixel_buffer_manager_v1 * gst_wl_display_get_single_pixel_buffe
6262
GST_WL_API
63-
gboolean gst_wl_display_has_own_display (GstWlDisplay * self);
63+
GstWlOutput * gst_wl_display_get_output_by_name (GstWlDisplay * self, const gchar * output_name);
6464

6565
+GST_WL_API
6666
+void gst_wl_display_force_release_buffers (GstWlDisplay * self);

recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-waylandsink-make-sure-self-window-is-not-NULL-before.patch

Lines changed: 0 additions & 50 deletions
This file was deleted.

recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@ SRC_URI:append:qcom = " \
66
file://0001-wayland-Add-support-for-NV12_Q08C-compressed-8-bit-f.patch \
77
file://0002-waylandsink-Release-pending-buffers-during-PAUSED-to.patch \
88
file://0003-waylandsink-support-gap-buffers.patch \
9-
file://0004-waylandsink-make-sure-self-window-is-not-NULL-before.patch \
109
"

0 commit comments

Comments
 (0)