d3d12screencapturesrc: Fix OS handle leaks/random crash in WGC mode
Multiple DispatcherQueues per thread seems to be causing OS handle leak and random crashes were observed. Instead of creating thread/DispatcherQueue per GstD3D12GraphicsCapture object, reuse only single thread and DispatcherQueue Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4351 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9153>
This commit is contained in:
parent
c15a898742
commit
e3d0a8d83e
File diff suppressed because it is too large
Load Diff
@ -30,6 +30,8 @@ G_DECLARE_FINAL_TYPE (GstD3D12GraphicsCapture, gst_d3d12_graphics_capture,
|
||||
|
||||
gboolean gst_d3d12_graphics_capture_load_library (void);
|
||||
|
||||
void gst_d3d12_graphics_capture_deinit (void);
|
||||
|
||||
GstD3D12ScreenCapture * gst_d3d12_graphics_capture_new (GstD3D12Device * device,
|
||||
HWND window_handle,
|
||||
HMONITOR monitor_handle);
|
||||
|
@ -67,6 +67,10 @@
|
||||
#include "gstd3d12upload.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WGC
|
||||
#include "gstd3d12graphicscapture.h"
|
||||
#endif
|
||||
|
||||
/* *INDENT-OFF* */
|
||||
using namespace Microsoft::WRL;
|
||||
/* *INDENT-ON* */
|
||||
@ -74,6 +78,9 @@ using namespace Microsoft::WRL;
|
||||
static void
|
||||
plugin_deinit (gpointer data)
|
||||
{
|
||||
#ifdef HAVE_WGC
|
||||
gst_d3d12_graphics_capture_deinit ();
|
||||
#endif
|
||||
gst_d3d12_ipc_client_deinit ();
|
||||
gst_d3d12_flush_all_devices ();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user