diff --git a/meta-webos-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-waylandsink-remove-unsupported-subcompositor.patch b/meta-webos-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-waylandsink-remove-unsupported-subcompositor.patch index d1db98e3d..8175317c6 100644 --- a/meta-webos-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-waylandsink-remove-unsupported-subcompositor.patch +++ b/meta-webos-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-waylandsink-remove-unsupported-subcompositor.patch @@ -1,7 +1,22 @@ -diff -ruN a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c ---- a/ext/wayland/gstwaylandsink.c 2020-07-28 08:04:27.822930750 +0000 -+++ b/ext/wayland/gstwaylandsink.c 2020-07-28 08:05:08.328708232 +0000 -@@ -215,6 +215,10 @@ +From d53cf9969771f164894c33ac23cbe87045f72988 Mon Sep 17 00:00:00 2001 +From: Pankaj Maharana +Date: Thu, 3 Oct 2019 17:05:37 +0530 +Subject: [PATCH] rpi: gstreamer1.0*=1.16.0 gstreamer1.0-plugins-{bad, + +--- + ext/wayland/gstwaylandsink.c | 129 +++++++++++++++++++++++++---- + ext/wayland/gstwaylandsink.h | 4 + + ext/wayland/wldisplay.c | 8 +- + ext/wayland/wldisplay.h | 1 - + ext/wayland/wlwindow.c | 154 ++++++----------------------------- + ext/wayland/wlwindow.h | 8 +- + 6 files changed, 148 insertions(+), 156 deletions(-) + +diff --git a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c +index 78dd294..0a82960 100644 +--- a/ext/wayland/gstwaylandsink.c ++++ b/ext/wayland/gstwaylandsink.c +@@ -215,6 +215,10 @@ gst_wayland_sink_init (GstWaylandSink * sink) { g_mutex_init (&sink->display_lock); g_mutex_init (&sink->render_lock); @@ -12,7 +27,7 @@ diff -ruN a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c } static void -@@ -308,6 +312,7 @@ +@@ -308,6 +312,7 @@ gst_wayland_sink_set_display_from_context (GstWaylandSink * sink, GError *error = NULL; display = gst_wayland_display_handle_context_get_handle (context); @@ -20,7 +35,7 @@ diff -ruN a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c sink->display = gst_wl_display_new_existing (display, FALSE, &error); if (error) { -@@ -334,6 +339,7 @@ +@@ -334,6 +339,7 @@ gst_wayland_sink_find_display (GstWaylandSink * sink) query = gst_query_new_context (GST_WAYLAND_DISPLAY_HANDLE_CONTEXT_TYPE); if (gst_pad_peer_query (GST_VIDEO_SINK_PAD (sink), query)) { gst_query_parse_context (query, &context); @@ -28,7 +43,7 @@ diff -ruN a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c gst_wayland_sink_set_display_from_context (sink, context); } gst_query_unref (query); -@@ -379,18 +385,35 @@ +@@ -379,18 +385,35 @@ gst_wayland_sink_change_state (GstElement * element, GstStateChange transition) switch (transition) { case GST_STATE_CHANGE_NULL_TO_READY: @@ -65,7 +80,7 @@ diff -ruN a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c case GST_STATE_CHANGE_PAUSED_TO_READY: gst_buffer_replace (&sink->last_buffer, NULL); if (sink->window) { -@@ -440,7 +463,8 @@ +@@ -440,7 +463,8 @@ gst_wayland_sink_set_context (GstElement * element, GstContext * context) g_mutex_lock (&sink->display_lock); if (G_LIKELY (!sink->display)) { gst_wayland_sink_set_display_from_context (sink, context); @@ -75,7 +90,7 @@ diff -ruN a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c GST_WARNING_OBJECT (element, "changing display handle is not supported"); g_mutex_unlock (&sink->display_lock); return; -@@ -517,7 +541,7 @@ +@@ -517,7 +541,7 @@ gst_wayland_sink_get_caps (GstBaseSink * bsink, GstCaps * filter) } static GstBufferPool * @@ -84,10 +99,11 @@ diff -ruN a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c { GstBufferPool *pool = NULL; GstStructure *structure; -@@ -541,11 +565,37 @@ +@@ -540,12 +564,38 @@ gst_wayland_create_pool (GstWaylandSink * sink, GstCaps * caps) + return pool; } - static gboolean ++static gboolean +gst_wayland_sink_post_video_info_message (GstWaylandSink * sink, + GstVideoInfo * vinfo) +{ @@ -112,7 +128,7 @@ diff -ruN a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c + return ret; +} + -+static gboolean + static gboolean gst_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps) { GstWaylandSink *sink; @@ -122,18 +138,17 @@ diff -ruN a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c sink = GST_WAYLAND_SINK (bsink); -@@ -559,10 +609,18 @@ +@@ -559,10 +609,18 @@ gst_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps) sink->video_info_changed = TRUE; /* create a new pool for the new caps */ - if (sink->pool) - gst_object_unref (sink->pool); - sink->pool = gst_wayland_create_pool (sink, caps); -- + newpool = gst_wayland_sink_create_pool (sink, caps); + if (!newpool) + goto no_pool; -+ + + /* we don't activate the internal pool yet as it may not be needed */ + oldpool = sink->pool; + sink->pool = newpool; @@ -145,7 +160,7 @@ diff -ruN a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c use_dmabuf = gst_caps_features_contains (gst_caps_get_features (caps, 0), GST_CAPS_FEATURE_MEMORY_DMABUF); -@@ -590,6 +648,12 @@ +@@ -590,6 +648,12 @@ unsupported_format: gst_video_format_to_string (format)); return FALSE; } @@ -158,7 +173,7 @@ diff -ruN a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c } static gboolean -@@ -604,9 +668,9 @@ +@@ -604,9 +668,9 @@ gst_wayland_sink_propose_allocation (GstBaseSink * bsink, GstQuery * query) gst_query_parse_allocation (query, &caps, &need_pool); if (need_pool) @@ -171,7 +186,7 @@ diff -ruN a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c if (pool) g_object_unref (pool); -@@ -687,6 +751,18 @@ +@@ -687,6 +751,18 @@ gst_wayland_sink_show_frame (GstVideoSink * vsink, GstBuffer * buffer) GST_LOG_OBJECT (sink, "render buffer %p", buffer); @@ -190,7 +205,7 @@ diff -ruN a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c if (G_UNLIKELY (!sink->window)) { /* ask for window handle. Unlock render_lock while doing that because * set_window_handle & friends will lock it in this context */ -@@ -694,13 +770,28 @@ +@@ -694,13 +770,28 @@ gst_wayland_sink_show_frame (GstVideoSink * vsink, GstBuffer * buffer) gst_video_overlay_prepare_window_handle (GST_VIDEO_OVERLAY (sink)); g_mutex_lock (&sink->render_lock); @@ -221,7 +236,7 @@ diff -ruN a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c } /* drop buffers until we get a frame callback */ -@@ -857,6 +948,12 @@ +@@ -857,6 +948,12 @@ no_window_size: ret = GST_FLOW_ERROR; goto done; } @@ -234,7 +249,7 @@ diff -ruN a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c no_buffer: { GST_WARNING_OBJECT (sink, "could not create buffer"); -@@ -929,6 +1026,8 @@ +@@ -929,6 +1026,8 @@ gst_wayland_sink_set_window_handle (GstVideoOverlay * overlay, guintptr handle) g_clear_object (&sink->window); @@ -243,7 +258,7 @@ diff -ruN a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c if (handle) { if (G_LIKELY (gst_wayland_sink_find_display (sink))) { /* we cannot use our own display with an external window handle */ -@@ -941,6 +1040,8 @@ +@@ -941,6 +1040,8 @@ gst_wayland_sink_set_window_handle (GstVideoOverlay * overlay, guintptr handle) } else { sink->window = gst_wl_window_new_in_surface (sink->display, surface, &sink->render_lock); @@ -252,7 +267,7 @@ diff -ruN a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c } } else { GST_ERROR_OBJECT (sink, "Failed to find display handle, " -@@ -1005,14 +1106,13 @@ +@@ -1005,14 +1106,13 @@ gst_wayland_sink_begin_geometry_change (GstWaylandVideo * video) g_return_if_fail (sink != NULL); g_mutex_lock (&sink->render_lock); @@ -268,7 +283,7 @@ diff -ruN a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c g_mutex_unlock (&sink->render_lock); } -@@ -1023,14 +1123,13 @@ +@@ -1023,14 +1123,13 @@ gst_wayland_sink_end_geometry_change (GstWaylandVideo * video) g_return_if_fail (sink != NULL); g_mutex_lock (&sink->render_lock); @@ -284,10 +299,11 @@ diff -ruN a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c g_mutex_unlock (&sink->render_lock); } -diff -ruN a/ext/wayland/gstwaylandsink.h b/ext/wayland/gstwaylandsink.h ---- a/ext/wayland/gstwaylandsink.h 2020-07-28 08:04:27.822930750 +0000 -+++ b/ext/wayland/gstwaylandsink.h 2020-07-28 08:05:08.328708232 +0000 -@@ -67,6 +67,10 @@ +diff --git a/ext/wayland/gstwaylandsink.h b/ext/wayland/gstwaylandsink.h +index be92fe7..3f4faae 100644 +--- a/ext/wayland/gstwaylandsink.h ++++ b/ext/wayland/gstwaylandsink.h +@@ -67,6 +67,10 @@ struct _GstWaylandSink gboolean redraw_pending; GMutex render_lock; GstBuffer *last_buffer; @@ -298,10 +314,11 @@ diff -ruN a/ext/wayland/gstwaylandsink.h b/ext/wayland/gstwaylandsink.h }; struct _GstWaylandSinkClass -diff -ruN a/ext/wayland/wldisplay.c b/ext/wayland/wldisplay.c ---- a/ext/wayland/wldisplay.c 2020-07-28 08:04:27.822930750 +0000 -+++ b/ext/wayland/wldisplay.c 2020-07-28 08:05:08.328708232 +0000 -@@ -99,9 +99,6 @@ +diff --git a/ext/wayland/wldisplay.c b/ext/wayland/wldisplay.c +index 9400095..f3155e9 100644 +--- a/ext/wayland/wldisplay.c ++++ b/ext/wayland/wldisplay.c +@@ -99,9 +99,6 @@ gst_wl_display_finalize (GObject * gobject) if (self->compositor) wl_compositor_destroy (self->compositor); @@ -311,7 +328,7 @@ diff -ruN a/ext/wayland/wldisplay.c b/ext/wayland/wldisplay.c if (self->registry) wl_registry_destroy (self->registry); -@@ -205,13 +202,11 @@ +@@ -205,13 +202,11 @@ registry_handle_global (void *data, struct wl_registry *registry, uint32_t id, const char *interface, uint32_t version) { GstWlDisplay *self = data; @@ -326,7 +343,7 @@ diff -ruN a/ext/wayland/wldisplay.c b/ext/wayland/wldisplay.c } else if (g_strcmp0 (interface, "wl_shell") == 0) { self->wl_shell = wl_registry_bind (registry, id, &wl_shell_interface, 1); } else if (g_strcmp0 (interface, "xdg_wm_base") == 0) { -@@ -332,7 +327,6 @@ +@@ -332,7 +327,6 @@ gst_wl_display_new_existing (struct wl_display * display, } VERIFY_INTERFACE_EXISTS (compositor, "wl_compositor"); @@ -334,10 +351,11 @@ diff -ruN a/ext/wayland/wldisplay.c b/ext/wayland/wldisplay.c VERIFY_INTERFACE_EXISTS (shm, "wl_shm"); #undef VERIFY_INTERFACE_EXISTS -diff -ruN a/ext/wayland/wldisplay.h b/ext/wayland/wldisplay.h ---- a/ext/wayland/wldisplay.h 2020-07-28 08:04:27.822930750 +0000 -+++ b/ext/wayland/wldisplay.h 2020-07-28 08:05:08.328708232 +0000 -@@ -53,7 +53,6 @@ +diff --git a/ext/wayland/wldisplay.h b/ext/wayland/wldisplay.h +index 4ecc0d6..aaa3235 100644 +--- a/ext/wayland/wldisplay.h ++++ b/ext/wayland/wldisplay.h +@@ -53,7 +53,6 @@ struct _GstWlDisplay /* globals */ struct wl_registry *registry; struct wl_compositor *compositor; @@ -345,10 +363,11 @@ diff -ruN a/ext/wayland/wldisplay.h b/ext/wayland/wldisplay.h struct wl_shell *wl_shell; struct xdg_wm_base *xdg_wm_base; struct zwp_fullscreen_shell_v1 *fullscreen_shell; -diff -ruN a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c ---- a/ext/wayland/wlwindow.c 2020-07-28 08:04:27.822930750 +0000 -+++ b/ext/wayland/wlwindow.c 2020-07-28 08:05:08.328708232 +0000 -@@ -148,7 +148,8 @@ +diff --git a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c +index c3dc61d..6902417 100644 +--- a/ext/wayland/wlwindow.c ++++ b/ext/wayland/wlwindow.c +@@ -148,7 +148,8 @@ static void gst_wl_window_init (GstWlWindow * self) { self->configured = TRUE; @@ -358,7 +377,7 @@ diff -ruN a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c g_mutex_init (&self->configure_mutex); } -@@ -169,17 +170,9 @@ +@@ -169,17 +170,9 @@ gst_wl_window_finalize (GObject * gobject) wp_viewport_destroy (self->video_viewport); wl_proxy_wrapper_destroy (self->video_surface_wrapper); @@ -378,7 +397,7 @@ diff -ruN a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c g_clear_object (&self->display); -@@ -187,44 +180,38 @@ +@@ -187,44 +180,38 @@ gst_wl_window_finalize (GObject * gobject) } static GstWlWindow * @@ -434,7 +453,7 @@ diff -ruN a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c return window; } -@@ -255,7 +242,7 @@ +@@ -255,7 +242,7 @@ gst_wl_window_new_toplevel (GstWlDisplay * display, const GstVideoInfo * info, GstWlWindow *window; gint width; @@ -443,7 +462,7 @@ diff -ruN a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c /* Check which protocol we will use (in order of preference) */ if (display->xdg_wm_base) { -@@ -263,7 +250,7 @@ +@@ -263,7 +250,7 @@ gst_wl_window_new_toplevel (GstWlDisplay * display, const GstVideoInfo * info, /* First create the XDG surface */ window->xdg_surface = xdg_wm_base_get_xdg_surface (display->xdg_wm_base, @@ -452,7 +471,7 @@ diff -ruN a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c if (!window->xdg_surface) { GST_ERROR ("Unable to get xdg_surface"); goto error; -@@ -300,7 +287,7 @@ +@@ -300,7 +287,7 @@ gst_wl_window_new_toplevel (GstWlDisplay * display, const GstVideoInfo * info, } else if (display->wl_shell) { /* go toplevel */ window->wl_shell_surface = wl_shell_get_shell_surface (display->wl_shell, @@ -461,7 +480,7 @@ diff -ruN a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c if (!window->wl_shell_surface) { GST_ERROR ("Unable to get wl_shell_surface"); goto error; -@@ -311,7 +298,7 @@ +@@ -311,7 +298,7 @@ gst_wl_window_new_toplevel (GstWlDisplay * display, const GstVideoInfo * info, gst_wl_window_ensure_fullscreen (window, fullscreen); } else if (display->fullscreen_shell) { zwp_fullscreen_shell_v1_present_surface (display->fullscreen_shell, @@ -470,7 +489,7 @@ diff -ruN a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c NULL); } else { GST_ERROR ("Unable to use either wl_shell, xdg_wm_base or " -@@ -336,14 +323,8 @@ +@@ -336,14 +323,8 @@ gst_wl_window_new_in_surface (GstWlDisplay * display, struct wl_surface * parent, GMutex * render_lock) { GstWlWindow *window; @@ -486,7 +505,7 @@ diff -ruN a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c wl_surface_commit (parent); return window; -@@ -396,8 +377,6 @@ +@@ -396,8 +377,6 @@ gst_wl_window_resize_video_surface (GstWlWindow * window, gboolean commit) gst_video_sink_center_rect (src, dst, &res, FALSE); } @@ -495,7 +514,7 @@ diff -ruN a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c if (commit) { wl_surface_damage (window->video_surface_wrapper, 0, 0, res.w, res.h); wl_surface_commit (window->video_surface_wrapper); -@@ -409,8 +388,8 @@ +@@ -409,8 +388,8 @@ gst_wl_window_resize_video_surface (GstWlWindow * window, gboolean commit) region = wl_compositor_create_region (window->display->compositor); wl_region_add (region, 0, 0, window->render_rectangle.w, window->render_rectangle.h); @@ -506,7 +525,7 @@ diff -ruN a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c } /* this is saved for use in wl_surface_damage */ -@@ -422,13 +401,6 @@ +@@ -422,13 +401,6 @@ gst_wl_window_set_opaque (GstWlWindow * window, const GstVideoInfo * info) { struct wl_region *region; @@ -520,7 +539,7 @@ diff -ruN a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c if (!GST_VIDEO_INFO_HAS_ALPHA (info)) { /* Set video opaque */ region = wl_compositor_create_region (window->display->compositor); -@@ -448,7 +420,6 @@ +@@ -448,7 +420,6 @@ gst_wl_window_render (GstWlWindow * window, GstWlBuffer * buffer, gst_util_uint64_scale_int_round (info->width, info->par_n, info->par_d); window->video_height = info->height; @@ -528,10 +547,14 @@ diff -ruN a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c gst_wl_window_resize_video_surface (window, FALSE); gst_wl_window_set_opaque (window, info); } -@@ -462,69 +433,9 @@ - window->video_rectangle.w, window->video_rectangle.h); - wl_surface_commit (window->video_surface_wrapper); - +@@ -462,73 +433,11 @@ gst_wl_window_render (GstWlWindow * window, GstWlBuffer * buffer, + /* clear both video and parent surfaces */ + wl_surface_attach (window->video_surface_wrapper, NULL, 0, 0); + wl_surface_commit (window->video_surface_wrapper); +- wl_surface_attach (window->area_surface_wrapper, NULL, 0, 0); +- wl_surface_commit (window->area_surface_wrapper); +- } +- - if (G_UNLIKELY (info)) { - /* commit also the parent (area_surface) in order to change - * the position of the video_subsurface */ @@ -539,8 +562,8 @@ diff -ruN a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c - window->render_rectangle.w, window->render_rectangle.h); - wl_surface_commit (window->area_surface_wrapper); - wl_subsurface_set_desync (window->video_subsurface); -- } -- + } + wl_display_flush (window->display->display); } @@ -598,7 +621,7 @@ diff -ruN a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c void gst_wl_window_set_render_rectangle (GstWlWindow * window, gint x, gint y, gint w, gint h) -@@ -536,24 +447,13 @@ +@@ -540,24 +449,13 @@ gst_wl_window_set_render_rectangle (GstWlWindow * window, gint x, gint y, window->render_rectangle.w = w; window->render_rectangle.h = h; @@ -627,10 +650,11 @@ diff -ruN a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c + wl_surface_damage (window->video_surface_wrapper, 0, 0, w, h); + wl_surface_commit (window->video_surface_wrapper); } -diff -ruN a/ext/wayland/wlwindow.h b/ext/wayland/wlwindow.h ---- a/ext/wayland/wlwindow.h 2020-07-28 08:04:27.822930750 +0000 -+++ b/ext/wayland/wlwindow.h 2020-07-28 08:05:08.328708232 +0000 -@@ -44,13 +44,8 @@ +diff --git a/ext/wayland/wlwindow.h b/ext/wayland/wlwindow.h +index c3f0172..33731fa 100644 +--- a/ext/wayland/wlwindow.h ++++ b/ext/wayland/wlwindow.h +@@ -44,13 +44,8 @@ struct _GstWlWindow GMutex *render_lock; GstWlDisplay *display; @@ -644,7 +668,7 @@ diff -ruN a/ext/wayland/wlwindow.h b/ext/wayland/wlwindow.h struct wp_viewport *video_viewport; struct wl_shell_surface *wl_shell_surface; struct xdg_surface *xdg_surface; -@@ -72,6 +67,9 @@ +@@ -72,6 +67,9 @@ struct _GstWlWindow * already been set on the area_subsurface */ gboolean no_border_update; diff --git a/meta-webos-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-waylandsink-zero-copy-using-wl-drm-protocol.patch b/meta-webos-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-waylandsink-zero-copy-using-wl-drm-protocol.patch index 4a1de956e..9e7a25dab 100644 --- a/meta-webos-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-waylandsink-zero-copy-using-wl-drm-protocol.patch +++ b/meta-webos-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-waylandsink-zero-copy-using-wl-drm-protocol.patch @@ -1,6 +1,72 @@ -diff -ruN c/ext/wayland/gstwaylandsink.c d/ext/wayland/gstwaylandsink.c ---- c/ext/wayland/gstwaylandsink.c 2020-07-28 09:13:49.538147330 +0000 -+++ d/ext/wayland/gstwaylandsink.c 2020-07-29 13:26:52.909368784 +0000 +From fb9ec0817bf828cc93b62bc89f7abf82bf92147b Mon Sep 17 00:00:00 2001 +From: Pankaj Maharana +Date: Thu, 3 Oct 2019 17:05:37 +0530 +Subject: [PATCH] rpi: gstreamer1.0*=1.16.0 gstreamer1.0-plugins-{bad, + +--- + ext/wayland/Makefile.am | 10 +- + ext/wayland/gstwaylandsink.c | 88 ++++++-- + ext/wayland/gstwaylandsink.h | 1 + + ext/wayland/meson.build | 2 + + ext/wayland/wldisplay.c | 101 ++++++++- + ext/wayland/wldisplay.h | 9 + + ext/wayland/wldrmallocator.c | 398 +++++++++++++++++++++++++++++++++++ + ext/wayland/wldrmallocator.h | 82 ++++++++ + ext/wayland/wlvideoformat.c | 85 +++++++- + ext/wayland/wlvideoformat.h | 6 + + 10 files changed, 762 insertions(+), 20 deletions(-) + create mode 100644 ext/wayland/wldrmallocator.c + create mode 100644 ext/wayland/wldrmallocator.h + +diff --git a/ext/wayland/Makefile.am b/ext/wayland/Makefile.am +index 95bb97e..21db342 100644 +--- a/ext/wayland/Makefile.am ++++ b/ext/wayland/Makefile.am +@@ -7,12 +7,15 @@ BUILT_SOURCES = \ + linux-dmabuf-unstable-v1-client-protocol.h \ + fullscreen-shell-unstable-v1-protocol.c \ + fullscreen-shell-unstable-v1-client-protocol.h \ +- xdg-shell-protocol.c \ ++ wayland-drm-protocol.c \ ++ wayland-drm-client-protocol.h \ ++ xdg-shell-protocol.c \ + xdg-shell-client-protocol.h + + libgstwaylandsink_la_SOURCES = \ + gstwaylandsink.c \ +- wlshmallocator.c \ ++ wldrmallocator.c \ ++ wlshmallocator.c \ + wlbuffer.c \ + wldisplay.c \ + wlwindow.c \ +@@ -23,12 +26,14 @@ nodist_libgstwaylandsink_la_SOURCES = \ + viewporter-protocol.c \ + linux-dmabuf-unstable-v1-protocol.c \ + fullscreen-shell-unstable-v1-protocol.c \ ++ wayland-drm-protocol.c \ + xdg-shell-protocol.c + + libgstwaylandsink_la_CFLAGS = \ + $(GST_PLUGINS_BAD_CFLAGS) \ + $(GST_PLUGINS_BASE_CFLAGS) \ + $(GST_CFLAGS) \ ++ $(DRM_CFLAGS) \ + $(WAYLAND_CFLAGS) + libgstwaylandsink_la_LIBADD = \ + $(top_builddir)/gst-libs/gst/wayland/libgstwayland-$(GST_API_VERSION).la \ +@@ -40,6 +45,7 @@ libgstwaylandsink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) + + noinst_HEADERS = \ + gstwaylandsink.h \ ++ wldrmallocator.h \ + wlshmallocator.h \ + wlbuffer.h \ + wldisplay.h \ +diff --git a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c +index 0a82960..cc7e9b3 100644 +--- a/ext/wayland/gstwaylandsink.c ++++ b/ext/wayland/gstwaylandsink.c @@ -44,6 +44,7 @@ #include "gstwaylandsink.h" #include "wlvideoformat.h" @@ -9,7 +75,7 @@ diff -ruN c/ext/wayland/gstwaylandsink.c d/ext/wayland/gstwaylandsink.c #include "wlshmallocator.h" #include "wllinuxdmabuf.h" -@@ -62,7 +63,8 @@ +@@ -62,7 +63,8 @@ enum { PROP_0, PROP_DISPLAY, @@ -19,7 +85,7 @@ diff -ruN c/ext/wayland/gstwaylandsink.c d/ext/wayland/gstwaylandsink.c }; GST_DEBUG_CATEGORY (gstwayland_debug); -@@ -73,12 +75,16 @@ +@@ -73,12 +75,16 @@ GST_DEBUG_CATEGORY (gstwayland_debug); "RGB16, BGR16, YUY2, YVYU, UYVY, AYUV, NV12, NV21, NV16, " \ "YUV9, YVU9, Y41B, I420, YV12, Y42B, v308 }" @@ -37,7 +103,7 @@ diff -ruN c/ext/wayland/gstwaylandsink.c d/ext/wayland/gstwaylandsink.c ); static void gst_wayland_sink_get_property (GObject * object, -@@ -208,6 +214,11 @@ +@@ -208,6 +214,11 @@ gst_wayland_sink_class_init (GstWaylandSinkClass * klass) g_param_spec_boolean ("fullscreen", "Fullscreen", "Whether the surface should be made fullscreen ", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); @@ -49,7 +115,7 @@ diff -ruN c/ext/wayland/gstwaylandsink.c d/ext/wayland/gstwaylandsink.c } static void -@@ -250,6 +261,11 @@ +@@ -250,6 +261,11 @@ gst_wayland_sink_get_property (GObject * object, g_value_set_boolean (value, sink->fullscreen); GST_OBJECT_UNLOCK (sink); break; @@ -61,7 +127,7 @@ diff -ruN c/ext/wayland/gstwaylandsink.c d/ext/wayland/gstwaylandsink.c default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; -@@ -273,6 +289,11 @@ +@@ -273,6 +289,11 @@ gst_wayland_sink_set_property (GObject * object, gst_wayland_sink_set_fullscreen (sink, g_value_get_boolean (value)); GST_OBJECT_UNLOCK (sink); break; @@ -73,7 +139,7 @@ diff -ruN c/ext/wayland/gstwaylandsink.c d/ext/wayland/gstwaylandsink.c default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; -@@ -490,7 +511,8 @@ +@@ -490,7 +511,8 @@ gst_wayland_sink_get_caps (GstBaseSink * bsink, GstCaps * filter) g_mutex_lock (&sink->display_lock); if (sink->display) { @@ -83,7 +149,7 @@ diff -ruN c/ext/wayland/gstwaylandsink.c d/ext/wayland/gstwaylandsink.c GValue value = G_VALUE_INIT; GArray *formats; gint i; -@@ -498,6 +520,7 @@ +@@ -498,6 +520,7 @@ gst_wayland_sink_get_caps (GstBaseSink * bsink, GstCaps * filter) g_value_init (&shm_list, GST_TYPE_LIST); g_value_init (&dmabuf_list, GST_TYPE_LIST); @@ -91,7 +157,7 @@ diff -ruN c/ext/wayland/gstwaylandsink.c d/ext/wayland/gstwaylandsink.c /* Add corresponding shm formats */ formats = sink->display->shm_formats; -@@ -523,6 +546,20 @@ +@@ -523,6 +546,20 @@ gst_wayland_sink_get_caps (GstBaseSink * bsink, GstCaps * filter) gst_structure_take_value (gst_caps_get_structure (caps, 1), "format", &dmabuf_list); @@ -112,7 +178,7 @@ diff -ruN c/ext/wayland/gstwaylandsink.c d/ext/wayland/gstwaylandsink.c GST_DEBUG_OBJECT (sink, "display caps: %" GST_PTR_FORMAT, caps); } -@@ -553,8 +590,11 @@ +@@ -553,8 +590,11 @@ gst_wayland_sink_create_pool (GstWaylandSink * sink, GstCaps * caps) structure = gst_buffer_pool_get_config (pool); gst_buffer_pool_config_set_params (structure, caps, size, 2, 0); @@ -126,7 +192,7 @@ diff -ruN c/ext/wayland/gstwaylandsink.c d/ext/wayland/gstwaylandsink.c if (!gst_buffer_pool_set_config (pool, structure)) { g_object_unref (pool); pool = NULL; -@@ -589,6 +629,16 @@ +@@ -589,6 +629,16 @@ gst_wayland_sink_post_video_info_message (GstWaylandSink * sink, return ret; } @@ -143,7 +209,7 @@ diff -ruN c/ext/wayland/gstwaylandsink.c d/ext/wayland/gstwaylandsink.c static gboolean gst_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps) { -@@ -599,7 +649,13 @@ +@@ -599,7 +649,13 @@ gst_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps) sink = GST_WAYLAND_SINK (bsink); @@ -158,7 +224,7 @@ diff -ruN c/ext/wayland/gstwaylandsink.c d/ext/wayland/gstwaylandsink.c /* extract info from caps */ if (!gst_video_info_from_caps (&sink->video_info, caps)) -@@ -674,8 +730,11 @@ +@@ -674,8 +730,11 @@ gst_wayland_sink_propose_allocation (GstBaseSink * bsink, GstQuery * query) if (pool) g_object_unref (pool); @@ -172,7 +238,7 @@ diff -ruN c/ext/wayland/gstwaylandsink.c d/ext/wayland/gstwaylandsink.c gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL); g_object_unref (alloc); -@@ -760,7 +819,7 @@ +@@ -760,7 +819,7 @@ gst_wayland_sink_show_frame (GstVideoSink * vsink, GstBuffer * buffer) } sink->old_time = cur_time; @@ -181,7 +247,7 @@ diff -ruN c/ext/wayland/gstwaylandsink.c d/ext/wayland/gstwaylandsink.c sink->frame_count++; if (G_UNLIKELY (!sink->window)) { -@@ -796,8 +855,8 @@ +@@ -796,8 +855,8 @@ gst_wayland_sink_show_frame (GstVideoSink * vsink, GstBuffer * buffer) /* drop buffers until we get a frame callback */ if (sink->redraw_pending) { @@ -192,7 +258,7 @@ diff -ruN c/ext/wayland/gstwaylandsink.c d/ext/wayland/gstwaylandsink.c } /* make sure that the application has called set_render_rectangle() */ -@@ -832,7 +891,12 @@ +@@ -832,7 +891,12 @@ gst_wayland_sink_show_frame (GstVideoSink * vsink, GstBuffer * buffer) "display, creating it", buffer); format = GST_VIDEO_INFO_FORMAT (&sink->video_info); @@ -206,10 +272,11 @@ diff -ruN c/ext/wayland/gstwaylandsink.c d/ext/wayland/gstwaylandsink.c guint i, nb_dmabuf = 0; for (i = 0; i < gst_buffer_n_memory (buffer); i++) -diff -ruN c/ext/wayland/gstwaylandsink.h d/ext/wayland/gstwaylandsink.h ---- c/ext/wayland/gstwaylandsink.h 2020-07-28 09:13:49.538147330 +0000 -+++ d/ext/wayland/gstwaylandsink.h 2020-07-29 13:26:52.909368784 +0000 -@@ -71,6 +71,7 @@ +diff --git a/ext/wayland/gstwaylandsink.h b/ext/wayland/gstwaylandsink.h +index 3f4faae..fbb6573 100644 +--- a/ext/wayland/gstwaylandsink.h ++++ b/ext/wayland/gstwaylandsink.h +@@ -71,6 +71,7 @@ struct _GstWaylandSink gint64 old_time; gint frame_cnt_in_sec; guint frame_count; @@ -217,53 +284,10 @@ diff -ruN c/ext/wayland/gstwaylandsink.h d/ext/wayland/gstwaylandsink.h }; struct _GstWaylandSinkClass -diff -ruN c/ext/wayland/Makefile.am d/ext/wayland/Makefile.am ---- c/ext/wayland/Makefile.am 2020-07-28 09:13:49.538147330 +0000 -+++ d/ext/wayland/Makefile.am 2020-07-29 13:26:52.909368784 +0000 -@@ -7,12 +7,15 @@ - linux-dmabuf-unstable-v1-client-protocol.h \ - fullscreen-shell-unstable-v1-protocol.c \ - fullscreen-shell-unstable-v1-client-protocol.h \ -- xdg-shell-protocol.c \ -+ wayland-drm-protocol.c \ -+ wayland-drm-client-protocol.h \ -+ xdg-shell-protocol.c \ - xdg-shell-client-protocol.h - - libgstwaylandsink_la_SOURCES = \ - gstwaylandsink.c \ -- wlshmallocator.c \ -+ wldrmallocator.c \ -+ wlshmallocator.c \ - wlbuffer.c \ - wldisplay.c \ - wlwindow.c \ -@@ -23,12 +26,14 @@ - viewporter-protocol.c \ - linux-dmabuf-unstable-v1-protocol.c \ - fullscreen-shell-unstable-v1-protocol.c \ -+ wayland-drm-protocol.c \ - xdg-shell-protocol.c - - libgstwaylandsink_la_CFLAGS = \ - $(GST_PLUGINS_BAD_CFLAGS) \ - $(GST_PLUGINS_BASE_CFLAGS) \ - $(GST_CFLAGS) \ -+ $(DRM_CFLAGS) \ - $(WAYLAND_CFLAGS) - libgstwaylandsink_la_LIBADD = \ - $(top_builddir)/gst-libs/gst/wayland/libgstwayland-$(GST_API_VERSION).la \ -@@ -40,6 +45,7 @@ - - noinst_HEADERS = \ - gstwaylandsink.h \ -+ wldrmallocator.h \ - wlshmallocator.h \ - wlbuffer.h \ - wldisplay.h \ -diff -ruN c/ext/wayland/meson.build d/ext/wayland/meson.build ---- c/ext/wayland/meson.build 2020-07-28 09:13:49.538147330 +0000 -+++ d/ext/wayland/meson.build 2020-07-29 13:26:52.909368784 +0000 +diff --git a/ext/wayland/meson.build b/ext/wayland/meson.build +index 3c377ee..58dfdff 100644 +--- a/ext/wayland/meson.build ++++ b/ext/wayland/meson.build @@ -1,5 +1,6 @@ wl_sources = [ 'gstwaylandsink.c', @@ -271,7 +295,7 @@ diff -ruN c/ext/wayland/meson.build d/ext/wayland/meson.build 'wlshmallocator.c', 'wlbuffer.c', 'wldisplay.c', -@@ -15,6 +16,7 @@ +@@ -15,6 +16,7 @@ if use_wayland protocol_defs = [ ['/stable/viewporter/viewporter.xml', 'viewporter-protocol.c', 'viewporter-client-protocol.h'], @@ -279,9 +303,10 @@ diff -ruN c/ext/wayland/meson.build d/ext/wayland/meson.build ['/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml', 'linux-dmabuf-unstable-v1-protocol.c', 'linux-dmabuf-unstable-v1-client-protocol.h'], ['/unstable/fullscreen-shell/fullscreen-shell-unstable-v1.xml', -diff -ruN c/ext/wayland/wldisplay.c d/ext/wayland/wldisplay.c ---- c/ext/wayland/wldisplay.c 2020-07-28 09:13:49.538147330 +0000 -+++ d/ext/wayland/wldisplay.c 2020-07-29 13:26:52.909368784 +0000 +diff --git a/ext/wayland/wldisplay.c b/ext/wayland/wldisplay.c +index f3155e9..7e889a4 100644 +--- a/ext/wayland/wldisplay.c ++++ b/ext/wayland/wldisplay.c @@ -26,6 +26,9 @@ #include "wlbuffer.h" #include "wlvideoformat.h" @@ -292,7 +317,7 @@ diff -ruN c/ext/wayland/wldisplay.c d/ext/wayland/wldisplay.c #include GST_DEBUG_CATEGORY_EXTERN (gstwayland_debug); -@@ -46,10 +49,12 @@ +@@ -46,10 +49,12 @@ static void gst_wl_display_init (GstWlDisplay * self) { self->shm_formats = g_array_new (FALSE, FALSE, sizeof (uint32_t)); @@ -307,7 +332,7 @@ diff -ruN c/ext/wayland/wldisplay.c d/ext/wayland/wldisplay.c } static void -@@ -73,10 +78,14 @@ +@@ -73,10 +78,14 @@ gst_wl_display_finalize (GObject * gobject) g_hash_table_remove_all (self->buffers); g_array_unref (self->shm_formats); @@ -323,7 +348,7 @@ diff -ruN c/ext/wayland/wldisplay.c d/ext/wayland/wldisplay.c if (self->viewporter) wp_viewporter_destroy (self->viewporter); -@@ -84,7 +93,10 @@ +@@ -84,7 +93,10 @@ gst_wl_display_finalize (GObject * gobject) if (self->shm) wl_shm_destroy (self->shm); @@ -335,7 +360,7 @@ diff -ruN c/ext/wayland/wldisplay.c d/ext/wayland/wldisplay.c zwp_linux_dmabuf_v1_destroy (self->dmabuf); if (self->wl_shell) -@@ -142,6 +154,61 @@ +@@ -142,6 +154,61 @@ static const struct zwp_linux_dmabuf_v1_listener dmabuf_listener = { dmabuf_format, }; @@ -397,10 +422,11 @@ diff -ruN c/ext/wayland/wldisplay.c d/ext/wayland/wldisplay.c gboolean gst_wl_display_check_format_for_shm (GstWlDisplay * display, GstVideoFormat format) -@@ -164,6 +231,27 @@ +@@ -163,6 +230,27 @@ gst_wl_display_check_format_for_shm (GstWlDisplay * display, + return FALSE; } - gboolean ++gboolean +gst_wl_display_check_format_for_drm (GstWlDisplay * display, + GstVideoFormat format) +{ @@ -421,11 +447,10 @@ diff -ruN c/ext/wayland/wldisplay.c d/ext/wayland/wldisplay.c + return FALSE; +} + -+gboolean + gboolean gst_wl_display_check_format_for_dmabuf (GstWlDisplay * display, GstVideoFormat format) - { -@@ -202,7 +290,6 @@ +@@ -202,7 +290,6 @@ registry_handle_global (void *data, struct wl_registry *registry, uint32_t id, const char *interface, uint32_t version) { GstWlDisplay *self = data; @@ -433,7 +458,7 @@ diff -ruN c/ext/wayland/wldisplay.c d/ext/wayland/wldisplay.c if (g_strcmp0 (interface, "wl_compositor") == 0) { self->compositor = wl_registry_bind (registry, id, &wl_compositor_interface, -@@ -226,6 +313,9 @@ +@@ -226,6 +313,9 @@ registry_handle_global (void *data, struct wl_registry *registry, self->dmabuf = wl_registry_bind (registry, id, &zwp_linux_dmabuf_v1_interface, 1); zwp_linux_dmabuf_v1_add_listener (self->dmabuf, &dmabuf_listener, self); @@ -443,7 +468,7 @@ diff -ruN c/ext/wayland/wldisplay.c d/ext/wayland/wldisplay.c } } -@@ -328,6 +418,7 @@ +@@ -328,6 +418,7 @@ gst_wl_display_new_existing (struct wl_display * display, VERIFY_INTERFACE_EXISTS (compositor, "wl_compositor"); VERIFY_INTERFACE_EXISTS (shm, "wl_shm"); @@ -451,9 +476,10 @@ diff -ruN c/ext/wayland/wldisplay.c d/ext/wayland/wldisplay.c #undef VERIFY_INTERFACE_EXISTS -diff -ruN c/ext/wayland/wldisplay.h d/ext/wayland/wldisplay.h ---- c/ext/wayland/wldisplay.h 2020-07-28 09:13:49.538147330 +0000 -+++ d/ext/wayland/wldisplay.h 2020-07-29 13:26:52.909368784 +0000 +diff --git a/ext/wayland/wldisplay.h b/ext/wayland/wldisplay.h +index aaa3235..fb586a4 100644 +--- a/ext/wayland/wldisplay.h ++++ b/ext/wayland/wldisplay.h @@ -28,6 +28,7 @@ #include "viewporter-client-protocol.h" #include "linux-dmabuf-unstable-v1-client-protocol.h" @@ -462,7 +488,7 @@ diff -ruN c/ext/wayland/wldisplay.h d/ext/wayland/wldisplay.h G_BEGIN_DECLS -@@ -57,9 +58,11 @@ +@@ -57,9 +58,11 @@ struct _GstWlDisplay struct xdg_wm_base *xdg_wm_base; struct zwp_fullscreen_shell_v1 *fullscreen_shell; struct wl_shm *shm; @@ -474,7 +500,7 @@ diff -ruN c/ext/wayland/wldisplay.h d/ext/wayland/wldisplay.h GArray *dmabuf_formats; /* private */ -@@ -70,6 +73,10 @@ +@@ -70,6 +73,10 @@ struct _GstWlDisplay GMutex buffers_mutex; GHashTable *buffers; gboolean shutting_down; @@ -485,7 +511,7 @@ diff -ruN c/ext/wayland/wldisplay.h d/ext/wayland/wldisplay.h }; struct _GstWlDisplayClass -@@ -89,6 +96,8 @@ +@@ -89,6 +96,8 @@ void gst_wl_display_unregister_buffer (GstWlDisplay * self, gpointer buf); gboolean gst_wl_display_check_format_for_shm (GstWlDisplay * display, GstVideoFormat format); @@ -494,9 +520,11 @@ diff -ruN c/ext/wayland/wldisplay.h d/ext/wayland/wldisplay.h gboolean gst_wl_display_check_format_for_dmabuf (GstWlDisplay * display, GstVideoFormat format); -diff -ruN c/ext/wayland/wldrmallocator.c d/ext/wayland/wldrmallocator.c ---- c/ext/wayland/wldrmallocator.c 1970-01-01 00:00:00.000000000 +0000 -+++ d/ext/wayland/wldrmallocator.c 2020-07-29 13:26:52.909368784 +0000 +diff --git a/ext/wayland/wldrmallocator.c b/ext/wayland/wldrmallocator.c +new file mode 100644 +index 0000000..c9a617a +--- /dev/null ++++ b/ext/wayland/wldrmallocator.c @@ -0,0 +1,398 @@ +/* + * GStreamer @@ -896,9 +924,11 @@ diff -ruN c/ext/wayland/wldrmallocator.c d/ext/wayland/wldrmallocator.c + prime_fd); + return NULL; +} -diff -ruN c/ext/wayland/wldrmallocator.h d/ext/wayland/wldrmallocator.h ---- c/ext/wayland/wldrmallocator.h 1970-01-01 00:00:00.000000000 +0000 -+++ d/ext/wayland/wldrmallocator.h 2020-07-29 13:26:52.909368784 +0000 +diff --git a/ext/wayland/wldrmallocator.h b/ext/wayland/wldrmallocator.h +new file mode 100644 +index 0000000..4eb203d +--- /dev/null ++++ b/ext/wayland/wldrmallocator.h @@ -0,0 +1,82 @@ +/* + * GStreamer @@ -982,23 +1012,24 @@ diff -ruN c/ext/wayland/wldrmallocator.h d/ext/wayland/wldrmallocator.h +G_END_DECLS + +#endif /* __WL_DRM_ALLOCATOR_H__ */ -diff -ruN c/ext/wayland/wlvideoformat.c d/ext/wayland/wlvideoformat.c ---- c/ext/wayland/wlvideoformat.c 2020-07-28 09:13:49.538147330 +0000 -+++ d/ext/wayland/wlvideoformat.c 2020-07-29 13:26:52.909368784 +0000 -@@ -38,6 +38,12 @@ +diff --git a/ext/wayland/wlvideoformat.c b/ext/wayland/wlvideoformat.c +index 77cfac8..f91f7d6 100644 +--- a/ext/wayland/wlvideoformat.c ++++ b/ext/wayland/wlvideoformat.c +@@ -36,6 +36,12 @@ typedef struct + GstVideoFormat gst_format; + } wl_ShmVideoFormat; - typedef struct - { ++typedef struct ++{ + enum wl_drm_format wl_format; + GstVideoFormat gst_format; +} wl_DrmVideoFormat; + -+typedef struct -+{ + typedef struct + { guint wl_format; - GstVideoFormat gst_format; - } wl_DmabufVideoFormat; -@@ -83,6 +89,41 @@ +@@ -83,6 +89,41 @@ static const wl_ShmVideoFormat shm_formats[] = { {WL_SHM_FORMAT_YUV444, GST_VIDEO_FORMAT_v308}, }; @@ -1040,7 +1071,7 @@ diff -ruN c/ext/wayland/wlvideoformat.c d/ext/wayland/wlvideoformat.c static const wl_DmabufVideoFormat dmabuf_formats[] = { #if G_BYTE_ORDER == G_BIG_ENDIAN {DRM_FORMAT_XRGB8888, GST_VIDEO_FORMAT_xRGB}, -@@ -112,6 +153,16 @@ +@@ -112,6 +153,16 @@ static const wl_DmabufVideoFormat dmabuf_formats[] = { {DRM_FORMAT_NV12, GST_VIDEO_FORMAT_NV12}, }; @@ -1057,7 +1088,7 @@ diff -ruN c/ext/wayland/wlvideoformat.c d/ext/wayland/wlvideoformat.c enum wl_shm_format gst_video_format_to_wl_shm_format (GstVideoFormat format) { -@@ -125,6 +176,19 @@ +@@ -125,6 +176,19 @@ gst_video_format_to_wl_shm_format (GstVideoFormat format) return -1; } @@ -1077,10 +1108,11 @@ diff -ruN c/ext/wayland/wlvideoformat.c d/ext/wayland/wlvideoformat.c gint gst_video_format_to_wl_dmabuf_format (GstVideoFormat format) { -@@ -151,6 +215,18 @@ +@@ -150,6 +214,18 @@ gst_wl_shm_format_to_video_format (enum wl_shm_format wl_format) + return GST_VIDEO_FORMAT_UNKNOWN; } - GstVideoFormat ++GstVideoFormat +gst_wl_drm_format_to_video_format (enum wl_drm_format wl_format) +{ + guint i; @@ -1092,11 +1124,10 @@ diff -ruN c/ext/wayland/wlvideoformat.c d/ext/wayland/wlvideoformat.c + return GST_VIDEO_FORMAT_UNKNOWN; +} + -+GstVideoFormat + GstVideoFormat gst_wl_dmabuf_format_to_video_format (guint wl_format) { - guint i; -@@ -165,11 +241,18 @@ +@@ -165,10 +241,17 @@ gst_wl_dmabuf_format_to_video_format (guint wl_format) const gchar * gst_wl_shm_format_to_string (enum wl_shm_format wl_format) { @@ -1105,20 +1136,20 @@ diff -ruN c/ext/wayland/wlvideoformat.c d/ext/wayland/wlvideoformat.c (gst_wl_shm_format_to_video_format (wl_format)); } - const gchar * ++const gchar * +gst_wl_drm_format_to_string (enum wl_drm_format drm_format) +{ + return gst_wl_gst_video_format_to_string + (gst_wl_drm_format_to_video_format (drm_format)); +} + -+const gchar * + const gchar * gst_wl_dmabuf_format_to_string (guint wl_format) { - return gst_video_format_to_string -diff -ruN c/ext/wayland/wlvideoformat.h d/ext/wayland/wlvideoformat.h ---- c/ext/wayland/wlvideoformat.h 2020-07-28 09:13:49.538147330 +0000 -+++ d/ext/wayland/wlvideoformat.h 2020-07-29 13:26:52.909368784 +0000 +diff --git a/ext/wayland/wlvideoformat.h b/ext/wayland/wlvideoformat.h +index 331f582..362f55d 100644 +--- a/ext/wayland/wlvideoformat.h ++++ b/ext/wayland/wlvideoformat.h @@ -28,13 +28,19 @@ #include #include diff --git a/meta-webos-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.%.bbappend b/meta-webos-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.%.bbappend index f966ab1a3..6478ca8ce 100644 --- a/meta-webos-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.%.bbappend +++ b/meta-webos-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.%.bbappend @@ -1,6 +1,6 @@ # Copyright (c) 2018-2020 LG Electronics, Inc. -EXTENDPRAUTO_append_rpi = "webosrpi3" +EXTENDPRAUTO_append_rpi = "webosrpi4" FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"