-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
91 lines (81 loc) · 2.03 KB
/
index.d.ts
File metadata and controls
91 lines (81 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/**
* pan 水平旋转(全景)
* tilt 垂直旋转(倾斜)
* roll 旋转(滚动)
* zoom 缩放
* exposure 曝光
* iris 光圈
* focus 焦距
*/
export type TagCameraControlProperty =
| "Pan"
| "Tilt"
| "Roll"
| "Zoom"
| "Exposure"
| "Iris"
| "Focus";
/**
* brightness 亮度
* contrast 对比度
* hue 色调
* saturation 饱和度
* sharpness 锐度(清晰度)
* gamma 伽马
* color_enable 颜色使能
* white_balance 白平衡
* backlight_compensation 背光补偿
* gain 增益
*/
export type TagVideoProcAmpProperty =
| "Brightness"
| "Contrast"
| "Hue"
| "Saturation"
| "Sharpness"
| "Gamma"
| "ColorEnable"
| "WhiteBalance"
| "BacklightCompensation"
| "Gain";
export interface CameraSettingSetInfo {
prop: TagCameraControlProperty | TagVideoProcAmpProperty;
val: number;
isAuto?: boolean;
}
export interface CameraSettingInfo extends CameraSettingSetInfo {
min: number;
max: number;
step: number;
/** rangeFlags & 1 Auto; rangeFlags & 2 Auto Manual */
rangeFlags: number;
def: number;
ctrlType: "video" | "camera";
}
export interface Resolution {
width: number;
height: number;
type: string;
}
export function openCameraSettings(cameraName: string | number): Promise<void>;
export function closeCameraSettings(cameraName: string | number): Promise<void>;
export function closeCameraSettingsSync(cameraName: string | number): void;
export function getCameraSettings(
cameraName: string | number
): Promise<CameraSettingInfo[]>;
export function setCameraSettings(
cameraName: string | number,
settings: CameraSettingSetInfo[]
): Promise<void>;
export function getCameraResolutions(
cameraName: string | number
): Promise<Resolution[]>;
export class CameraSettings {
constructor(cameraName: string | number);
open(): Promise<void>;
close(): Promise<void>;
getSettings(): Promise<CameraSettingInfo[]>;
setSettings(settings: CameraSettingSetInfo[]): Promise<void>;
getResolutions(): Promise<Resolution[]>;
}
export function _getCacheCount(): number;