A few weeks ago I posted a problem with AMF SDK about a property included into enumeration and triggering a failure in a followup request for value. It appeared to be “internal property” to intentionally tease the caller and report error by design, unlike all other dozens of SDK properties. And of course to raise an error in an unexpected place for those naive ones who trust third party packages from reputable vendors too much.
So I am happy to report that another vendor, NVIDIA, is catching up in the competition.
uint32_t nPresetCount = 0;
NvCheck(NvEncGetEncodePresetCount(Identifier, nPresetCount));
// nPresetCount is 17 now even though it's been 10 for a long time
if(nPresetCount)
{
[...]
NvCheck(NvEncGetEncodePresetGUIDs(Identifier, pPresetIdentifiers, nPresetCount, nPresetCount));
// Success
for(uint32_t nPresetIndex = 0; nPresetIndex < nPresetCount; nPresetIndex++)
{
[...]
NV_ENC_PRESET_CONFIG Configuration { NV_ENC_PRESET_CONFIG_VER };
Configuration.presetCfg.version = NV_ENC_CONFIG_VER;
// Argument for 11th item discovered above
NvCheck(NvEncGetEncodePresetConfig(Identifier, PresetIdentifier, Configuration));
// NV_ENC_ERR_UNSUPPORTED_PARAM
If this is behavior by design, it is not an innovation, we’d need something new.