GstVideoOverlay: Add gst_video_overlay_set_wl_window_exported_shell_handle 58/261558/4 accepted/tizen/unified/20210722.034903 submit/tizen/20210721.092635
authorHyunil <hyunil46.park@samsung.com>
Wed, 21 Jul 2021 06:37:25 +0000 (15:37 +0900)
committerHyunil <hyunil46.park@samsung.com>
Wed, 21 Jul 2021 07:03:19 +0000 (16:03 +0900)
- 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 <hyunil46.park@samsung.com>
gst-libs/gst/video/videooverlay.c
gst-libs/gst/video/videooverlay.h
packaging/gst-plugins-base.spec

index 00dac44..31211ae 100644 (file)
@@ -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:
index 1e6e829..b8afb2d 100644 (file)
@@ -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);
index 70c21a3..30d55e2 100644 (file)
@@ -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/