ScreenCaptureParameters
- Unity
更新时间不可用
屏幕共享的参数配置。
public class ScreenCaptureParameters
{
public ScreenCaptureParameters()
{
dimensions = new VideoDimensions(1920, 1080);
frameRate = 5;
bitrate = (int)BITRATE.STANDARD_BITRATE;
captureMouseCursor = true;
windowFocus = false;
excludeWindowList = new view_t[0];
excludeWindowCount = 0;
highLightWidth = 0;
highLightColor = 0;
enableHighLight = false;
}
public ScreenCaptureParameters(ref VideoDimensions d, int f, int b)
{
dimensions = new VideoDimensions(d.width, d.height);
frameRate = f;
bitrate = b;
captureMouseCursor = true;
windowFocus = false;
excludeWindowList = new view_t[0];
excludeWindowCount = 0;
highLightWidth = 0;
highLightColor = 0;
enableHighLight = false;
}
public ScreenCaptureParameters(int width, int height, int f, int b)
{
dimensions = new VideoDimensions(width, height);
frameRate = f;
bitrate = b;
captureMouseCursor = true;
windowFocus = false;
excludeWindowList = new view_t[0];
excludeWindowCount = 0;
highLightWidth = 0;
highLightColor = 0;
enableHighLight = false;
}
public ScreenCaptureParameters(int width, int height, int f, int b, bool cur, bool fcs)
{
dimensions = new VideoDimensions(width, height);
frameRate = f;
bitrate = b;
captureMouseCursor = cur;
windowFocus = fcs;
excludeWindowList = new view_t[0];
excludeWindowCount = 0;
highLightWidth = 0;
highLightColor = 0;
enableHighLight = false;
}
public ScreenCaptureParameters(int width, int height, int f, int b, view_t[] ex, int cnt)
{
dimensions = new VideoDimensions(width, height);
frameRate = f;
bitrate = b;
captureMouseCursor = true;
windowFocus = false;
excludeWindowList = ex;
excludeWindowCount = cnt;
highLightWidth = 0;
highLightColor = 0;
enableHighLight = false;
}
public ScreenCaptureParameters(int width, int height, int f, int b, bool cur, bool fcs, view_t[] ex, int cnt)
{
dimensions = new VideoDimensions(width, height);
frameRate = f;
bitrate = b;
captureMouseCursor = cur;
windowFocus = fcs;
excludeWindowList = ex;
excludeWindowCount = cnt;
highLightWidth = 0;
highLightColor = 0;
enableHighLight = false;
}
public VideoDimensions dimensions { set; get; }
public int frameRate { set; get; }
public int bitrate { set; get; }
public bool captureMouseCursor { set; get; }
public bool windowFocus { set; get; }
public view_t[] excludeWindowList { set; get; }
public int excludeWindowCount { set; get; }
public int highLightWidth { set; get; }
public uint highLightColor { set; get; }
public bool enableHighLight { set; get; }
};属性
| 参数名 | 描述 |
|---|---|
dimensions | 注: 在共享文档的场景(SCREEN_SCENARIO_DOCUMENT)下设置编码分辨率时,选择以下两种方式其中之一。
屏幕共享流的视频编码分辨率。详见 VideoDimensions。默认值为 1920 × 1080,即 2073600 像素。该像素值为计费标准。当共享的屏幕分辨率宽高比与该值设置不一致时,SDK 按如下策略进行编码。假设
|
frameRate | |
bitrate | |
captureMouseCursor | |
windowFocus | 注: 由于 macOS 系统限制,设置该成员将窗口前置时,如果当前的应用存在多个窗口,只会将主窗口前置。 调用 StartScreenCaptureByWindowId 方法共享窗口时,是否将该窗口前置:
|
excludeWindowList | 待屏蔽窗口的 ID 列表。调用 StartScreenCaptureByDisplayId 开启屏幕共享时,你可以通过该参数屏蔽指定的窗口。你可以在调用 UpdateScreenCaptureParameters 更新屏幕共享的配置参数时,通过该参数动态屏蔽指定的窗口。 |
enableHighLight | |
highLightColor | |
highLightWidth | |
excludeWindowCount |