AppCaptureRegisterMetadataPurged
Register an event handler for meta data purge events.
Syntax
HRESULT XAppCaptureRegisterMetadataPurged(
XTaskQueueHandle queue,
void* context,
XAppCaptureMetadataPurgedCallback* callback,
XTaskQueueRegistrationToken* token
)
Parameters
queue _In_opt_
Type: XTaskQueueHandle
Async queue to handle asynchronous work. If not assigned a default async queue will be created.
context _In_
Type: void*
Information to be passed to the callback function. Usually the calling object.
callback _In_
Type: XAppCaptureMetadataPurgedCallback*
Callback function to be called after the asynchronous work is finished.
token _Out_
Type: XTaskQueueRegistrationToken*
Token identifying the event handler.
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.
Because historical app capture is supported, the system accumulates metadata written with AppCaptureMetadataWriter even when not actively capturing or broadcasting. When, for example, a capture of the previous 30 seconds is written to a video file on disk, the metadata associated with the recorded time window is included in the file. The system imposes a limit on the storage space that is allocated per app for storing accumulated metadata. You can get the currently available storage space by checking the RemainingStorageBytesAvailable property.
When the all of the allotted space has been filled, the system will begin purging metadata using the XAppCaptureMetadataPriority value, specified when the metadata items were written, and the age of each item in order to delete the oldest, least important data first. When this occurs, the MetadataPurged event is raised. In response to this event, you may choose to reduce the amount of metadata your app is writing, but this is not required.
Requirements
Header: XAppCapture.h
Library: xgameruntime.lib
Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles
See also
GameDVR Overview
XAppCapture Members
XAppCaptureUnRegisterMetadataPurged