{"id":2011,"date":"2020-02-01T14:36:59","date_gmt":"2020-02-01T12:36:59","guid":{"rendered":"https:\/\/alax.info\/blog\/?p=2011"},"modified":"2020-02-02T02:08:52","modified_gmt":"2020-02-02T00:08:52","slug":"i-have-a-container-element-but-i-will-not-give-it-to-you","status":"publish","type":"post","link":"https:\/\/alax.info\/blog\/2011","title":{"rendered":"I have a container element, but I will not give it to you&#8230;"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">A few weeks ago I <a href=\"https:\/\/github.com\/GPUOpen-LibrariesAndSDKs\/AMF\/issues\/197\">posted<\/a> 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 &#8220;internal property&#8221; 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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So I am happy to report that another vendor, NVIDIA, is catching up in the competition.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>uint32_t nPresetCount = 0;\nNvCheck(NvEncGetEncodePresetCount(Identifier, nPresetCount));\n\/\/ nPresetCount is 17 now even though it's been 10 for a long time\nif(nPresetCount)\n{\n\t&#91;...]\n\tNvCheck(NvEncGetEncodePresetGUIDs(Identifier, pPresetIdentifiers, nPresetCount, nPresetCount));\n\t\/\/ Success\n\tfor(uint32_t nPresetIndex = 0; nPresetIndex &lt; nPresetCount; nPresetIndex++)\n\t{\n\t\t&#91;...]\n\t\tNV_ENC_PRESET_CONFIG Configuration { NV_ENC_PRESET_CONFIG_VER };\n\t\tConfiguration.presetCfg.version = NV_ENC_CONFIG_VER;\n\t\t\/\/ Argument for 11th item discovered above\n\t\tNvCheck(NvEncGetEncodePresetConfig(Identifier, PresetIdentifier, Configuration));\n\t\t\/\/ NV_ENC_ERR_UNSUPPORTED_PARAM<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If this is behavior by design, it is not an innovation, we&#8217;d need something new.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &#8220;internal property&#8221; to intentionally tease the caller and report error by design, unlike all other dozens of SDK properties. And of course to raise&hellip; <\/p>\n<p><a class=\"moretag\" href=\"https:\/\/alax.info\/blog\/2011\">Read the full article<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[553,81,547,512],"class_list":["post-2011","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-amd","tag-api","tag-nvidia","tag-sdk"],"_links":{"self":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/2011","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/comments?post=2011"}],"version-history":[{"count":0,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/2011\/revisions"}],"wp:attachment":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/media?parent=2011"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/categories?post=2011"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/tags?post=2011"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}