glimagesink/GstVideoOverlay issue on macOS
Having a weird issue on macOS with the video overlay functionality and glimagesink.
On Linux using either xvimagesink or glimagesink or on Windows with d3dvideosink the same code works fine every time, video is output overlayed on the window ID as set using gst_video_overlay_set_window_handle. (It's a Qt widget, just for reference)
On macOS, using glimagesink, sometimes a new window is created regardless of what's set via the set window handle function. I normally just call it while the pipeline state is still NULL before setting it to playing, though I checked to see if a message matching gst_is_video_overlay_prepare_window_handle was showing up in my sync message handler that I needed to respond to, but it isn't.
I did notice that in the instances when it shows a new window, gstreamer logs "Output window was closed" from the glimagesink element, though the winid is still valid, the window is open and visible, and the overlay will work on subsequent plays via the same pipeline (no pipeline or element unref/creation or linkage changes between plays) outputting to the same window ID. Not sure why gstreamer thinks that the winID has gone away sometimes when it hasn't, but that seems to be what's triggering it. Seems to happen around every 5th play on average, sometimes more, sometimes less.