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

# XAppCapture

> XAppCapture

# XAppCapture

XBOX 和桌面平台都包含原生廣播體驗，各自有關於使用者可以廣播哪些應用程式的規則。這些 API 可讓開發人員開啟廣播 UI，並偵測使用者何時正在廣播。應用程式開發人員可以提供中繼資料事件和狀態，以便與擷取的影片和音訊檔案/資料流一起儲存或廣播。

## 函式

| 函式 | 描述 |
| - | - |
| [XAppBroadcastGetStatus](/zh-TW/reference/system/xappcapture/functions/xappbroadcastgetstatus) | 擷取裝置和目前應用程式的目前廣播狀態。 |
| [XAppBroadcastIsAppBroadcasting](/zh-TW/reference/system/xappcapture/functions/xappbroadcastisappbroadcasting) | 判斷應用程式目前是否正在廣播。 |
| [XAppBroadcastMonitorCallback](/zh-TW/reference/system/xappcapture/functions/xappbroadcastmonitorcallback) | 設定 [XAppBroadcastRegisterIsAppBroadcastingChanged](/zh-TW/reference/system/xappcapture/functions/xappbroadcastregisterisappbroadcastingchanged) 的回呼函式。每次廣播狀態變更時，都會呼叫此處設定的函式。 |
| [XAppBroadcastRegisterIsAppBroadcastingChanged](/zh-TW/reference/system/xappcapture/functions/xappbroadcastregisterisappbroadcastingchanged) | 註冊應用程式廣播狀態變更事件處理常式。 |
| [XAppBroadcastShowUI](/zh-TW/reference/system/xappcapture/functions/xappbroadcastshowui) | 向應用程式使用者顯示廣播 UI，讓他們可以開始廣播活動。 |
| [XAppBroadcastUnregisterIsAppBroadcastingChanged](/zh-TW/reference/system/xappcapture/functions/xappbroadcastunregisterisappbroadcastingchanged) | 移除應用程式廣播狀態變更事件處理常式。 |
| [XAppCaptureCancelUserRecord](/zh-TW/reference/system/xappcapture/functions/xappcapturecanceluserrecord) | 停止並刪除透過 [XAppCaptureStartUserRecord](/zh-TW/reference/system/xappcapture/functions/xappcapturestartuserrecord) 開始並由輸入的識別碼指定的進行中 GameDVR 使用者錄製。 |
| [XAppCaptureCloseLocalStream](/zh-TW/reference/system/xappcapture/functions/xappcapturecloselocalstream) | 關閉並刪除指定的錄製資料流。 |
| [XAppCaptureCloseScreenshotStream](/zh-TW/reference/system/xappcapture/functions/xappcaptureclosescreenshotstream) | 關閉螢幕擷取畫面資料流。 |
| [XAppCaptureDisableRecord](/zh-TW/reference/system/xappcapture/functions/xappcapturedisablerecord) | 停用玩家的影片錄製。 |
| [XAppCaptureEnableRecord](/zh-TW/reference/system/xappcapture/functions/xappcaptureenablerecord) | 為目前使用者啟用錄製/螢幕擷取畫面。 |
| [XAppCaptureGetVideoCaptureSettings](/zh-TW/reference/system/xappcapture/functions/xappcapturegetvideocapturesettings) | 查詢裝置的 GameDVR 設定，包括編碼類型、色彩格式、解析度、可能的最大錄製長度，以及目前使用者是否允許遊戲進行擷取。 |
| [XAppCaptureMetadataAddDoubleEvent](/zh-TW/reference/system/xappcapture/functions/xappcapturemetadataadddoubleevent) | 將具有 double 值的中繼資料事件新增至您的應用程式擷取。 |
| [XAppCaptureMetadataAddInt32Event](/zh-TW/reference/system/xappcapture/functions/xappcapturemetadataaddint32event) | 將具有 Int32 值的中繼資料事件新增至您的應用程式擷取。 |
| [XAppCaptureMetadataAddStringEvent](/zh-TW/reference/system/xappcapture/functions/xappcapturemetadataaddstringevent) | 將具有字串值的中繼資料事件新增至您的應用程式擷取。 |
| [XAppCaptureMetadataPurgedCallback](/zh-TW/reference/system/xappcapture/functions/xappcapturemetadatapurgedcallback) | 設定發生中繼資料清除時要呼叫的回呼函式。 |
| [XAppCaptureMetadataRemainingStorageBytesAvailable](/zh-TW/reference/system/xappcapture/functions/xappcapturemetadataremainingstoragebytesavailable) | 傳回應用程式擷取中繼資料的剩餘可用儲存空間。以位元組為單位。 |
| [XAppCaptureMetadataStartDoubleState](/zh-TW/reference/system/xappcapture/functions/xappcapturemetadatastartdoublestate) | 將具有 double 值的中繼資料狀態新增至您的應用程式擷取。 |
| [XAppCaptureMetadataStartInt32State](/zh-TW/reference/system/xappcapture/functions/xappcapturemetadatastartint32state) | 將具有 Int32 值的中繼資料狀態新增至您的應用程式擷取。 |
| [XAppCaptureMetadataStartStringState](/zh-TW/reference/system/xappcapture/functions/xappcapturemetadatastartstringstate) | 將具有字串值的中繼資料狀態新增至您的應用程式擷取。 |
| [XAppCaptureMetadataStopAllStates](/zh-TW/reference/system/xappcapture/functions/xappcapturemetadatastopallstates) | 停止目前作用中的所有狀態事件。 |
| [XAppCaptureMetadataStopState](/zh-TW/reference/system/xappcapture/functions/xappcapturemetadatastopstate) | 將特定具名狀態的狀態停止新增至應用程式擷取中繼資料。 |
| [XAppCaptureOpenScreenshotStream](/zh-TW/reference/system/xappcapture/functions/xappcaptureopenscreenshotstream) | 開啟螢幕擷取畫面資料流。 |
| [XAppCaptureReadLocalStream](/zh-TW/reference/system/xappcapture/functions/xappcapturereadlocalstream) | 讀取先前呼叫 [XAppCaptureRecordTimespan](/zh-TW/reference/system/xappcapture/functions/xappcapturerecordtimespan) 所產生之 .mp4 檔案的內容。 |
| [XAppCaptureReadScreenshotStream](/zh-TW/reference/system/xappcapture/functions/xappcapturereadscreenshotstream) | 讀取螢幕擷取畫面資料流。 |
| [XAppCaptureRecordDiagnosticClip](/zh-TW/reference/system/xappcapture/functions/xappcapturerecorddiagnosticclip) | 從您的應用程式錄製診斷剪輯。 |
| [XAppCaptureRecordTimespan](/zh-TW/reference/system/xappcapture/functions/xappcapturerecordtimespan) | 進行 GameDVR 錄製。 |
| [XAppCaptureRegisterMetadataPurged](/zh-TW/reference/system/xappcapture/functions/xappcaptureregistermetadatapurged) | 註冊中繼資料清除事件的事件處理常式。 |
| [XAppCaptureStartUserRecord](/zh-TW/reference/system/xappcapture/functions/xappcapturestartuserrecord) | 以如同使用者觸發的方式開始錄製。 |
| [XAppCaptureStopUserRecord](/zh-TW/reference/system/xappcapture/functions/xappcapturestopuserrecord) | 停止並儲存透過 [XAppCaptureStartUserRecord](/zh-TW/reference/system/xappcapture/functions/xappcapturestartuserrecord) 開始並由輸入的識別碼指定的進行中使用者錄製。 |
| [XAppCaptureTakeDiagnosticScreenshot](/zh-TW/reference/system/xappcapture/functions/xappcapturetakediagnosticscreenshot) | 從您的應用程式擷取診斷螢幕擷取畫面。 |
| [XAppCaptureTakeScreenshot](/zh-TW/reference/system/xappcapture/functions/xappcapturetakescreenshot) | 擷取螢幕擷取畫面。 |
| [XAppCaptureUnRegisterMetadataPurged](/zh-TW/reference/system/xappcapture/functions/xappcaptureunregistermetadatapurged) | 移除中繼資料清除事件的事件處理常式。 |

