diff options
-rw-r--r-- | app/CMakeLists.txt | 4 | ||||
-rw-r--r-- | app/main.cpp | 11 |
2 files changed, 9 insertions, 6 deletions
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 621d2c7..4ac3455 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -32,8 +32,8 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(PkgConfig REQUIRED) find_program(WAYLAND_SCANNER_EXECUTABLE NAMES wayland-scanner) -pkg_check_modules(AGL_COMPOSITOR_PROTOCOLS REQUIRED agl-compositor-0.0.22-protocols) -pkg_get_variable(AGL_COMPOSITOR_PROTOCOLS_PKGDATADIR agl-compositor-0.0.22-protocols pkgdatadir) +pkg_check_modules(AGL_COMPOSITOR_PROTOCOLS REQUIRED agl-compositor-0.0.24-protocols) +pkg_get_variable(AGL_COMPOSITOR_PROTOCOLS_PKGDATADIR agl-compositor-0.0.24-protocols pkgdatadir) set(AGL_COMPOSITOR_PROTOCOLS_PATH ${AGL_COMPOSITOR_PROTOCOLS_PKGDATADIR}) add_custom_command( 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 <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 + #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<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 = 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; |