diff options
author | Mark Thompson <sw@jkqxz.net> | 2017-11-14 13:02:26 +0000 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2017-11-25 15:44:31 +0000 |
commit | 8bbf2dacbfb4ead1535dea411035994f507f517d (patch) | |
tree | b30c5e5e09400e3a0ffe7dc6056c5300f7c9ba8c | |
parent | 4af050c46e2a77fa86894cea5ba2d5f1d3e1f5ea (diff) | |
download | ffmpeg-8bbf2dacbfb4ead1535dea411035994f507f517d.tar.gz |
hwcontext_d3d11: Log adapter details on device creation
This is helpful to know what device has actually been used.
-rw-r--r-- | libavutil/hwcontext_d3d11va.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libavutil/hwcontext_d3d11va.c b/libavutil/hwcontext_d3d11va.c index 65dd6651fc..769c81fd77 100644 --- a/libavutil/hwcontext_d3d11va.c +++ b/libavutil/hwcontext_d3d11va.c @@ -515,8 +515,15 @@ static int d3d11va_device_create(AVHWDeviceContext *ctx, const char *device, hr = mD3D11CreateDevice(pAdapter, pAdapter ? D3D_DRIVER_TYPE_UNKNOWN : D3D_DRIVER_TYPE_HARDWARE, NULL, creationFlags, NULL, 0, D3D11_SDK_VERSION, &device_hwctx->device, NULL, NULL); - if (pAdapter) + if (pAdapter) { + DXGI_ADAPTER_DESC2 desc; + hr = IDXGIAdapter2_GetDesc(pAdapter, &desc); + if (!FAILED(hr)) { + av_log(ctx, AV_LOG_INFO, "Using device %04x:%04x (%ls).\n", + desc.VendorId, desc.DeviceId, desc.Description); + } IDXGIAdapter_Release(pAdapter); + } if (FAILED(hr)) { av_log(ctx, AV_LOG_ERROR, "Failed to create Direct3D device (%lx)\n", (long)hr); return AVERROR_UNKNOWN; |