d3d11videosink does not render to texture with keyed mutex / shared NT handle
Describe your issue
d3d11videosink fails to render to shared texture using keyed mutex / NT handle, in the sample app and other apps that use the feature.
Expected Behavior
The d3d11videosink should render to shared texture with keyed mutex.
Observed Behavior
d3d11videosink-shared-texture.exe without any parameters works.
PS D:\work\dev\public\gstreamer\build\subprojects\gst-plugins-bad\tests\examples\d3d11> .\d3d11videosink-shared-texture.exe --use-keyed-mutex Use DXGI_FORMAT_B8G8R8A8_UNORM format Use keyed-mutex: 1, use_nt_handle: 0 0:00:00.294526100 15636 0000028C8A1EC310 ERROR d3d11allocator gstd3d11memory.cpp:542:gst_d3d11_memory_map_full: Couldn't acquire sync, hr: 0x887a0001 0:00:00.296597700 15636 0000028C8A1EC310 ERROR d3d11converter gstd3d11converter.cpp:3070:gst_d3d11_converter_convert_buffer_internal: Couldn't map output buffer 0:00:00.297189300 15636 0000028C8A1EC310 ERROR d3d11window gstd3d11window.cpp:1012:gst_d3d11_window_present: Couldn't render buffer Failed to draw on shared handle
PS D:\work\dev\public\gstreamer\build\subprojects\gst-plugins-bad\tests\examples\d3d11> .\d3d11videosink-shared-texture.exe --use-nt-handle Use DXGI_FORMAT_B8G8R8A8_UNORM format Use keyed-mutex: 0, use_nt_handle: 1 0:00:00.298647700 42680 00000210D8935030 ERROR d3d11allocator gstd3d11memory.cpp:542:gst_d3d11_memory_map_full: Couldn't acquire sync, hr: 0x887a0001 0:00:00.299230100 42680 00000210D8935030 ERROR d3d11converter gstd3d11converter.cpp:3070:gst_d3d11_converter_convert_buffer_internal: Couldn't map output buffer 0:00:00.299724100 42680 00000210D8935030 ERROR d3d11window gstd3d11window.cpp:1012:gst_d3d11_window_present: Couldn't render buffer Failed to draw on shared handle
PS D:\work\dev\public\gstreamer\build\subprojects\gst-plugins-bad\tests\examples\d3d11> .\d3d11videosink-shared-texture.exe --use-nt-handle --use-keyed-mutex Use DXGI_FORMAT_B8G8R8A8_UNORM format Use keyed-mutex: 1, use_nt_handle: 1 0:00:00.297580700 10324 0000019179913820 ERROR d3d11allocator gstd3d11memory.cpp:542:gst_d3d11_memory_map_full: Couldn't acquire sync, hr: 0x887a0001 0:00:00.299614500 10324 0000019179913820 ERROR d3d11converter gstd3d11converter.cpp:3070:gst_d3d11_converter_convert_buffer_internal: Couldn't map output buffer 0:00:00.300337000 10324 0000019179913820 ERROR d3d11window gstd3d11window.cpp:1012:gst_d3d11_window_present: Couldn't render buffer Failed to draw on shared handle
Other apps using the feature fail the same way.
Setup
- **Operating System: ** Windows 11
- Device: Computer
- GStreamer Version: 1.24.0 to latest from main
- Command line: d3d11videosink-shared-texture.exe --use-nt-handle --use-keyed-mutex
Steps to reproduce the bug
- open terminal
- run gstreamer\build\subprojects\gst-plugins-bad\tests\examples\d3d11> .\d3d11videosink-shared-texture.exe --use-nt-handle --use-keyed-mutex
How reproducible is the bug?
Always reproduces.