# ScreenCaptureParameters (/zh-CN/api-reference/rtc/unreal-cpp/class-screencaptureparameters) > For AI agents: see the complete documentation index at [llms.txt](/llms.txt). ```cpp struct ScreenCaptureParameters { VideoDimensions dimensions; int frameRate; int bitrate; bool captureMouseCursor; bool windowFocus; view_t *excludeWindowList; int excludeWindowCount; int highLightWidth; unsigned int highLightColor; bool enableHighLight; ScreenCaptureParameters() : dimensions(1920, 1080), frameRate(5), bitrate(STANDARD_BITRATE), captureMouseCursor(true), windowFocus(false), excludeWindowList(OPTIONAL_NULLPTR), excludeWindowCount(0), highLightWidth(0), highLightColor(0), enableHighLight(false) {} ScreenCaptureParameters(const VideoDimensions& d, int f, int b) : dimensions(d), frameRate(f), bitrate(b), captureMouseCursor(true), windowFocus(false), excludeWindowList(OPTIONAL_NULLPTR), excludeWindowCount(0), highLightWidth(0), highLightColor(0), enableHighLight(false) {} ScreenCaptureParameters(int width, int height, int f, int b) : dimensions(width, height), frameRate(f), bitrate(b), captureMouseCursor(true), windowFocus(false), excludeWindowList(OPTIONAL_NULLPTR), excludeWindowCount(0), highLightWidth(0), highLightColor(0), enableHighLight(false){} ScreenCaptureParameters(int width, int height, int f, int b, bool cur, bool fcs) : dimensions(width, height), frameRate(f), bitrate(b), captureMouseCursor(cur), windowFocus(fcs), excludeWindowList(OPTIONAL_NULLPTR), excludeWindowCount(0), highLightWidth(0), highLightColor(0), enableHighLight(false) {} ScreenCaptureParameters(int width, int height, int f, int b, view_t *ex, int cnt) : dimensions(width, height), frameRate(f), bitrate(b), captureMouseCursor(true), windowFocus(false), excludeWindowList(ex), excludeWindowCount(cnt), highLightWidth(0), highLightColor(0), enableHighLight(false) {} ScreenCaptureParameters(int width, int height, int f, int b, bool cur, bool fcs, view_t *ex, int cnt) : dimensions(width, height), frameRate(f), bitrate(b), captureMouseCursor(cur), windowFocus(fcs), excludeWindowList(ex), excludeWindowCount(cnt), highLightWidth(0), highLightColor(0), enableHighLight(false) {} }; ``` ## 属性 [#属性] 屏幕共享流的视频编码分辨率。详见 [VideoDimensions](/zh-CN/api-reference/rtc/unreal-cpp/class-videodimensions)。默认值为 1920 × 1080,即 2073600 像素。该像素值为计费标准。 当共享的屏幕分辨率宽高比与该值设置不一致时,SDK 按如下策略进行编码。假设 dimensions 设为 1920 × 1080: - 如果屏幕分辨率小于 dimensions,如 1000 × 1000,SDK 直接按 1000 × 1000 进行编码。 - 如果屏幕分辨率大于 dimensions,如 2000 × 1500,SDK 按屏幕分辨率的宽高比,即 4\:3,取 dimensions 以内的最大分辨率进行编码,即 1440 × 1080。 :::note 注: 在共享文档的场景(SCREEN_SCENARIO_DOCUMENT)下设置编码分辨率时,选择以下两种方式其中之一。 - 如果你需要最优的画质,建议将编码分辨率设置为与采集分辨率相同。 - 如果你希望在画质、带宽和系统性能之间达到相对平衡,则: - 当采集分辨率大于 1920 × 1080 时,建议编码分辨率不低于 1920 × 1080。 - 当采集分辨率低于 1920 × 1080 时,建议编码分辨率不低于 1280 × 720。 ::: 在 Windows 和 macOS 平台上,表示屏幕共享流的视频编码帧率。单位为 fps;默认值为 5,建议不要超过 15。 在 Windows 和 macOS 平台上,表示屏幕共享流的视频编码码率。单位为 Kbps;默认值为 0,表示 SDK 根据当前共享屏幕的分辨率计算出一个合理的值。 是否采集鼠标用于屏幕共享: - `true`:(默认)采集鼠标。 - `false`: 不采集鼠标。 调用 [startScreenCaptureByWindowId](/zh-CN/api-reference/rtc/unreal-cpp/video/screencapture#api_irtcengine_startscreencapturebywindowid) 方法共享窗口时,是否将该窗口前置: - `true`: 前置窗口。 - `false`:(默认)不前置窗口。 :::note 注: 由于 macOS 系统限制,设置该成员将窗口前置时,如果当前的应用存在多个窗口,只会将主窗口前置。 ::: 待屏蔽窗口的 ID 列表。调用 [startScreenCaptureByDisplayId](/zh-CN/api-reference/rtc/unreal-cpp/video/screencapture#api_irtcengine_startscreencapturebydisplayid) 开启屏幕共享时,你可以通过该参数屏蔽指定的窗口。你可以在调用 [updateScreenCaptureParameters](/zh-CN/api-reference/rtc/unreal-cpp/video/screencapture#api_irtcengine_updatescreencaptureparameters) 更新屏幕共享的配置参数时,通过该参数动态屏蔽指定的窗口。 (仅适用于 macOS 和 Windows)是否对共享的窗口或屏幕进行描边: - `true`: 描边。 - `false`: (默认)不描边。 :::note 注: 当你在共享窗口或屏幕的部分区域时,如果将该参数设置为 `true`,SDK 会对整个窗口或屏幕进行描边。 ::: (仅适用于 macOS 和 Windows) - 在 Windows 平台上,指描边的 ARGB 颜色。默认值为 0xFF8CBF26。 - 在 macOS 平台上,`COLOR_CLASS` 指 `NSColor`。 (仅适用于 macOS 和 Windows)描边的宽度 (px)。默认值为 5,取值范围为 (0,50]。 :::note 注: 该参数仅在 highLighted 设置为 `true` 时生效。 ::: 待屏蔽窗口的数量。 :::note 注: 在 Windows 平台上,该参数最大值不超过 24,如果超过该值,则屏蔽窗口功能失效。 :::