msdk: Add MediaSDK versioned feature support and dynamic element registration
Submitted by Sreerenj Balachandran
We haven't added the code to guard against different MediaSDK versions.
The easy way is to add a hard-limit by raising the minimum required version to the recently released MediaStudio or only support the open source version.
But this may make many people unhappy :)
Otherwise, we should check the msdk spec and guard many of the features based on version (For eg: MFX_FOURCC_P010 was introduced by SDK API 1.9).
Dynamic element registration should also be handled.
Unfortunately, there is no MediaSDK API to retrieve the list of all supported decoders (AFAIK). Either we need to query the msdk with MFXVideoDECODE_Query
n times (n = number of all known codecs), or should keep some static platform specific pre-defined tables.