Add setting a global resource id of wl_surface referencing the wayland window
authorHyunil <hyunil46.park@samsung.com>
Thu, 4 Feb 2016 01:07:24 +0000 (10:07 +0900)
committerHyunil <hyunil46.park@samsung.com>
Thu, 4 Feb 2016 06:11:10 +0000 (15:11 +0900)
Change-Id: I0350d844cc3cd0440aebfb38fff4cbfb32b46c0e
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 cd232ba..9167684 100644 (file)
@@ -343,6 +343,33 @@ gst_video_overlay_get_type (void)
   return gst_video_overlay_type;
 }
 
+#ifdef GST_EXT_WAYLAND_ENHANCEMENT
+/**
+* gst_video_overlay_set_wl_window_wl_surface_id:
+* @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
+* 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().
+*/
+void
+gst_video_overlay_set_wl_window_wl_surface_id (GstVideoOverlay * overlay,
+    guintptr wl_surface_id)
+{
+  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_wl_surface_id) {
+    iface->set_wl_window_wl_surface_id (overlay, wl_surface_id);
+  }
+}
+#endif
 /**
  * gst_video_overlay_set_window_handle:
  * @overlay: a #GstVideoOverlay to set the window on.
index 36c2dd2..ddc6c3f 100644 (file)
@@ -66,6 +66,8 @@ struct _GstVideoOverlayInterface {
                                 gint width, gint height);
 
   void (*set_window_handle)    (GstVideoOverlay *overlay, guintptr handle);
+  void (*set_wl_window_wl_surface_id)   (GstVideoOverlay * overlay, guintptr wl_surface_id);
+
 };
 
 GType   gst_video_overlay_get_type (void);
@@ -93,6 +95,8 @@ void            gst_video_overlay_got_window_handle     (GstVideoOverlay * overl
 void            gst_video_overlay_prepare_window_handle (GstVideoOverlay * overlay);
 
 gboolean        gst_is_video_overlay_prepare_window_handle_message (GstMessage * msg);
+void gst_video_overlay_set_wl_window_wl_surface_id (GstVideoOverlay * overlay,
+    guintptr wl_surface_id);
 
 G_END_DECLS
 
index f252e59..3c65c80 100644 (file)
@@ -73,7 +73,7 @@ NOCONFIGURE=1 ./autogen.sh
 export CFLAGS="%{optflags} -fno-strict-aliasing\
 %ifarch %{arm}
  -DGST_EXT_AUDIODECODER_MODIFICATION\
- -DGST_EXT_XV_ENHANCEMENT\
+ -DGST_EXT_WAYLAND_ENHANCEMENT\
  -DGST_EXT_LINK_FIMCCONVERT\
  -DGST_EXT_MIME_TYPES\
  -DGST_TIZEN_MODIFICATION\