mirror of
https://github.com/Boof2015/prism.git
synced 2026-08-20 20:39:59 +02:00
initial commit for linux support
This commit is contained in:
+17
-8
@@ -1,14 +1,25 @@
|
||||
export type CaptureMode = 'system' | 'device'
|
||||
|
||||
export type CaptureBackendPolicy = 'auto' | 'native' | 'electron'
|
||||
|
||||
export type CaptureBackendKind =
|
||||
| 'electron-system'
|
||||
| 'electron-device'
|
||||
export type NativeSystemCaptureBackendKind =
|
||||
| 'native-macos'
|
||||
| 'native-windows'
|
||||
| 'native-linux'
|
||||
|
||||
export type CaptureBackendKind =
|
||||
| 'device-input'
|
||||
| NativeSystemCaptureBackendKind
|
||||
|
||||
export function resolveNativeBackendKind(platform: string): NativeSystemCaptureBackendKind {
|
||||
switch (platform) {
|
||||
case 'darwin':
|
||||
return 'native-macos'
|
||||
case 'win32':
|
||||
return 'native-windows'
|
||||
default:
|
||||
return 'native-linux'
|
||||
}
|
||||
}
|
||||
|
||||
export interface CaptureSourceDescriptor {
|
||||
id: string
|
||||
label: string
|
||||
@@ -25,8 +36,6 @@ export interface CaptureBackendSupportEntry {
|
||||
}
|
||||
|
||||
export interface CaptureBackendSupport {
|
||||
policyOptions: CaptureBackendPolicy[]
|
||||
nativeBackend: CaptureBackendSupportEntry
|
||||
electronSystem: CaptureBackendSupportEntry
|
||||
electronDevice: CaptureBackendSupportEntry
|
||||
deviceInput: CaptureBackendSupportEntry
|
||||
}
|
||||
|
||||
@@ -56,7 +56,15 @@ export type NativeWindowsCapturedChunk = NativeCapturedChunk
|
||||
export type NativeWindowsCaptureDrainResult = NativeCaptureDrainResult
|
||||
export type NativeWindowsCaptureAPI = NativeSystemCaptureAPI
|
||||
|
||||
export type NativeLinuxCaptureSupport = NativeCaptureSupport
|
||||
export type NativeLinuxCaptureSource = NativeCaptureSource
|
||||
export type NativeLinuxCaptureStartResult = NativeCaptureStartResult
|
||||
export type NativeLinuxCapturedChunk = NativeCapturedChunk
|
||||
export type NativeLinuxCaptureDrainResult = NativeCaptureDrainResult
|
||||
export type NativeLinuxCaptureAPI = NativeSystemCaptureAPI
|
||||
|
||||
export interface NativeCaptureAPI {
|
||||
macosCapture: NativeMacOSCaptureAPI
|
||||
windowsCapture: NativeWindowsCaptureAPI
|
||||
linuxCapture: NativeLinuxCaptureAPI
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user