Hello,
Thanks for the reply.
In general, I need to use a GPU-based video sink to render video inside a GTK application. I am using a Wayland, so I cannot use ximagesink or xvimagesink, aside from the fact that these are CPU-intensive.
I started by using a sample app using waylandsink from the gst-plugins-bad repo (here). This works fine. This would play a video test (videotestsrc) displayed in a GTK app window, like so:

Next, I replace waylandsink (which is CPU-intensive) by a GPU-based video sink. The imxeglvivsink plugin, from the GStreamer-imx plugins (here), serves this purpose. However, when using imxeglvivsink, the video does not get overlayed on a GTK window. Instead, it will create its own surface while leaving the GTK window blank.
When looking at the code for the imxeglvivsink, I noticed that the window_handle that gets passed by my GTK application through the GStreamer 'prepare-window-handle' bus sync handler message, does not get used (see egl_platform_wayland.c#L510).
This is in contrast to when the imxeglvivsink is built for the x11 platform. In x11 platform, the window_handle is used as the parent x11 window (see egl_platform_x11.c#L141). As a result, the imxeglvivsink plugin works in x11 platform. This was tested on an imx6qsasbresd reference board.
Since I need to use Wayland, is it possible to make use of the window_handle passed to the imxeglvivsink in Wayland platform to render video inside a GTK application (similar to how waylandsink does)?
Thank you.