diff --git a/gst-libs/gst/d3d11/gstd3d11device.c b/gst-libs/gst/d3d11/gstd3d11device.c index b6d0982bc7..b866287340 100644 --- a/gst-libs/gst/d3d11/gstd3d11device.c +++ b/gst-libs/gst/d3d11/gstd3d11device.c @@ -765,7 +765,7 @@ gst_d3d11_device_constructed (GObject * object) NULL, d3d11_flags, feature_levels, G_N_ELEMENTS (feature_levels), D3D11_SDK_VERSION, &priv->device, &selected_level, &priv->device_context); - if (!gst_d3d11_result (hr, NULL)) { + if (FAILED (hr)) { /* Retry if the system could not recognize D3D_FEATURE_LEVEL_11_1 */ hr = D3D11CreateDevice ((IDXGIAdapter *) adapter, D3D_DRIVER_TYPE_UNKNOWN, NULL, d3d11_flags, &feature_levels[1], @@ -786,7 +786,7 @@ gst_d3d11_device_constructed (GObject * object) D3D11_SDK_VERSION, &priv->device, &selected_level, &priv->device_context); - if (!gst_d3d11_result (hr, NULL)) { + if (FAILED (hr)) { /* Retry if the system could not recognize D3D_FEATURE_LEVEL_11_1 */ hr = D3D11CreateDevice ((IDXGIAdapter *) adapter, D3D_DRIVER_TYPE_UNKNOWN, NULL, d3d11_flags, &feature_levels[1], @@ -795,11 +795,12 @@ gst_d3d11_device_constructed (GObject * object) } } - if (gst_d3d11_result (hr, NULL)) { + if (SUCCEEDED (hr)) { GST_DEBUG_OBJECT (self, "Selected feature level 0x%x", selected_level); } else { - GST_WARNING_OBJECT (self, - "cannot create d3d11 device, hr: 0x%x", (guint) hr); + GST_INFO_OBJECT (self, + "cannot create d3d11 device for adapter index %d with flags 0x%x, " + "hr: 0x%x", priv->adapter, d3d11_flags, (guint) hr); goto error; } diff --git a/sys/d3d11/gstd3d11decoder.cpp b/sys/d3d11/gstd3d11decoder.cpp index 7706f73347..33493fd265 100644 --- a/sys/d3d11/gstd3d11decoder.cpp +++ b/sys/d3d11/gstd3d11decoder.cpp @@ -528,6 +528,30 @@ error: return FALSE; } +static const gchar * +gst_d3d11_codec_to_string (GstD3D11Codec codec) +{ + switch (codec) { + case GST_D3D11_CODEC_NONE: + return "none"; + case GST_D3D11_CODEC_H264: + return "H.264"; + case GST_D3D11_CODEC_VP9: + return "VP9"; + case GST_D3D11_CODEC_H265: + return "H.265"; + case GST_D3D11_CODEC_VP8: + return "VP8"; + case GST_D3D11_CODEC_MPEG2: + return "MPEG2"; + default: + g_assert_not_reached (); + break; + } + + return "Unknown"; +} + gboolean gst_d3d11_decoder_get_supported_decoder_profile (GstD3D11Decoder * decoder, GstD3D11Codec codec, GstVideoFormat format, const GUID ** selected_profile) @@ -647,7 +671,8 @@ gst_d3d11_decoder_get_supported_decoder_profile (GstD3D11Decoder * decoder, } if (!profile) { - GST_WARNING_OBJECT (decoder, "No supported decoder profile"); + GST_INFO_OBJECT (decoder, "No supported decoder profile for %s codec", + gst_d3d11_codec_to_string (codec)); return FALSE; }