Freescale / gstreamer-imx

GStreamer 1.0 plugins for i.MX platforms
Other
184 stars 127 forks source link

imxeglgvivsink: egl_platform_wayland #256

Closed AstroJimX closed 3 years ago

AstroJimX commented 4 years ago

Any guidelines on how to extend gst_imx_egl_viv_sink_egl_platform_init_window to use the window_handle (wl_surface) to display video on an application's window (GTK)? Currently, gst_imx_egl_viv_sink_egl_platform_init_window() gets passed window_handle but does not use it. As a result, video stream (GStream) using imxeglvivsink would create its own surface.

AstroJimX commented 4 years ago

In simpler terms, when building gstreamer-imx plugins under Wayland, the gst_imx_egl_viv_sink_egl_platform_init_window() function gets the window_handle, but it does not use it. See https://github.com/Freescale/gstreamer-imx/blob/master/src/eglvivsink/egl_platform_wayland.c. My thinking is that something similar to the waylandsink plugin from https://github.com/GStreamer/gst-plugins-bad/tree/master/ext/wayland is needed to pass the wl_display (display_handle) along with the wl_surface (window_handle). However, I am not sure how to integrate on top of the EGL window that is created by imxeglvivsink.

dv1 commented 3 years ago

imxeglvivsink was written when glimagesink was not able to directly transfer frames to the GPU via DMA. Since then, glimagesink became able to handle DMA-BUF backed frames & frames whose memory is a GstPhysMemory instance, so that sink became obsolete. It is no longer present in gstreamer-imx. glimagesink, waylandsink, kmssink (with force-modesetting=true) are the alternatives (the latter on imx8 only).