aboutsummaryrefslogtreecommitdiffstats
path: root/app/main.cpp
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2023-11-08 16:54:05 +0200
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2023-11-08 17:54:04 +0200
commit19ed4e26ab884460a93765e2412cda76ac795794 (patch)
tree8e8807eae0d2916fde552fb672ee002112c2dd32 /app/main.cpp
parent4f2e6690a893ed41be6eb3c74d6cab82a5e12f39 (diff)
Port to gst-wayland changes in gst 1.22, maintaining backwards compatibility
This will be relevant when AGL switches to a more recent yocto. Bug-AGL: SPEC-4881 Change-Id: I8a1ae6dcf3099914c961a5b4c0fe702a5ab7cd12 Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
Diffstat (limited to 'app/main.cpp')
-rw-r--r--app/main.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/app/main.cpp b/app/main.cpp
index 2d286ba..83f7c28 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -23,6 +23,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
+
// these only applies if the window is a dialog/pop-up one
// by default the compositor make the window maximized
#define WINDOW_WIDTH_SIZE 640
@@ -92,7 +97,6 @@ struct receiver_data {
struct window *window;
GstElement *pipeline;
- GstWaylandVideo *wl_video;
GstVideoOverlay *overlay;
};
@@ -462,12 +466,11 @@ bus_sync_handler(GstBus *bus, GstMessage *message, gpointer user_data)
struct receiver_data *d =
static_cast<struct 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 = 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;