diff options
author | Scott Murray <scott.murray@konsulko.com> | 2024-05-01 17:21:54 -0400 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2024-05-02 22:11:32 +0000 |
commit | b3ea52f3c9b4ff11447151f086f3c314cada148a (patch) | |
tree | 1aa4e183e03484fb2b3c4d0f58566467db8d467f | |
parent | 2dd9c2940b815f507d11ec4a249b7699859825ad (diff) |
Add gstreamer 1.22 compatibilityHEADsalmon_18.90.0salmon/18.90.018.90.0master
Apply similar changes as were done in camera-gstreamer commit
19ed4e26 to allow building with gstreamer 1.22.
Bug-AGL: SPEC-5121
Change-Id: I7d9c608c9d03032ca0d29031c9fe0ced211ccbbc
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
-rw-r--r-- | app/main.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/main.cpp b/app/main.cpp index f46baa0..a29a1a1 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -41,6 +41,11 @@ #include <gst/video/videooverlay.h> #include <gst/wayland/wayland.h> +#if !GST_CHECK_VERSION(1, 22, 0) +#define gst_is_wl_display_handle_need_context_message gst_is_wayland_display_handle_need_context_message +#define gst_wl_display_handle_context_new gst_wayland_display_handle_context_new +#endif + #include "surface.hpp" #define WINDOW_WIDTH_SIZE 640 @@ -59,7 +64,6 @@ struct cluster_receiver_data { QPlatformNativeInterface *native; GstElement *pipeline; - GstWaylandVideo *wl_video; GstVideoOverlay *overlay; bool widget_has_buffer_mapped; @@ -100,7 +104,7 @@ bus_sync_handler(GstBus *bus, GstMessage *message, gpointer user_data) { struct cluster_receiver_data *d = static_cast<struct cluster_receiver_data *>(user_data); - if (gst_is_wayland_display_handle_need_context_message(message)) { + if (gst_is_wl_display_handle_need_context_message(message)) { GstContext *context; struct wl_display *display_handle; @@ -109,9 +113,7 @@ bus_sync_handler(GstBus *bus, GstMessage *message, gpointer user_data) d->native->nativeResourceForIntegration("display") ); - context = gst_wayland_display_handle_context_new(display_handle); - - d->wl_video = GST_WAYLAND_VIDEO(GST_MESSAGE_SRC(message)); + context = gst_wl_display_handle_context_new(display_handle); gst_element_set_context(GST_ELEMENT(GST_MESSAGE_SRC(message)), context); goto drop; |