Improve screenshare performance
This commit is contained in:
@@ -4,6 +4,7 @@ import * as path from 'path';
|
||||
|
||||
export interface DesktopSettings {
|
||||
hardwareAcceleration: boolean;
|
||||
vaapiVideoEncode: boolean;
|
||||
}
|
||||
|
||||
export interface DesktopSettingsSnapshot extends DesktopSettings {
|
||||
@@ -12,7 +13,8 @@ export interface DesktopSettingsSnapshot extends DesktopSettings {
|
||||
}
|
||||
|
||||
const DEFAULT_DESKTOP_SETTINGS: DesktopSettings = {
|
||||
hardwareAcceleration: true
|
||||
hardwareAcceleration: true,
|
||||
vaapiVideoEncode: false
|
||||
};
|
||||
|
||||
export function getDesktopSettingsSnapshot(): DesktopSettingsSnapshot {
|
||||
@@ -38,6 +40,9 @@ export function readDesktopSettings(): DesktopSettings {
|
||||
const parsed = JSON.parse(raw) as Partial<DesktopSettings>;
|
||||
|
||||
return {
|
||||
vaapiVideoEncode: typeof parsed.vaapiVideoEncode === 'boolean'
|
||||
? parsed.vaapiVideoEncode
|
||||
: DEFAULT_DESKTOP_SETTINGS.vaapiVideoEncode,
|
||||
hardwareAcceleration: typeof parsed.hardwareAcceleration === 'boolean'
|
||||
? parsed.hardwareAcceleration
|
||||
: DEFAULT_DESKTOP_SETTINGS.hardwareAcceleration
|
||||
|
||||
Reference in New Issue
Block a user