mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 03:00:35 +00:00
d3d11utils: Add a helper method for checking Xbox device
Required for some cases to work around device specific issue Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1339>
This commit is contained in:
parent
b5c8889d4f
commit
d12c0c4c7b
2 changed files with 23 additions and 0 deletions
|
@ -342,6 +342,27 @@ gst_d3d11_is_windows_8_or_greater (void)
|
|||
return ret;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gst_d3d11_is_xbox_device (GstD3D11Device * device)
|
||||
{
|
||||
guint device_id = 0;
|
||||
guint vendor_id = 0;
|
||||
gchar *desc = NULL;
|
||||
gboolean ret = FALSE;
|
||||
|
||||
g_return_val_if_fail (GST_IS_D3D11_DEVICE (device), FALSE);
|
||||
|
||||
g_object_get (device, "device-id", &device_id, "vendor-id", &vendor_id,
|
||||
"description", &desc, NULL);
|
||||
|
||||
if (device_id == 0 && vendor_id == 0 && desc && g_strrstr (desc, "SraKmd"))
|
||||
ret = TRUE;
|
||||
|
||||
g_free (desc);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static gchar *
|
||||
gst_d3d11_hres_to_string (HRESULT hr)
|
||||
{
|
||||
|
|
|
@ -42,6 +42,8 @@ gboolean gst_d3d11_ensure_element_data (GstElement * element,
|
|||
|
||||
gboolean gst_d3d11_is_windows_8_or_greater (void);
|
||||
|
||||
gboolean gst_d3d11_is_xbox_device (GstD3D11Device * device);
|
||||
|
||||
gboolean _gst_d3d11_result (HRESULT hr,
|
||||
GstD3D11Device * device,
|
||||
GstDebugCategory * cat,
|
||||
|
|
Loading…
Reference in a new issue