From 7dd7d94968d1ac2edae62c4b1797407ea8640e3c Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Wed, 1 May 2024 17:19:45 -0400 Subject: Add gstreamer 1.22 compatibility Apply similar changes as were done in camera-gstreamer commit 19ed4e26 to allow building with gstreamer 1.22. Bug-AGL: SPEC-5121 Change-Id: Icbf013abffcb4fc95aa14654c0cb53bf55ca7f50 Signed-off-by: Scott Murray --- app/main.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'app/main.cpp') diff --git a/app/main.cpp b/app/main.cpp index 270ac1d..2d081c9 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -49,6 +49,11 @@ #include #include +#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 + #define WINDOW_WIDTH 640 #define WINDOW_HEIGHT 720 @@ -113,7 +118,6 @@ struct cluster_receiver_data { struct window *window; GstElement *pipeline; - GstWaylandVideo *wl_video; GstVideoOverlay *overlay; }; @@ -557,12 +561,11 @@ bus_sync_handler(GstBus *bus, GstMessage *message, gpointer user_data) struct cluster_receiver_data *d = static_cast(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 = d->window->display->wl_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; -- cgit 1.2.3-korg