From a9a2820a6c92817893a6309572dd28799441f1da Mon Sep 17 00:00:00 2001 From: Hyunil Date: Wed, 21 Jul 2021 15:37:25 +0900 Subject: [PATCH] GstVideoOverlay: Add gst_video_overlay_set_wl_window_exported_shell_handle - new interface for a shell handle exported by wayland window for synchronization between UI and video [Version] 1.16.2-16 [Issue Type] New feature Change-Id: I04d6244062892712c34278343eb9926c25483c07 Signed-off-by: Hyunil --- gst-libs/gst/video/videooverlay.c | 31 +++++++++++++++++++++++++++++-- gst-libs/gst/video/videooverlay.h | 6 +++++- packaging/gst-plugins-base.spec | 2 +- 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/gst-libs/gst/video/videooverlay.c b/gst-libs/gst/video/videooverlay.c index 00dac44..31211ae 100644 --- a/gst-libs/gst/video/videooverlay.c +++ b/gst-libs/gst/video/videooverlay.c @@ -333,10 +333,10 @@ gst_video_overlay_get_type (void) * @overlay: a #GstVideoOverlay to set the window on. * @wl_surface_id: a global resource id of wl_surface referencing the wayland window. -* This will call the video overlay's set_wayland_window_handle method. You +* This will call the video overlay's set_wl_window_wl_surface_id method. You * should use this medtod to tell to an overlay to display video output to a * specific window(e.g. an Wayland Window on Wayland). -* But you can also set handle to waylandsink with gst_video_overlay_set_window_handle(). +* But you can also set handle to wayland videosink with gst_video_overlay_set_wl_window_wl_surface_id(). */ void gst_video_overlay_set_wl_window_wl_surface_id (GstVideoOverlay * overlay, @@ -354,6 +354,33 @@ gst_video_overlay_set_wl_window_wl_surface_id (GstVideoOverlay * overlay, } } +/** +* gst_video_overlay_set_wl_window_exported_shell_handle: +* @overlay: a #GstVideoOverlay to set the window on. +* @exported_shell_handle: a shell handle exported by wayland window for synchronization between UI and video + +* This will call the video overlay's set_wl_window_exported_shell_handle method. You +* should use this medtod to tell to an overlay to display video output to a +* specific window(e.g. an Wayland Window on Wayland). +* But you can also set handle to wayland videosink with gst_video_overlay_set_wl_window_exported_shell_handle(). +*/ +void +gst_video_overlay_set_wl_window_exported_shell_handle (GstVideoOverlay * overlay, + const char *exported_shell_handle) +{ + GstVideoOverlayInterface *iface; + + g_return_if_fail (overlay != NULL); + g_return_if_fail (GST_IS_VIDEO_OVERLAY (overlay)); + + iface = GST_VIDEO_OVERLAY_GET_INTERFACE (overlay); + + if (iface->set_wl_window_exported_shell_handle) { + iface->set_wl_window_exported_shell_handle (overlay, exported_shell_handle); + } +} + + /** * gst_video_overlay_set_display_roi_area: diff --git a/gst-libs/gst/video/videooverlay.h b/gst-libs/gst/video/videooverlay.h index 1e6e829..b8afb2d 100644 --- a/gst-libs/gst/video/videooverlay.h +++ b/gst-libs/gst/video/videooverlay.h @@ -69,7 +69,7 @@ struct _GstVideoOverlayInterface { void (*set_window_handle) (GstVideoOverlay *overlay, guintptr handle); #ifdef TIZEN_FEATURE_WAYLAND_ENHANCEMENT void (*set_wl_window_wl_surface_id) (GstVideoOverlay * overlay, gint wl_surface_id); - + void (*set_wl_window_exported_shell_handle) (GstVideoOverlay * overlay, const char *exported_shell_handle); void (*set_display_roi_area) (GstVideoOverlay *overlay, gint x, gint y, gint width, gint height); @@ -130,6 +130,10 @@ void gst_video_overlay_set_wl_window_wl_surface_id (GstVideoOverlay * overlay, gint wl_surface_id); GST_VIDEO_API +void gst_video_overlay_set_wl_window_exported_shell_handle (GstVideoOverlay * overlay, + const char *exported_shell_handle); + +GST_VIDEO_API gboolean gst_video_overlay_set_display_roi_area (GstVideoOverlay * overlay, gint x, gint y, gint width, gint height); diff --git a/packaging/gst-plugins-base.spec b/packaging/gst-plugins-base.spec index 70c21a3..30d55e2 100644 --- a/packaging/gst-plugins-base.spec +++ b/packaging/gst-plugins-base.spec @@ -5,7 +5,7 @@ Name: gst-plugins-base Version: 1.16.2 -Release: 15 +Release: 16 License: LGPL-2.0+ Summary: GStreamer Streaming-Media Framework Plug-Ins Url: http://gstreamer.freedesktop.org/ -- 2.7.4