msdk: query platform when opening session

This commit is contained in:
Aaron Boxer 2019-11-20 13:09:34 -06:00 committed by Haihao Xiang
parent 0cf67c3be7
commit 2f1256ada7

View file

@ -190,10 +190,19 @@ msdk_open_session (mfxIMPL impl)
GST_ERROR ("Query version failed (%s)", msdk_status_to_string (status));
goto failed;
}
#if (MFX_VERSION >= 1019)
mfxPlatform platform = { 0 };
status = MFXVideoCORE_QueryPlatform (session, &platform);
if (MFX_ERR_NONE == status) {
GST_INFO ("Detected MFX platform with device code %d", platform.CodeName);
} else {
GST_WARNING ("Platform auto-detection failed with MFX status %d", status);
}
#endif
GST_INFO ("MSDK implementation: 0x%04x (%s)", implementation,
GST_INFO ("MFX implementation: 0x%04x (%s)", implementation,
implementation_names[MFX_IMPL_BASETYPE (implementation)]);
GST_INFO ("MSDK version: %d.%d", version.Major, version.Minor);
GST_INFO ("MFX version: %d.%d", version.Major, version.Minor);
return session;