XAppBroadcastRegisterIsAppBroadcastingChanged

Register an app broadcast status change event handler.

Syntax

HRESULT XAppBroadcastRegisterIsAppBroadcastingChanged(  
         XTaskQueueHandle queue,  
         void* context,  
         XAppBroadcastMonitorCallback* appBroadcastMonitorCallback,  
         XTaskQueueRegistrationToken* token  
)  

Parameters

queue   _In_opt_
Type: XTaskQueueHandle

Optional XTaskQueueHandle where a user can create their own callback to be executed from this queue.

context   _In_opt_
Type: void*

Optional information to be passed to the callback function.

appBroadcastMonitorCallback   _In_
Type: XAppBroadcastMonitorCallback*

Callback on the status of whether you can broadcast or not changes. Games may use this to know whether or not it is safe to enable showing the broadcast UI.

token   _Out_
Type: XTaskQueueRegistrationToken*

Broadcast token.

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.

Each call to AppBroadcastRegisterIsAppBroadcastingChanged should be followed by a call to XAppBroadcastUnregisterIsAppBroadcastingChanged when the event handler is no longer needed. Failing to call the unregister function will cause memory leaks to occur. This function will register a second function, the XAppBroadcastMonitorCallback, which will be called when the status of the app broadcast changed.

Requirements

Header: XAppCapture.h

Library: xgameruntime.lib

Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles

See also

GameDVR Overview
XAppCapture Members
XAppBroadcastUnregisterIsAppBroadcastingChanged
XAppBroadcastMonitorCallback