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

# XAppCaptureMetadataStartInt32State

> XAppCaptureMetadataStartInt32State

# XAppCaptureMetadataStartInt32State

Add a metadata state with an Int32 value to your app capture.

## Syntax

```cpp theme={null}
HRESULT XAppCaptureMetadataStartInt32State(  
         const char* name,  
         int32_t value,  
         XAppCaptureMetadataPriority priority  
)  
```

### Parameters

*name*   \_In\_z\_\
Type: char\*

Name of the state being added to the app capture timeline.

*value*   \_In\_\
Type: int32\_t

Value of the state being added to the timeline. Must be an Int32.

*priority*   \_In\_\
Type: [XAppCaptureMetadataPriority](/reference/system/xappcapture/enums/xappcapturemetadatapriority)

Priority of the metadata. Used to determine what is saved in the case that storage limiters are exceeded. A member of the [XAppCaptureMetaDataPriority](/reference/system/xappcapture/enums/xappcapturemetadatapriority) enumeration.

### Return value

Type: HRESULT

Function result.

## Remarks

<Note>This function isn't safe to call on a time-sensitive thread. For more information, see [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads).</Note>

The system associates a metadata state with the window of time between when the state is started and when it's value is changed or the state is stopped with a call to [XAppCaptureMetaDataStopAllStates](/reference/system/xappcapture/functions/xappcapturemetadatastopallstates). This metadata is used to identify events during live streams, and captured playback to categorize and search content. To store an integer value that applies to an instantaneous moment in time, use [XAppCaptureMetaDataAddInt32Event](/reference/system/xappcapture/functions/xappcapturemetadataaddint32event).

<Warning>Metadata may be uploaded to XBOX Live and/or saved to .mp4 files, screenshots or used during broadcast, as such, private user info should never be logged with meta data.</Warning>

## Requirements

**Header:** XAppCapture.h

**Library:** xgameruntime.lib

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

## Conceptual documentation

* [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## See also

[GameDVR Overview](/build/console-features/game-dvr/gamedvr-broadcast)\
[XAppCapture Members](/reference/system/xappcapture/xappcapture_members)


## Related topics

- [XAppCaptureMetadataStopState](/reference/system/xappcapture/functions/xappcapturemetadatastopstate.md)
- [XAppCapture](/reference/system/xappcapture/xappcapture_members.md)
- [Unity C# API wrappers for the GDK](/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XAppCaptureMetadataAddInt32Event](/reference/system/xappcapture/functions/xappcapturemetadataaddint32event.md)
- [AppCaptureMetadataStartStringState](/reference/system/xappcapture/functions/xappcapturemetadatastartstringstate.md)