## 結構

| 結構 | 描述 |
| - | - |
| [XAppBroadcastStatus](/zh-TW/reference/system/xappcapture/structs/xappbroadcaststatus) | 描述應用程式/遊戲的廣播功能狀態。 |
| [XAppCaptureDiagnosticScreenshotResult](/zh-TW/reference/system/xappcapture/structs/xappcapturediagnosticscreenshotresult) | 應用程式擷取的螢幕擷取畫面和描述性資訊。 |
| [XAppCaptureLocalResult](/zh-TW/reference/system/xappcapture/structs/xappcapturelocalresult) | 包含呼叫 XAppCaptureRecordTimespan 的結果。 |
| [XAppCaptureRecordClipResult](/zh-TW/reference/system/xappcapture/structs/xappcapturerecordclipresult) | 擷取的影片剪輯和描述性資訊。 |
| [XAppCaptureScreenshotFile](/zh-TW/reference/system/xappcapture/structs/xappcapturescreenshotfile) | 擷取的螢幕擷取畫面和描述性資訊。 |
| [XAppCaptureScreenshotStream](/zh-TW/reference/system/xappcapture/structs/xappcapturescreenshotstream) | 代表螢幕擷取畫面資料流。 |
| [XAppCaptureTakeScreenshotResult](/zh-TW/reference/system/xappcapture/structs/xappcapturetakescreenshotresult) | 代表擷取螢幕擷取畫面的結果。 |
| [XAppCaptureUserRecordingResult](/zh-TW/reference/system/xappcapture/structs/xappcaptureuserrecordingresult) | 包含呼叫 [XAppCaptureStopUserRecord](/zh-TW/reference/system/xappcapture/functions/xappcapturestopuserrecord) 的結果。 |
| [XAppCaptureVideoCaptureSettings](/zh-TW/reference/system/xappcapture/structs/xappcapturevideocapturesettings) | GameDVR 影片擷取設定。 |

