> ## 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.

# XAppCaptureGetVideoCaptureSettings

> XAppCaptureGetVideoCaptureSettings

# XAppCaptureGetVideoCaptureSettings

Queries the device's GameDVR settings that include encoding type, color format, resolution, maximum possible recording length, and whether the current user allows captures by games.

## Syntax

```cpp theme={null}
HRESULT XAppCaptureGetVideoCaptureSettings(
  XAppCaptureVideoCaptureSettings * userCaptureSettings
)
```

### Parameters

*userCaptureSettings* \_Out\_\
Type: XAppCaptureVideoCaptureSettings \*

On function return contains the device's GameDVR setting for capture resolution.

### Return value

Type: HRESULT

Function result.

## Remarks

The values returned by **XAppCaptureGetVideoCaptureSettings** can be changed by the user at any moment. Therefore, it is recommended that **XAppCaptureGetVideoCaptureSettings** is called right before calling [XAppCaptureRecordTimespan](/reference/system/xappcapture/functions/xappcapturerecordtimespan) in order to ensure the latest values are retrieved.

The [XAppCaptureVideoCaptureSettings](/reference/system/xappcapture/structs/xappcapturevideocapturesettings) struct can be obtained like so.

```cpp theme={null}
XAppCaptureVideoCaptureSettings captureSettings = { 0 };

if (SUCCEEDED(XAppCaptureGetVideoCaptureSettings(&captureSettings)))
{
    appLog.AddLog("Color Format: %s , encoding: %s, Width: %lu, Height %lu, Max RecordTimespan duration: %llu, Capture Permitted: %d\n",
        (captureSettings.colorFormat == XAppCaptureVideoColorFormat::SDR) ? "SDR" : "HDR",
        (captureSettings.encoding == XAppCaptureVideoEncoding::H264) ? "H264" : "HEVC",
        captureSettings.width,
        captureSettings.height,
        captureSettings.maxRecordTimespanDurationInMs,
        captureSettings.isCaptureByGamesAllowed);
}
```

## Requirements

**Header:** XAppCapture.h

**Library:** xgameruntime.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## See also

[XAppCapture members](/reference/system/xappcapture/xappcapture_members)


## Related topics

- [XAppCaptureVideoCaptureSettings](/reference/system/xappcapture/structs/xappcapturevideocapturesettings.md)
- [XAppCapture](/reference/system/xappcapture/xappcapture_members.md)
- [XAppCaptureVideoEncoding](/reference/system/xappcapture/enums/xappcapturevideoencoding.md)
- [XAppCaptureVideoColorFormat](/reference/system/xappcapture/enums/xappcapturevideocolorformat.md)
- [Video Capture (wdcapturesession.exe)](/tools/tools-pc/commandlinetools/gr-wdcapturesession.md)
