diff options
| author | Igor Govorov <[email protected]> | 2018-04-11 18:28:51 +0300 |
|---|---|---|
| committer | Igor Govorov <[email protected]> | 2018-04-11 18:28:51 +0300 |
| commit | c4f5a0aff93e05b3c01de0dbdc7c05e5d9530eda (patch) | |
| tree | 165e3aa9f3a2fff99f70eae90e4a519e0de41a1b /doc/html/index.html | |
| parent | Add Developer Content Portal documentation (diff) | |
| download | gfesdk-1.1.201.tar.xz gfesdk-1.1.201.zip | |
Push GeForceExperience SDK 1.1.2011.1.201
Diffstat (limited to 'doc/html/index.html')
| -rw-r--r-- | doc/html/index.html | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/doc/html/index.html b/doc/html/index.html index 9a665c8..20a22de 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -89,20 +89,20 @@ $(document).ready(function(){initNavTree('index.html','');}); <p>See <a class="el" href="isdk_8h.html">Core header documentation</a></p> <p>See <a class="el" href="ihighlights_8h.html">Highlights header documentation</a></p> <h4>C++ Bindings</h4> -<div class="fragment"><div class="line"> <a class="code" href="struct_gfe_s_d_k_1_1_create_input_params.html">GfeSDK::CreateInputParams</a> createParams;</div><div class="line"> createParams.appName = <span class="stringliteral">"gfesdk_dx_sample"</span>; <span class="comment">// appName will only be used/visible if GFE cannot identify your game</span></div><div class="line"> createParams.pollForCallbacks = <span class="keyword">true</span>; <span class="comment">// We will poll for callbacks in order to execute callbacks from game loop</span></div><div class="line"> createParams.requiredScopes = {</div><div class="line"> GfeSDK::NVGSDK_SCOPE_HIGHLIGHTS,</div><div class="line"> GfeSDK::NVGSDK_SCOPE_HIGHLIGHTS_VIDEO,</div><div class="line"> GfeSDK::NVGSDK_SCOPE_HIGHLIGHTS_SCREENSHOT</div><div class="line"> };</div><div class="line"> createParams.notificationCallback = std::bind(&HighlightsWrapper::OnNotification, <span class="keyword">this</span>, _1, _2);</div><div class="line"></div><div class="line"> <a class="code" href="struct_gfe_s_d_k_1_1_create_response.html">GfeSDK::CreateResponse</a> response;</div><div class="line"> <a class="code" href="class_gfe_s_d_k_1_1_core.html">GfeSDK::Core</a>* gfesdkCore = <a class="code" href="class_gfe_s_d_k_1_1_core.html#a0cb93acb8b273072cd37348c9b206e0d">GfeSDK::Core::Create</a>(createParams, response);</div><div class="line"> <span class="keywordflow">if</span> (GfeSDK::NVGSDK_SUCCEEDED(response.returnCode))</div><div class="line"> {</div><div class="line"> <span class="comment">// Valid handle has been returned</span></div><div class="line"> LOG(<span class="stringliteral">"Success: %s"</span>, GfeSDK::NVGSDK_RetCodeToString(response.returnCode));</div><div class="line"> LOG(<span class="stringliteral">"PC is running GFE version %s"</span>, response.nvidiaGfeVersion.c_str());</div><div class="line"> LOG(<span class="stringliteral">"PC is running GfeSDK version %d.%d"</span>, response.versionMajor, response.versionMinor);</div><div class="line"> <span class="keywordflow">switch</span> (response.returnCode)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> GfeSDK::NVGSDK_SUCCESS_VERSION_OLD_GFE:</div><div class="line"> LOG(<span class="stringliteral">"Compatible, but the user should update to the latest version of GFE."</span>);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> GfeSDK::NVGSDK_SUCCESS_VERSION_OLD_SDK:</div><div class="line"> LOG(<span class="stringliteral">"Compatible, but this application should update to a more recent GfeSDK to get latest features/bugfixes"</span>);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> {</div><div class="line"> <span class="comment">// No valid handle</span></div><div class="line"> LOG(<span class="stringliteral">"Failure: %s"</span>, GfeSDK::NVGSDK_RetCodeToString(response.returnCode));</div><div class="line"> <span class="keywordflow">switch</span> (response.returnCode)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> GfeSDK::NVGSDK_ERR_SDK_VERSION:</div><div class="line"> LOG(<span class="stringliteral">"This version of the SDK is too old to communicate with the user's SDK. We're never planning on this happening."</span>);</div><div class="line"> LOG(<span class="stringliteral">"PC is running GFE version %s"</span>, response.nvidiaGfeVersion.c_str());</div><div class="line"> LOG(<span class="stringliteral">"PC is running GfeSDK version %d.%d"</span>, response.versionMajor, response.versionMinor);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> GfeSDK::NVGSDK_SUCCESS_VERSION_OLD_SDK:</div><div class="line"> LOG(<span class="stringliteral">"The installed version of GFE is too old to continue. User must upgrade."</span>);</div><div class="line"> LOG(<span class="stringliteral">"PC is running GFE version %s"</span>, response.nvidiaGfeVersion.c_str());</div><div class="line"> LOG(<span class="stringliteral">"PC is running GfeSDK version %d.%d"</span>, response.versionMajor, response.versionMinor);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line"> <span class="keywordflow">return</span>;</div><div class="line"> }</div></div><!-- fragment --><p> // After using GfeSDK</p> -<div class="fragment"><div class="line"> <span class="keyword">delete</span> gfesdkCore;</div></div><!-- fragment --> <h4>C API</h4> -<div class="fragment"><div class="line"> <a class="code" href="struct_n_v_g_s_d_k___create_input_params.html">NVGSDK_CreateInputParams</a> inParams;</div><div class="line"> memset(&inParams, 0, <span class="keyword">sizeof</span>(inParams));</div><div class="line"></div><div class="line"> NVGSDK_Scope scopes[] = { NVGSDK_SCOPE_HIGHLIGHTS, NVGSDK_SCOPE_HIGHLIGHTS_VIDEO, NVGSDK_SCOPE_HIGHLIGHTS_SCREENSHOT };</div><div class="line"> <a class="code" href="struct_n_v_g_s_d_k___scope_permission.html">NVGSDK_ScopePermission</a> scopePermissions[COUNT_OF(scopes)];</div><div class="line"></div><div class="line"> inParams.<a class="code" href="struct_n_v_g_s_d_k___create_input_params.html#ac754df94f208f494a0a339d614bb18f3">appName</a> = <span class="stringliteral">"gfesdk_dx_sample"</span>;</div><div class="line"> inParams.<a class="code" href="struct_n_v_g_s_d_k___create_input_params.html#a0bd7568c1cb3fad975562055b4581195">pollForCallbacks</a> = <span class="keyword">true</span>;</div><div class="line"> inParams.<a class="code" href="struct_n_v_g_s_d_k___create_input_params.html#ae0ada093d3d60a2f70226932b1a5b6fb">scopeTable</a> = &scopes[0];</div><div class="line"> inParams.<a class="code" href="struct_n_v_g_s_d_k___create_input_params.html#a8941e0c803ec2f821101cfc55a7f60a3">scopeTableSize</a> = COUNT_OF(scopes);</div><div class="line"> inParams.<a class="code" href="struct_n_v_g_s_d_k___create_input_params.html#adde61c0a8ea3a728c57081ec97081a72">notificationCallback</a> = handleNotification;</div><div class="line"></div><div class="line"> <a class="code" href="struct_n_v_g_s_d_k___create_response.html">NVGSDK_CreateResponse</a> outParams;</div><div class="line"> memset(&outParams, 0, <span class="keyword">sizeof</span>(outParams));</div><div class="line"> outParams.<a class="code" href="struct_n_v_g_s_d_k___create_response.html#a9bc3e75a15cf9fcbc1084f2a7fde5a8f">scopePermissionTable</a> = &scopePermissions[0];</div><div class="line"> outParams.<a class="code" href="struct_n_v_g_s_d_k___create_response.html#a60aec9d469d10e8fe0efd7c010fb96e7">scopePermissionTableSize</a> = COUNT_OF(scopes);</div><div class="line"></div><div class="line"> NVGSDK_RetCode rc = <a class="code" href="isdk_8h.html#a95b3999b5808922e29a36375c22014b8">NVGSDK_Create</a>(&g_sdk, &inParams, &outParams);</div><div class="line"> <span class="keywordflow">if</span> (NVGSDK_SUCCEEDED(rc))</div><div class="line"> {</div><div class="line"> <span class="comment">// Valid handle has been returned</span></div><div class="line"> LOG(<span class="stringliteral">"Success: %s"</span>, NVGSDK_RetCodeToString(rc));</div><div class="line"> LOG(<span class="stringliteral">"PC is running GFE version %s"</span>, outParams.<a class="code" href="struct_n_v_g_s_d_k___create_response.html#aacdf644f5f6eb996dad6bb90b4145deb">gfeVersionStr</a>);</div><div class="line"> LOG(<span class="stringliteral">"PC is running GfeSDK version %d.%d"</span>, outParams.<a class="code" href="struct_n_v_g_s_d_k___create_response.html#aa595214daf18bdbc638ef98e1f22a30f">versionMajor</a>, outParams.<a class="code" href="struct_n_v_g_s_d_k___create_response.html#ad1687ba8b8d53a75b13a60874f3822be">versionMinor</a>);</div><div class="line"> <span class="keywordflow">switch</span> (rc)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> NVGSDK_SUCCESS_VERSION_OLD_GFE:</div><div class="line"> LOG(<span class="stringliteral">"Compatible, but the user should update to the latest version of GFE."</span>);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> NVGSDK_SUCCESS_VERSION_OLD_SDK:</div><div class="line"> LOG(<span class="stringliteral">"Compatible, but this application should update to a more recent GfeSDK to get latest features/bugfixes"</span>);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> {</div><div class="line"> <span class="comment">// No valid handle</span></div><div class="line"> LOG(<span class="stringliteral">"Failure: %s"</span>, NVGSDK_RetCodeToString(rc));</div><div class="line"> <span class="keywordflow">switch</span> (rc)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">case</span> NVGSDK_ERR_SDK_VERSION:</div><div class="line"> LOG(<span class="stringliteral">"This version of the SDK is too old to communicate with the user's SDK. We're never planning on this happening."</span>);</div><div class="line"> LOG(<span class="stringliteral">"PC is running GFE version %s"</span>, outParams.<a class="code" href="struct_n_v_g_s_d_k___create_response.html#aacdf644f5f6eb996dad6bb90b4145deb">gfeVersionStr</a>);</div><div class="line"> LOG(<span class="stringliteral">"PC is running GfeSDK version %d.%d"</span>, outParams.<a class="code" href="struct_n_v_g_s_d_k___create_response.html#aa595214daf18bdbc638ef98e1f22a30f">versionMajor</a>, outParams.<a class="code" href="struct_n_v_g_s_d_k___create_response.html#ad1687ba8b8d53a75b13a60874f3822be">versionMinor</a>);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> <span class="keywordflow">case</span> NVGSDK_SUCCESS_VERSION_OLD_SDK:</div><div class="line"> LOG(<span class="stringliteral">"The installed version of GFE is too old to continue. User must upgrade."</span>);</div><div class="line"> LOG(<span class="stringliteral">"PC is running GFE version %s"</span>, outParams.<a class="code" href="struct_n_v_g_s_d_k___create_response.html#aacdf644f5f6eb996dad6bb90b4145deb">gfeVersionStr</a>);</div><div class="line"> LOG(<span class="stringliteral">"PC is running GfeSDK version %d.%d"</span>, outParams.<a class="code" href="struct_n_v_g_s_d_k___create_response.html#aa595214daf18bdbc638ef98e1f22a30f">versionMajor</a>, outParams.<a class="code" href="struct_n_v_g_s_d_k___create_response.html#ad1687ba8b8d53a75b13a60874f3822be">versionMinor</a>);</div><div class="line"> <span class="keywordflow">break</span>;</div><div class="line"> }</div><div class="line"> <span class="keywordflow">return</span>;</div><div class="line"> }</div></div><!-- fragment --><p> // After using GfeSDK</p> -<div class="fragment"><div class="line"> <a class="code" href="isdk_8h.html#ab63d1f433313209b1febbf5736b61463">NVGSDK_Release</a>(g_sdk);</div></div><!-- fragment --> <p>The Create call will inform the app if one or more scopes require user permission. If so, make this call. It will display the overlay UI.</p> +<div class="fragment"></div><!-- fragment --><p> // After using GfeSDK</p> +<div class="fragment"></div><!-- fragment --> <h4>C API</h4> +<div class="fragment"></div><!-- fragment --><p> // After using GfeSDK</p> +<div class="fragment"></div><!-- fragment --> <p>The Create call will inform the app if one or more scopes require user permission. If so, make this call. It will display the overlay UI.</p> <h4>C++ Bindings</h4> -<div class="fragment"><div class="line"> <span class="comment">// Request Permissions if user hasn't decided yet</span></div><div class="line"> <a class="code" href="struct_gfe_s_d_k_1_1_request_permissions_params.html">GfeSDK::RequestPermissionsParams</a> requestPermissionsParams;</div><div class="line"></div><div class="line"> <span class="comment">// 'response' came from create call. It tells us which permissions we requested during Create,</span></div><div class="line"> <span class="comment">// but the user hasn't yet made a decision on</span></div><div class="line"> <span class="keywordflow">for</span> (<span class="keyword">auto</span>&& entry : response.scopePermissions)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> (entry.second == GfeSDK::NVGSDK_PERMISSION_MUST_ASK)</div><div class="line"> {</div><div class="line"> requestPermissionsParams.scopes.push_back(entry.first);</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (!requestPermissionsParams.scopes.empty())</div><div class="line"> {</div><div class="line"> <span class="comment">// If the user hasn't given permission for recording yet, ask them to do so now via overlay</span></div><div class="line"> m_gfesdk->RequestPermissionsAsync(requestPermissionsParams, [<span class="keyword">this</span>, defaultLocale, highlights, numHighlights](GfeSDK::NVGSDK_RetCode rc, <span class="keywordtype">void</span>* cbContext) {</div><div class="line"> UpdateLastResultString(rc);</div><div class="line"> <span class="keywordflow">if</span> (GfeSDK::NVGSDK_SUCCEEDED(rc))</div><div class="line"> {</div><div class="line"> ConfigureHighlights(defaultLocale, highlights, numHighlights);</div><div class="line"> }</div><div class="line"> });</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> {</div><div class="line"> <span class="comment">// Otherwise, go ahead and set up now</span></div><div class="line"> ConfigureHighlights(defaultLocale, highlights, numHighlights);</div><div class="line"> }</div></div><!-- fragment --> <h4>C API</h4> -<div class="fragment"><div class="line"> <span class="comment">// Request Permissions if user hasn't decided yet</span></div><div class="line"> <a class="code" href="struct_n_v_g_s_d_k___request_permissions_params.html">NVGSDK_RequestPermissionsParams</a> requestPermissionsParams = { 0 };</div><div class="line"> NVGSDK_Scope requestScopes[COUNT_OF(scopes)];</div><div class="line"> memset(requestScopes, NVGSDK_SCOPE_MAX, COUNT_OF(scopes));</div><div class="line"> requestPermissionsParams.scopeTable = &requestScopes[0];</div><div class="line"></div><div class="line"> <span class="comment">// 'response' came from create call. It tells us which permissions we requested during Create,</span></div><div class="line"> <span class="comment">// but the user hasn't yet made a decision on</span></div><div class="line"> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0, j = 0; i < outParams.<a class="code" href="struct_n_v_g_s_d_k___create_response.html#a60aec9d469d10e8fe0efd7c010fb96e7">scopePermissionTableSize</a>; ++i)</div><div class="line"> {</div><div class="line"> <span class="keywordflow">if</span> (outParams.<a class="code" href="struct_n_v_g_s_d_k___create_response.html#a9bc3e75a15cf9fcbc1084f2a7fde5a8f">scopePermissionTable</a>[i].permission == NVGSDK_PERMISSION_MUST_ASK)</div><div class="line"> {</div><div class="line"> requestPermissionsParams.scopeTable[j++] = outParams.<a class="code" href="struct_n_v_g_s_d_k___create_response.html#a9bc3e75a15cf9fcbc1084f2a7fde5a8f">scopePermissionTable</a>[i].scope;</div><div class="line"> requestPermissionsParams.scopeTableSize++;</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keywordflow">if</span> (requestPermissionsParams.scopeTableSize > 0)</div><div class="line"> {</div><div class="line"> TConfigHolder* configHolder = malloc(<span class="keyword">sizeof</span>(TConfigHolder));</div><div class="line"> configHolder->defaultLocale = defaultLocale;</div><div class="line"> configHolder->highlights = highlights;</div><div class="line"> configHolder->numHighlights = numHighlights;</div><div class="line"></div><div class="line"> <span class="comment">// If the user hasn't given permission for recording yet, ask them to do so now via overlay</span></div><div class="line"> <a class="code" href="isdk_8h.html#a3e4b6afcafe9ac91c00a95b7d72305e5">NVGSDK_RequestPermissionsAsync</a>(g_sdk, &requestPermissionsParams, &handlePermissionRequested, configHolder);</div><div class="line"> }</div><div class="line"> <span class="keywordflow">else</span></div><div class="line"> {</div><div class="line"> <span class="comment">// Otherwise, go ahead and set up now</span></div><div class="line"> ConfigureHighlights(defaultLocale, highlights, numHighlights);</div><div class="line"> }</div></div><!-- fragment --> <p>This only needs to happen once ever. It is persistent. It could even happen during game installation.</p> +<div class="fragment"></div><!-- fragment --> <h4>C API</h4> +<div class="fragment"></div><!-- fragment --> <p>This only needs to happen once ever. It is persistent. It could even happen during game installation.</p> <h4>C++ Bindings</h4> -<div class="fragment"><div class="line"> <span class="comment">// Create handle to highlights module</span></div><div class="line"> m_highlights.reset(GfeSDK::Highlights::Create(m_gfesdk.get()));</div><div class="line"></div><div class="line"> <a class="code" href="struct_gfe_s_d_k_1_1_highlight_config_params.html">GfeSDK::HighlightConfigParams</a> configParams;</div><div class="line"> configParams.defaultLocale = defaultLocale;</div><div class="line"></div><div class="line"> <span class="comment">// Set up highlight definition table</span></div><div class="line"> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < numHighlights; ++i)</div><div class="line"> {</div><div class="line"> <a class="code" href="struct_gfe_s_d_k_1_1_highlight_definition.html">GfeSDK::HighlightDefinition</a> highlightDef;</div><div class="line"> highlightDef.id = highlights[i].id;</div><div class="line"> highlightDef.userDefaultInterest = highlights[i].userInterest;</div><div class="line"> highlightDef.significance = highlights[i].significance;</div><div class="line"> highlightDef.highlightTags = highlights[i].highlightTags;</div><div class="line"> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 0; j < highlights[i].nameTableSize; ++j)</div><div class="line"> {</div><div class="line"> highlightDef.<a class="code" href="struct_gfe_s_d_k_1_1_highlight_definition.html#a2511ee17dafd2a096b15e6f62b1f77b2">nameLocaleTable</a>[highlights[i].nameTable[j].localeCode] = highlights[i].nameTable[j].localizedString;</div><div class="line"> }</div><div class="line"></div><div class="line"> configParams.highlightDefinitions.push_back(highlightDef);</div><div class="line"> }</div><div class="line"></div><div class="line"> m_highlights->ConfigureAsync(configParams, [<span class="keyword">this</span>](GfeSDK::NVGSDK_RetCode rc, <span class="keywordtype">void</span>*) {</div><div class="line"> UpdateLastResultString(rc);</div><div class="line"> });</div></div><!-- fragment --> <h4>C API</h4> -<div class="fragment"><div class="line"> <a class="code" href="struct_n_v_g_s_d_k___highlight.html">NVGSDK_Highlight</a>* highlights = calloc(numHighlights, <span class="keyword">sizeof</span>(<a class="code" href="struct_n_v_g_s_d_k___highlight.html">NVGSDK_Highlight</a>));</div><div class="line"> highlights[0].<a class="code" href="struct_n_v_g_s_d_k___highlight.html#a9e0d5a1ba9081cb7f9b549499af61927">userInterest</a> = <span class="keyword">false</span>;</div><div class="line"></div><div class="line"> <a class="code" href="struct_n_v_g_s_d_k___highlight_config_params.html">NVGSDK_HighlightConfigParams</a>* params = calloc(1, <span class="keyword">sizeof</span>(<a class="code" href="struct_n_v_g_s_d_k___highlight_config_params.html">NVGSDK_HighlightConfigParams</a>));</div><div class="line"> params-><a class="code" href="struct_n_v_g_s_d_k___highlight_config_params.html#a7f4f852d4fe97048f20dcdcc401ab82b">defaultLocale</a> = defaultLocale;</div><div class="line"> params->highlightDefinitionTable = highlights;</div><div class="line"> params->highlightTableSize = numHighlights;</div><div class="line"></div><div class="line"> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < numHighlights; ++i)</div><div class="line"> {</div><div class="line"> highlights[i].<a class="code" href="struct_n_v_g_s_d_k___highlight.html#a1f95d7645df3e535efa830685488ae9b">id</a> = hl[i].id;</div><div class="line"> highlights[i].<a class="code" href="struct_n_v_g_s_d_k___highlight.html#a1e55e8efeca6cfabc9c68583e24f410b">highlightTags</a> = hl[i].highlightTags;</div><div class="line"> highlights[i].<a class="code" href="struct_n_v_g_s_d_k___highlight.html#a3ecee6a0bd80c21b630559fb8ecfc0be">significance</a> = hl[i].significance;</div><div class="line"> highlights[i].<a class="code" href="struct_n_v_g_s_d_k___highlight.html#a9e0d5a1ba9081cb7f9b549499af61927">userInterest</a> = hl[i].userInterest;</div><div class="line"></div><div class="line"> highlights[i].<a class="code" href="struct_n_v_g_s_d_k___highlight.html#a5522ae0afe385ba7d17afd83d19ed729">nameTableSize</a> = hl[i].nameTableSize;</div><div class="line"> highlights[i].<a class="code" href="struct_n_v_g_s_d_k___highlight.html#a3aa8849a5921b0189c2642840c257247">nameTable</a> = hl[i].nameTableSize > 0 ? calloc(hl[i].nameTableSize, <span class="keyword">sizeof</span>(<a class="code" href="struct_n_v_g_s_d_k___localized_pair.html">NVGSDK_LocalizedPair</a>)) : NULL;</div><div class="line"> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> name = 0; name < hl[i].nameTableSize; ++name)</div><div class="line"> {</div><div class="line"> highlights[i].<a class="code" href="struct_n_v_g_s_d_k___highlight.html#a3aa8849a5921b0189c2642840c257247">nameTable</a>[name].<a class="code" href="struct_n_v_g_s_d_k___localized_pair.html#aa070c22ef7cf737497855504fb8795d6">localeCode</a> = calloc(NVGSDK_MAX_LENGTH, <span class="keyword">sizeof</span>(<span class="keywordtype">char</span>));</div><div class="line"> strncpy_s((<span class="keywordtype">char</span>*)highlights[i].nameTable[name].localeCode, NVGSDK_MAX_LENGTH, hl[i].nameTable[name].localeCode, NVGSDK_MAX_LENGTH);</div><div class="line"> highlights[i].<a class="code" href="struct_n_v_g_s_d_k___highlight.html#a3aa8849a5921b0189c2642840c257247">nameTable</a>[name].<a class="code" href="struct_n_v_g_s_d_k___localized_pair.html#a02d3e482f16824ccc790f1a3dc8b8952">localizedString</a> = calloc(NVGSDK_MAX_LENGTH, <span class="keyword">sizeof</span>(<span class="keywordtype">char</span>));</div><div class="line"> strncpy_s((<span class="keywordtype">char</span>*)highlights[i].nameTable[name].localizedString, NVGSDK_MAX_LENGTH, hl[i].nameTable[name].localizedString, NVGSDK_MAX_LENGTH);</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <a class="code" href="ihighlights_8h.html#a0407132e7fd44771370ecfa03fdfce8d">NVGSDK_Highlights_ConfigureAsync</a>(g_sdk, params, &handleConfigured, params);</div></div><!-- fragment --> <h4>C++ Bindings</h4> -<div class="fragment"><div class="line"> <a class="code" href="struct_gfe_s_d_k_1_1_highlight_open_group_params.html">GfeSDK::HighlightOpenGroupParams</a> params;</div><div class="line"> params.groupId = id;</div><div class="line"> params.groupDescriptionLocaleTable[<span class="stringliteral">"en-US"</span>] = id;</div><div class="line"> m_highlights->OpenGroupAsync(params, [<span class="keyword">this</span>](GfeSDK::NVGSDK_RetCode rc, <span class="keywordtype">void</span>*) {</div><div class="line"> UpdateLastResultString(rc);</div><div class="line"> });</div></div><!-- fragment --><div class="fragment"><div class="line"> <a class="code" href="struct_gfe_s_d_k_1_1_video_highlight_params.html">GfeSDK::VideoHighlightParams</a> params;</div><div class="line"> params.startDelta = startDelta;</div><div class="line"> params.endDelta = endDelta;</div><div class="line"> params.groupId = groupId;</div><div class="line"> params.highlightId = highlightId;</div><div class="line"> m_highlights->SetVideoHighlightAsync(params, [<span class="keyword">this</span>](GfeSDK::NVGSDK_RetCode rc, <span class="keywordtype">void</span>*) {</div><div class="line"> UpdateLastResultString(rc);</div><div class="line"> });</div></div><!-- fragment --><div class="fragment"><div class="line"> <a class="code" href="struct_gfe_s_d_k_1_1_highlight_close_group_params.html">GfeSDK::HighlightCloseGroupParams</a> params;</div><div class="line"> params.groupId = id;</div><div class="line"> params.destroyHighlights = destroy;</div><div class="line"> m_highlights->CloseGroupAsync(params, [<span class="keyword">this</span>](GfeSDK::NVGSDK_RetCode rc, <span class="keywordtype">void</span>*) {</div><div class="line"> UpdateLastResultString(rc);</div><div class="line"> });</div></div><!-- fragment --> <h4>C API</h4> -<div class="fragment"><div class="line"> <a class="code" href="struct_n_v_g_s_d_k___highlight_open_group_params.html">NVGSDK_HighlightOpenGroupParams</a> params = { 0 };</div><div class="line"> params.<a class="code" href="struct_n_v_g_s_d_k___highlight_open_group_params.html#a3e9f6351540609fc3e853d5a16188da2">groupId</a> = groupId;</div><div class="line"> <a class="code" href="ihighlights_8h.html#aa49250dbc063e242607123333f8da892">NVGSDK_Highlights_OpenGroupAsync</a>(g_sdk, &params, &handleGenericResponse, NULL);</div></div><!-- fragment --><div class="fragment"><div class="line"> <a class="code" href="struct_n_v_g_s_d_k___video_highlight_params.html">NVGSDK_VideoHighlightParams</a> params;</div><div class="line"> params.<a class="code" href="struct_n_v_g_s_d_k___video_highlight_params.html#aa332ddd28accd8f72fb17adc378c1267">groupId</a> = groupId;</div><div class="line"> params.<a class="code" href="struct_n_v_g_s_d_k___video_highlight_params.html#a622f76afc439ed07a18e97ca95564ff0">highlightId</a> = highlightId;</div><div class="line"> params.<a class="code" href="struct_n_v_g_s_d_k___video_highlight_params.html#ac526b90af6638fec62174304aa175da1">startDelta</a> = startDelta;</div><div class="line"> params.<a class="code" href="struct_n_v_g_s_d_k___video_highlight_params.html#ae63c02443b1eeb24c4e1ed4d49154277">endDelta</a> = endDelta;</div><div class="line"> <a class="code" href="ihighlights_8h.html#a4812495c6dedfc7cc6b2d3c421c161ed">NVGSDK_Highlights_SetVideoHighlightAsync</a>(g_sdk, &params, &handleGenericResponse, NULL);</div></div><!-- fragment --><div class="fragment"><div class="line"> <a class="code" href="struct_n_v_g_s_d_k___highlight_close_group_params.html">NVGSDK_HighlightCloseGroupParams</a> params = { 0 };</div><div class="line"> params.<a class="code" href="struct_n_v_g_s_d_k___highlight_close_group_params.html#a6f1e0e8a5399e868588a83e1c81ad9c3">groupId</a> = groupId;</div><div class="line"> params.<a class="code" href="struct_n_v_g_s_d_k___highlight_close_group_params.html#a3d7eae61163c4616a42569ca8d7785c6">destroyHighlights</a> = destroy;</div><div class="line"> <a class="code" href="ihighlights_8h.html#aa3b6190835ada28f4cee015645814e75">NVGSDK_Highlights_CloseGroupAsync</a>(g_sdk, &params, &handleGenericResponse, NULL);</div></div><!-- fragment --> <h4>C++ Bindings</h4> -<div class="fragment"><div class="line"> <a class="code" href="struct_gfe_s_d_k_1_1_summary_params.html">GfeSDK::SummaryParams</a> params;</div><div class="line"></div><div class="line"> <span class="comment">// Can show more than one group at a time, each with their own filters if desired</span></div><div class="line"> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < numGroups; ++i)</div><div class="line"> {</div><div class="line"> <a class="code" href="struct_gfe_s_d_k_1_1_group_view.html">GfeSDK::GroupView</a> v;</div><div class="line"> v.groupId = groupIds[i];</div><div class="line"> v.significanceFilter = sigFilter;</div><div class="line"> v.tagsFilter = tagFilter;</div><div class="line"> params.groupViews.push_back(v);</div><div class="line"> }</div><div class="line"></div><div class="line"> m_highlights->OpenSummaryAsync(params, [<span class="keyword">this</span>](GfeSDK::NVGSDK_RetCode rc, <span class="keywordtype">void</span>*) {</div><div class="line"> UpdateLastResultString(rc);</div><div class="line"> });</div></div><!-- fragment --> <h4>C API</h4> -<div class="fragment"><div class="line"> <a class="code" href="struct_n_v_g_s_d_k___summary_params.html">NVGSDK_SummaryParams</a>* params = calloc(1, <span class="keyword">sizeof</span>(<a class="code" href="struct_n_v_g_s_d_k___summary_params.html">NVGSDK_SummaryParams</a>));</div><div class="line"> params-><a class="code" href="struct_n_v_g_s_d_k___summary_params.html#a0a6f4e491c47e1468610f813c61ff4ff">groupSummaryTable</a> = calloc(numGroups, <span class="keyword">sizeof</span>(<a class="code" href="struct_n_v_g_s_d_k___group_view.html">NVGSDK_GroupView</a>));</div><div class="line"> params-><a class="code" href="struct_n_v_g_s_d_k___summary_params.html#a8fbfd016dc92f631921e738f12ef399d">groupSummaryTableSize</a> = numGroups;</div><div class="line"></div><div class="line"> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < numGroups; ++i)</div><div class="line"> {</div><div class="line"> params-><a class="code" href="struct_n_v_g_s_d_k___summary_params.html#a0a6f4e491c47e1468610f813c61ff4ff">groupSummaryTable</a>[i].<a class="code" href="struct_n_v_g_s_d_k___group_view.html#a4f957ca7635183b884ce960e733bbfcc">groupId</a> = groupIds[i];</div><div class="line"> params-><a class="code" href="struct_n_v_g_s_d_k___summary_params.html#a0a6f4e491c47e1468610f813c61ff4ff">groupSummaryTable</a>[i].<a class="code" href="struct_n_v_g_s_d_k___group_view.html#a88a126c5b8f2cd7c0e790bfdc3836fcb">significanceFilter</a> = sigFilter;</div><div class="line"> params-><a class="code" href="struct_n_v_g_s_d_k___summary_params.html#a0a6f4e491c47e1468610f813c61ff4ff">groupSummaryTable</a>[i].<a class="code" href="struct_n_v_g_s_d_k___group_view.html#acd4b8ee94ed3a76bd9b6e7e8afe355a2">tagsFilter</a> = tagFilter;</div><div class="line"> }</div><div class="line"></div><div class="line"> <a class="code" href="ihighlights_8h.html#ac6ee1cb402b4476571a79050f61bcd92">NVGSDK_Highlights_OpenSummaryAsync</a>(g_sdk, params, &handleSummaryOpened, params);</div></div><!-- fragment --> <p>The GfeSDK is composed of two parts, the client/app, and the backend/server. This distribution contains GfeSDK.dll which represents the client/app part. The end-user downloads GFE onto their machine. The GFE package includes the backend pieces necessary to support the calls coming from the client. See <a class="el" href="index.html#section_version">Versioning</a> for more information regarding this communication.</p> +<div class="fragment"></div><!-- fragment --> <h4>C API</h4> +<div class="fragment"></div><!-- fragment --> <h4>C++ Bindings</h4> +<div class="fragment"></div><!-- fragment --><div class="fragment"></div><!-- fragment --><div class="fragment"></div><!-- fragment --> <h4>C API</h4> +<div class="fragment"></div><!-- fragment --><div class="fragment"></div><!-- fragment --><div class="fragment"></div><!-- fragment --> <h4>C++ Bindings</h4> +<div class="fragment"></div><!-- fragment --> <h4>C API</h4> +<div class="fragment"></div><!-- fragment --> <p>The GfeSDK is composed of two parts, the client/app, and the backend/server. This distribution contains GfeSDK.dll which represents the client/app part. The end-user downloads GFE onto their machine. The GFE package includes the backend pieces necessary to support the calls coming from the client. See <a class="el" href="index.html#section_version">Versioning</a> for more information regarding this communication.</p> <p>Calls made will be serialized. Therefore, if the app makes two consecutive calls to NVGSDK_Highlights_OpenGroup and then either NVGSDK_Highlights_SetVideoHighlight or NVGSDK_Highlights_SetScreenshotHighlight, before receiving the callback from open group, the set highlight call will function normally. If open group succeeded, then the set highlights calls will succeed as well. If it failed, the set highlights calls will fail, as there will be no valid group to assign them to.</p> <p>All strings are to be provided in single-byte width, UTF-8 encoded.</p> <p>Because there are two different parts, and the client / user's machine may be mismatched at times, the game should be aware of the versioning system. It's GfeSDK's goal to make this as seamless as possible, but there could still be compatibility issues to be aware of.</p> @@ -125,7 +125,7 @@ Highlights Permission</div></div> <p>Most of the calls to GfeSDK are asynchronous. This is due to the client/server architecture described in <a class="el" href="index.html#section_concepts">Concepts</a>. For each asynchronous call, a callback and an opaque void* context are passed in as arguments. If the app does not care or desire to know what happens to the call, is it fine to pass in NULL. If the app does care, supply a callback of the proper type, and optionally a pointer as a context to receive back during the callback.</p> <p>The callbacks are properly typed. For callbacks that return nothing but the return value and context, a <a class="el" href="sdk__types_8h.html#a1c5cd84ed88c70462c360a7268eb95ac">NVGSDK_EmptyCallback</a> is passed in. For versions that do return data, a typed callback is passed in, such as <a class="el" href="sdk__types_8h.html#a25a1eb6d5c4697e50ebdebb500d0500e">NVGSDK_GetUILanguageCallback</a>.</p> <p>The callback will be called on one of three threads, depending on the situation. If <a class="el" href="struct_n_v_g_s_d_k___create_input_params.html#a0bd7568c1cb3fad975562055b4581195" title="Set to true to poll for asynchronous callbacks on an app thread. If false, callbacks will occur on a ...">NVGSDK_CreateInputParams::pollForCallbacks</a> is set to false during creation, the callback will always occur on a GfeSDK controller thread. If the app desires callback to occur on their own thread, true is passed in instead. In that case, the callback will occur on the thread that calls <a class="el" href="isdk_8h.html#af5beaa7808f8dfc4660f5a0d4f8bccb3">NVGSDK_Poll</a>. The exception is that during NVGSDK_Destroy, GfeSDK pushes out all remaining callbacks. If the app is awaiting any callbacks during this time, they will be called on the same thread that called NVGSDK_Destroy. Usually, this will be the same thread that calls NVGSDK_Poll, so it shouldn't cause any surprises, but it's something to be aware of. See <a class="el" href="index.html#section_threading">Threading</a> for more information</p> -<div class="fragment"><div class="line"> <span class="comment">// We are passing two arguments to this function, the function lambda, and a user context. In this case, we're passing</span></div><div class="line"> <span class="comment">// the 'this' pointer as the user context. This gets passed through unmodified for use in the callback function.</span></div><div class="line"> m_gfesdk->GetUILanguageAsync([<span class="keyword">this</span>](GfeSDK::NVGSDK_RetCode rc, <a class="code" href="struct_gfe_s_d_k_1_1_get_u_i_language_response.html">GfeSDK::GetUILanguageResponse</a> <span class="keyword">const</span>* response, <span class="keywordtype">void</span>* context) {</div><div class="line"> <span class="comment">// Passed this pointer through as context</span></div><div class="line"> HighlightsWrapper* thiz = <span class="keyword">reinterpret_cast<</span>HighlightsWrapper*<span class="keyword">></span>(context);</div><div class="line"></div><div class="line"> UpdateLastResultString(rc);</div><div class="line"> <span class="keywordflow">if</span> (GfeSDK::NVGSDK_SUCCEEDED(rc))</div><div class="line"> {</div><div class="line"> m_lastQueryResult = m_converter.from_bytes(response->cultureCode);</div><div class="line"> }</div><div class="line"> }, <span class="keyword">this</span>);</div></div><!-- fragment --><div class="fragment"><div class="line"> <span class="comment">// If the caller doesn't care about the return value, no need to pass callbacks</span></div><div class="line"> <a class="code" href="struct_gfe_s_d_k_1_1_highlight_close_group_params.html">GfeSDK::HighlightCloseGroupParams</a> params = { <span class="stringliteral">"GROUP_1"</span> };</div><div class="line"> m_highlights->CloseGroupAsync(params);</div></div><!-- fragment --><p> <b>Note:</b> There is currently a limitation in the GfeSDK backend that depends on game frames being rendered during certain API calls. Therefore, the game cannot block the render loop while awaiting an asynchronous callback. Doing so will result in a deadlock.</p> +<div class="fragment"></div><!-- fragment --><div class="fragment"></div><!-- fragment --><p> <b>Note:</b> There is currently a limitation in the GfeSDK backend that depends on game frames being rendered during certain API calls. Therefore, the game cannot block the render loop while awaiting an asynchronous callback. Doing so will result in a deadlock.</p> <p>In addition to the async callbacks that most of the APIs accept as an argument, the app can also register to recieve unsolicited notifications when certain events occur. For example, the app might want to know when the user can given / removed permission for recording video from the app, either through the permissions dialog, or via GFE3. See <a class="el" href="struct_n_v_g_s_d_k___create_input_params.html">NVGSDK_CreateInputParams</a> and <a class="el" href="sdk__types_8h.html#a41214fdc112a95d5fe8e760b0c562c59">NVGSDK_NotificationType</a></p> <p>This notification will get called on either the GfeSDK callback thread, or the thread that calls <a class="el" href="isdk_8h.html#af5beaa7808f8dfc4660f5a0d4f8bccb3">NVGSDK_Poll</a>, depending on params passed in to <a class="el" href="isdk_8h.html#a95b3999b5808922e29a36375c22014b8">NVGSDK_Create</a>. See <a class="el" href="index.html#section_threading">Threading</a> for more information.</p> <p>There are two different threading models that may be used. The model used depends on the value passed in to <a class="el" href="struct_n_v_g_s_d_k___create_input_params.html">NVGSDK_CreateInputParams</a></p> |