## 列舉

| 列舉 | 描述 |
| - | - |
| [XAppCaptureMetadataPriority](/zh-TW/reference/system/xappcapture/enums/xappcapturemetadatapriority) | 應用程式擷取中繼資料的優先順序層級。用於在實施儲存空間限制且必須刪除某些中繼資料時，判斷哪些資料最重要。 |
| [XAppCaptureScreenshotFormatFlag](/zh-TW/reference/system/xappcapture/enums/xappcapturescreenshotformatflag) | 決定螢幕擷取畫面的畫質。 |
| [XAppCaptureVideoColorFormat](/zh-TW/reference/system/xappcapture/enums/xappcapturevideocolorformat) | GameDVR 錄製中使用的色彩格式。 |
| [XAppCaptureVideoEncoding](/zh-TW/reference/system/xappcapture/enums/xappcapturevideoencoding) | 決定影片擷取的影片編碼類型。 |

## 概念文件

* [Game DVR 和廣播](/zh-TW/build/console-features/game-dvr/gamedvr-broadcast)
* [時間敏感執行緒](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)
* [什麼是 Microsoft Game Development Kit？](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/intro/introduction)
* [在 Unity 專案中使用 GDK API 的 C# 包裝函式](/zh-TW/build/gdk-and-engines/unity/unity-api-wrappers)

## 另請參閱

[XAppCapture 錯誤碼](/zh-TW/reference/system/xappcapture/xappcapture_errors)\
[系統 API 參考](/zh-TW/reference/system/gc-reference-system-toc)


## Related topics

- [XAppCapture](/reference/system/xappcapture/xappcapture_members.md)
- [XAppCapture Error Codes](/reference/system/xappcapture/xappcapture_errors.md)
- [XAppCapture 오류 코드](/ko/reference/system/xappcapture/xappcapture_errors.md)
- [XAppCaptureVideoCaptureSettings](/reference/system/xappcapture/structs/xappcapturevideocapturesettings.md)
- [Códigos de error de XAppCapture](/es/reference/system/xappcapture/xappcapture_errors.md)
