Is there sample code to set external wl_surface to waylandsink?

Halley Zhao aihua.halley.zhao at gmail.com
Wed May 22 06:27:58 UTC 2019


Hi Expert:
  I tried to create a wl_surface/wl_display, then set them to waylandsink,
but it fails to playback. if I don't set wl_surface/wl_display to
waylandsink, playback works well (it uses the wl_surface created by
waylandsink itself).
  so, I seek simple sample code to start with, is there any sample code to
set external wl_surface to waylandsink?

  I set wl_surface to waylandsink by gst_video_overlay_set_window_handle().
and wl_display is set to waylandsink by gst_element_set_context() as
following:
http://gstreamer-devel.966125.n4.nabble.com/Application-did-not-provide-a-wayland-display-handle-td4683750.html
#define GST_WAYLAND_DISPLAY_HANDLE_CONTEXT_TYPE
"GstWaylandDisplayHandleContextType"
GstContext *
gst_wayland_display_handle_context_new (struct wl_display * display)
{
  GstContext *context =
      gst_context_new (GST_WAYLAND_DISPLAY_HANDLE_CONTEXT_TYPE, TRUE);
  gst_structure_set (gst_context_writable_structure (context),
      "handle", G_TYPE_POINTER, display, NULL);
  return context;
}

thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190522/c5dbe215/attachment.html>


More information about the gstreamer-devel mailing list