> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XGameStreamingGetStreamPhysicalDimensions

> XGameStreamingGetStreamPhysicalDimensions

# XGameStreamingGetStreamPhysicalDimensions

스트리밍 클라이언트에서 렌더링되는 비디오 스트림의 물리적 크기를 가져옵니다.

<a id="syntaxSection" />

## 구문

```cpp theme={null}
HRESULT XGameStreamingGetStreamPhysicalDimensions(
         XGameStreamingClientId client,
         uint32_t* horizontalMm,
         uint32_t* verticalMm
)
```

<a id="parametersSection" />

### 매개 변수

*client*   \_In\_\
형식: XGameStreamingClientId

물리적 크기를 쿼리 대상 클라이언트입니다.

*horizontalMm*   \_Out\_\
형식: uint32\_t\*

비디오 스트림의 가로 축 크기(밀리미터 단위)입니다.

*verticalMm*   \_Out\_\
형식: uint32\_t\*

비디오 스트림의 세로 축 크기(밀리미터 단위)입니다.

<a id="retvalSection" />

### 반환 값

형식: HRESULT

성공하면 **S\_OK**를 반환하고, 그렇지 않으면 오류 코드를 반환합니다.

**잠재적 오류**

| 오류 코드                                    | 오류 값       | 오류 원인                                                                                                                                                    |
| ---------------------------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| E\_GAMESTREAMING\_NOT\_INITIALIZED       | 0x89245400 | XGameStreaming 런타임이 초기화되지 않았습니다. 다른 API를 호출하기 전에 [XGameStreamingInitialize](/reference/system/xgamestreaming/functions/xgamestreaminginitialize)를 호출하세요. |
| E\_GAMESTREAMING\_CLIENT\_NOT\_CONNECTED | 0x89245401 | 지정한 클라이언트가 연결되어 있지 않습니다.                                                                                                                                 |
| E\_GAMESTREAMING\_NO\_DATA               | 0x89245402 | 요청한 데이터를 사용할 수 없습니다. 데이터는 나중에 사용할 수 있게 될 수 있습니다.                                                                                                         |

오류 코드 목록은 [오류 코드](/reference/errorcodes)를 참조하세요.

<a id="remarksSection" />

## 설명

이 메서드를 사용하여 스트림이 더 작은 장치(예: 스마트폰)로 전송되는지 여부를 판단할 수 있습니다.

이를 통해 장치 크기에 따라 플레이어에게 더 친화적이고 장치에 적합한 환경(예: 더 큰 글꼴 크기 사용)을 제공할 수 있습니다.

게임이 스트림의 물리적 크기 변경에 반응하도록 하려면 [XGameStreamingRegisterClientPropertiesChanged](/reference/system/xgamestreaming/functions/xgamestreamingregisterclientpropertieschanged)를 통해 콜백을 등록해야 합니다.

<a id="exampleSection" />

## 예제

다음 코드 예제는 `XGameStreamingGetStreamPhysicalDimensions` 함수를 사용하여 스트리밍 클라이언트 중 가장 작은 크기를 찾는 방법을 보여줍니다.

```cpp theme={null}
void GetSmallestStreamingClient(uint32_t& widthMm, uint32_t& heightMm)
    {
        // If we don't know what the smallest client is, then search through them to find it
        if (m_smallestClient == XGameStreamingNullClientId)
        {
            for (const auto client : m_streamingClients)
            {
                if (client.clientId != XGameStreamingNullClientId)
                {
                    uint32_t clientWidthMm = 0;
                    uint32_t clientHeightMm = 0;
                    if (SUCCEEDED(XGameStreamingGetStreamPhysicalDimensions(client.clientId, &clientWidthMm, &clientHeightMm)))
                    {
                        if (clientWidthMm < m_smallestClientWidthMm)
                        {
                            m_smallestClientWidthMm = clientWidthMm;
                            m_smallestClientHeightMm = clientHeightMm;
                        }
                    }
                }
            }
        }

        widthMm = m_smallestClientWidthMm;
        heightMm = m_smallestClientHeightMm;
    }
```

<a id="requirementsSection" />

## 요구 사항

**헤더:** xgamestreaming.h

**라이브러리:** xgameruntimelib

**지원 플랫폼:** Windows, XBOX One 계열 콘솔 및 XBOX Series 콘솔

<a id="seealsoSection" />

## 함께 보기

[XGameStreaming](/reference/system/xgamestreaming/xgamestreaming_members)\
[XGameStreamingRegisterClientPropertiesChanged](/reference/system/xgamestreaming/functions/xgamestreamingregisterclientpropertieschanged)\
[XGameStreaming](/reference/system/xgamestreaming/xgamestreaming_members#ClientProperties)


## Related topics

- [XBOX Game Streaming을 위한 게임 최적화](/ko/build/core-features/common/game-streaming/game-streaming-optimizing-your-game.md)
- [XGameStreamingClientProperty](/ko/reference/system/xgamestreaming/enums/xgamestreamingclientproperty.md)
- [XAG 101: 텍스트 표시](/ko/build/game-principles/accessibility/xag-deep-dives/xag-101-text-display.md)
- [XGameStreaming](/ko/reference/system/xgamestreaming/xgamestreaming_members.md)
- [XGameStreamingGetStreamAddedLatency](/ko/reference/system/xgamestreaming/functions/xgamestreaminggetstreamaddedlatency.md)
