From 7443cc00b59bf9faee679d85001322e8ab30d1f4 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Thu, 14 Dec 2023 21:07:10 +0900 Subject: [PATCH] d3d12: Requires ID3D12Device4 interface ID3D12Device4::CreateCommandList1() method is required Part-of: --- subprojects/gst-plugins-bad/sys/d3d12/plugin.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/subprojects/gst-plugins-bad/sys/d3d12/plugin.cpp b/subprojects/gst-plugins-bad/sys/d3d12/plugin.cpp index 6b1de63e74..78d99a79c6 100644 --- a/subprojects/gst-plugins-bad/sys/d3d12/plugin.cpp +++ b/subprojects/gst-plugins-bad/sys/d3d12/plugin.cpp @@ -72,6 +72,7 @@ plugin_init (GstPlugin * plugin) for (guint i = 0; i < 12; i++) { GstD3D12Device *device = nullptr; ID3D12Device *device_handle; + ComPtr < ID3D12Device4 > device4; ComPtr < ID3D12VideoDevice > video_device; GstD3D11Device *d3d11_device; HRESULT hr; @@ -83,6 +84,12 @@ plugin_init (GstPlugin * plugin) break; device_handle = gst_d3d12_device_get_device_handle (device); + hr = device_handle->QueryInterface (IID_PPV_ARGS (&device4)); + if (FAILED (hr)) { + gst_object_unref (device); + continue; + } + hr = device_handle->QueryInterface (IID_PPV_ARGS (&video_device)); if (FAILED (hr)) { gst_object_unref (device);