Skip to content

Commit

Permalink
[RT Common] Fix MediaAdapterType issue (#5898)
Browse files Browse the repository at this point in the history
Co-authored-by: Liu, Rachel <[email protected]>
  • Loading branch information
gfxVPLsdm and rachel-liu1024 authored Oct 23, 2023
1 parent 8126344 commit a694f72
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions _studio/mfx_lib/shared/src/libmfxsw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,15 @@ mfxHDL* MFX_CDECL MFXQueryImplsDescription(mfxImplCapsDeliveryFormat format, mfx
ah.PushBack(impl.PoolPolicies.Policy) = MFX_ALLOCATION_UNLIMITED;
ah.PushBack(impl.PoolPolicies.Policy) = MFX_ALLOCATION_LIMITED;

impl.Dev.Version.Version = MFX_STRUCT_VERSION(1, 1);
impl.Dev.MediaAdapterType = MFX_MEDIA_UNKNOWN;

if (auto pCore1_19 = QueryCoreInterface<IVideoCore_API_1_19>(&core, MFXICORE_API_1_19_GUID))
{
mfxPlatform platform = {};
if (MFX_ERR_NONE == pCore1_19->QueryPlatform(&platform))
impl.Dev.MediaAdapterType = platform.MediaAdapterType;
}

snprintf(impl.Dev.DeviceID, sizeof(impl.Dev.DeviceID), "%x/%d", deviceId, adapterNum);
snprintf(impl.ImplName, sizeof(impl.ImplName), "mfx-gen");
Expand Down

0 comments on commit a694f72

Please sign in to comment.