Commit graph

5 commits

Author SHA1 Message Date
Seungha Yang
c2b9be5c94 glwindow/winrt: Increase timeout value to 15 seconds
5 seconds might not be enough value for timeout in case an application
is running on a device with very limited computing power.
Note that ANGLE uses 10 seconds timeout value. So even if a timeout
happens here, it's also ANGLE's timeout condition as well
(meaning that bad things will happen either way)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/769>
2020-07-30 21:05:54 +09:00
Seungha Yang
579db691ed 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.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/745>
2020-07-10 11:46:56 +00:00
Seungha Yang
bdf73569f8 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.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/745>
2020-07-10 11:46:56 +00:00
Seungha Yang
ab89746f55 glwindow/winrt: Move to c++
For native window size query, c++ API is much convenient than c API

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/745>
2020-07-10 11:46:56 +00:00
Nirbheek Chauhan
564ab3031b gstgl: Add a new window type for WinRT
This is needed for using GstGL with ANGLE as the GLES implementation
in Universal Windows Platform apps that use the Windows Runtime
(WinRT) instead of Win32, which is deprecated and not allowed in
Windows Store apps.

This has been tested with Servo on the Microsoft HoloLens 2, and seems
to work quite well.
2019-08-28 02:25:11 +05:30