Skip to main content

XAppCaptureReadLocalStream

Reads the contents of the .mp4 file generated by an earlier call to XAppCaptureRecordTimespan.

Syntax

Parameters

handle _In_
Type: XAppCaptureLocalStreamHandle
Handle to the local recording file that was created by XAppCaptureRecordTimespan earlier. startPosition _In_
Type: size_t
Start position in the stream. bytesToRead _In_
Type: uint32_t
Number of bytes to read. buffer _Out_writes_to_(bytesToRead, *bytesWritten)
Type: uint8_t *
The buffer to write the stream data to. bytesWritten _Out_
Type: uint32_t *
On function completion, contains the number of bytes written to the supplied buffer.

Return value

Type: HRESULT Function result.

Remarks

A maximum of two recordings can exist at once. On stream close, the file is deleted. When the game exits, recordings will automatically be deleted to prevent stale files. See XAppCaptureRecordTimespan on how to obtain XAppCaptureLocalResult.

Requirements

Header: XAppCapture.h Library: xgameruntime.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consoles

See also

XAppCapture members
Last modified on August 20, 2026