Skip to content

glwindow/winrt: Add window resize event handler

glwindow/winrt: Add warning message if window is being closed from a UI thread

All UI elements will follow Single-Threaded Apartments (STA) model.
As a result, we should access them from dedicated UI thread.
Due to the nature of the threading model, ANGLE will wait the UI
thread while closing internal window/swapchain objects.

A problem here is that when destroying GstGLWindow from the UI thread,
it will wait GstGLContext's internal thread. Meanwhile, the GstGLContext's
internal thread will be blocked because ANGLE wants to access the UI thread.
That will cause a deadlock or exceptions.

In short, application should not try to call
gst_element_set_state(pipeline, GST_STATE_NULL) from a UI thread.
That's a limitation of current implementation.
glwindow/winrt: Add window resize event handler

GstGLWindow implmentaion should be able to report native window size
and also it need to handle resize event for glimagesink.

Note that GstD3D11Window implementation was referenced for this change.
glwindow/winrt: Move to c++

For native window size query, c++ API is much convenient than c API

Currently GstGLWindowWinRTEGL will not render on UWP native window due to this missing window size handling.

cc @nirbheek @ystreet

Edited by Seungha Yang

Merge request reports

Loading