XGameStreamingGetLastFrameDisplayed

스트리밍 클라이언트 화면에 최근 표시된 프레임에 관한 프레임 파이프라인 토큰을 가져옵니다.

구문

HRESULT XGameStreamingGetLastFrameDisplayed(  
         XGameStreamingClientId client,  
         D3D12XBOX_FRAME_PIPELINE_TOKEN* framePipelineToken  
)  

매개 변수

client _In_
형식: XGameStreamingClientId

쿼리 중인 스트리밍 클라이언트 장치의 ID입니다.

framePipelineToken _Out_
형식: D3D12XBOX_FRAME_PIPELINE_TOKEN*

클라이언트 장치에 마지막으로 표시된 프레임 파이프라인 토큰입니다.

반환 값

형식: HRESULT

성공한 경우 S_OK를 반환하고, 그렇지 않으면 오류 코드를 반환합니다.

잠재적인 오류

오류 코드 오류 값 오류 발생 원인
E_GAMESTREAMING_NOT_INITIALIZED 0x89245400 XGameStreaming 런타임이 아직 초기화되지 않았습니다. 다른 API를 호출하기 전에 XGameStreamingInitialize를 호출합니다.
E_GAMESTREAMING_CLIENT_NOT_CONNECTED 0x89245401 지정된 클라이언트가 연결되어 있지 않습니다.
E_GAMESTREAMING_NO_DATA 0x89245402 요청한 데이터를 사용할 수 없습니다. 나중에 데이터를 사용할 수 있습니다.

주석

플레이어가 게임을 스트리밍하고 있는 경우 특정 프레임이 사용자 화면에 표시된 것을 확인한 후 게임 동작을 변경하려고 할 때 이 XGameStreamingGetLastFrameDisplayed을(를) 활용할 수 있습니다.

다음은 게임에서 이를 활용 하는 몇 가지 예입니다.

  • 시각적 타이머가 만료되었으며 만료되기 전에 플레이어가 아무런 조치도 하지 않았습니다.
  • 지정 창에서 작업을 수행하지 않았습니다.
  • 플레이어는 모션이 계속 범위를 벗어났는데 복구 조치를 취하지 않습니다.

XGameStreamingGetLastFrameDisplayed은(는) 작업이 수행되어야 하지만 수행되지 않은 시기를 확인할 때 사용합니다. 플레이어가 입력을 했을 때 표시되고 있는 내용을 게임이 확인하고 싶을 경우 게임은 XGameStreamingGetAssociatedFrame을 활용해야 합니다.

// In this example, when processing input, the game would like to pass along the last frame 
// that was being displayed to the player so that their simulation engine can take that into account.
 

// The framePipelineToken was initially captured at the callback of WaitFrameEventX

void Game::Update(DX::StepTimer const& timer)
{
    ...

    D3D12XBOX_FRAME_PIPELINE_TOKEN framePipelineToken = D3D12XBOX_FRAME_PIPELINE_TOKEN_NULL;
    if SUCCEEDED(XGameStreamingGetLastFrameDisplayed(clientId, &framePipelineToken)
    {
        SimulateBasedOnLastFrameDisplayed(framePipelineToken);
    }
    else 
    {
        // don't have last token, potentially simulate based on current frame

        SimulateBasedOnCurrentFrame();
    }

    
      
    ...
}

요구 사항

헤더: xgamestreaming.h

라이브러리: xgameruntime.lib

지원되는 플랫폼: Windows, Xbox One 패밀리 콘솔 및 Xbox Series 콘솔

참고 항목

XGameStreamingGetAssociatedFrame
XGameStreaming
게임 스트리밍 대기시간 보정 개요