@yume-chan/scrcpy 0.0.16 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +36 -3
- package/CHANGELOG.md +21 -4
- package/LICENSE +1 -1
- package/README.md +291 -37
- package/bin/scrcpy-server +0 -0
- package/bin/version.d.ts +1 -1
- package/bin/version.js +1 -1
- package/esm/adb/client.d.ts +41 -0
- package/esm/adb/client.d.ts.map +1 -0
- package/esm/adb/client.js +243 -0
- package/esm/adb/client.js.map +1 -0
- package/esm/adb/connection.d.ts +47 -0
- package/esm/adb/connection.d.ts.map +1 -0
- package/esm/{connection.js → adb/connection.js} +35 -31
- package/esm/adb/connection.js.map +1 -0
- package/esm/adb/index.d.ts +4 -0
- package/esm/adb/index.d.ts.map +1 -0
- package/esm/adb/index.js +4 -0
- package/esm/adb/index.js.map +1 -0
- package/esm/adb/options/1_16.d.ts +8 -0
- package/esm/adb/options/1_16.d.ts.map +1 -0
- package/esm/adb/options/1_16.js +20 -0
- package/esm/adb/options/1_16.js.map +1 -0
- package/esm/adb/options/1_22.d.ts +8 -0
- package/esm/adb/options/1_22.d.ts.map +1 -0
- package/esm/adb/options/1_22.js +17 -0
- package/esm/adb/options/1_22.js.map +1 -0
- package/esm/adb/options/index.d.ts +4 -0
- package/esm/adb/options/index.d.ts.map +1 -0
- package/esm/adb/options/index.js +4 -0
- package/esm/adb/options/index.js.map +1 -0
- package/esm/adb/options/types.d.ts +24 -0
- package/esm/adb/options/types.d.ts.map +1 -0
- package/esm/adb/options/types.js +37 -0
- package/esm/adb/options/types.js.map +1 -0
- package/esm/codec.js +2 -2
- package/esm/codec.js.map +1 -1
- package/esm/control/back-or-screen-on.d.ts +3 -0
- package/esm/control/back-or-screen-on.d.ts.map +1 -0
- package/esm/control/back-or-screen-on.js +2 -0
- package/esm/control/back-or-screen-on.js.map +1 -0
- package/esm/control/hover-helper.d.ts +18 -0
- package/esm/control/hover-helper.d.ts.map +1 -0
- package/esm/control/hover-helper.js +44 -0
- package/esm/control/hover-helper.js.map +1 -0
- package/esm/control/index.d.ts +12 -0
- package/esm/control/index.d.ts.map +1 -0
- package/esm/control/index.js +12 -0
- package/esm/control/index.js.map +1 -0
- package/esm/control/inject-keycode.d.ts +61 -0
- package/esm/control/inject-keycode.d.ts.map +1 -0
- package/esm/control/inject-keycode.js +62 -0
- package/esm/control/inject-keycode.js.map +1 -0
- package/esm/control/inject-scroll.d.ts +3 -0
- package/esm/control/inject-scroll.d.ts.map +1 -0
- package/esm/control/inject-scroll.js +2 -0
- package/esm/control/inject-scroll.js.map +1 -0
- package/esm/control/inject-text.d.ts +9 -0
- package/esm/control/inject-text.d.ts.map +1 -0
- package/esm/control/inject-text.js +7 -0
- package/esm/control/inject-text.js.map +1 -0
- package/esm/control/inject-touch.d.ts +38 -0
- package/esm/control/inject-touch.d.ts.map +1 -0
- package/esm/control/inject-touch.js +63 -0
- package/esm/control/inject-touch.js.map +1 -0
- package/esm/control/rotate-device.d.ts +7 -0
- package/esm/control/rotate-device.d.ts.map +1 -0
- package/esm/control/rotate-device.js +5 -0
- package/esm/control/rotate-device.js.map +1 -0
- package/esm/control/serializer.d.ts +34 -0
- package/esm/control/serializer.d.ts.map +1 -0
- package/esm/control/serializer.js +79 -0
- package/esm/control/serializer.js.map +1 -0
- package/esm/control/set-clipboard.d.ts +3 -0
- package/esm/control/set-clipboard.d.ts.map +1 -0
- package/esm/control/set-clipboard.js +2 -0
- package/esm/control/set-clipboard.js.map +1 -0
- package/esm/control/set-screen-power-mode.d.ts +12 -0
- package/esm/control/set-screen-power-mode.d.ts.map +1 -0
- package/esm/control/set-screen-power-mode.js +12 -0
- package/esm/control/set-screen-power-mode.js.map +1 -0
- package/esm/control/type.d.ts +15 -0
- package/esm/control/type.d.ts.map +1 -0
- package/esm/control/type.js +19 -0
- package/esm/control/type.js.map +1 -0
- package/esm/device-message/ack-clipboard.d.ts +9 -0
- package/esm/device-message/ack-clipboard.d.ts.map +1 -0
- package/esm/device-message/ack-clipboard.js +6 -0
- package/esm/device-message/ack-clipboard.js.map +1 -0
- package/esm/device-message/clipboard.d.ts +10 -0
- package/esm/device-message/clipboard.d.ts.map +1 -0
- package/esm/device-message/clipboard.js +7 -0
- package/esm/device-message/clipboard.js.map +1 -0
- package/esm/device-message/index.d.ts +5 -0
- package/esm/device-message/index.d.ts.map +1 -0
- package/esm/device-message/index.js +5 -0
- package/esm/device-message/index.js.map +1 -0
- package/esm/device-message/stream.d.ts +8 -0
- package/esm/device-message/stream.d.ts.map +1 -0
- package/esm/device-message/stream.js +20 -0
- package/esm/device-message/stream.js.map +1 -0
- package/esm/device-message/type.d.ts +5 -0
- package/esm/device-message/type.d.ts.map +1 -0
- package/esm/device-message/type.js +7 -0
- package/esm/device-message/type.js.map +1 -0
- package/esm/index.d.ts +3 -6
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +3 -6
- package/esm/index.js.map +1 -1
- package/esm/options/1_16/codec-options.d.ts +20 -0
- package/esm/options/1_16/codec-options.d.ts.map +1 -0
- package/esm/options/1_16/codec-options.js +26 -0
- package/esm/options/1_16/codec-options.js.map +1 -0
- package/esm/options/1_16/h264-configuration.d.ts +49 -0
- package/esm/options/1_16/h264-configuration.d.ts.map +1 -0
- package/esm/options/1_16/h264-configuration.js +414 -0
- package/esm/options/1_16/h264-configuration.js.map +1 -0
- package/esm/options/1_16/index.d.ts +4 -110
- package/esm/options/1_16/index.d.ts.map +1 -1
- package/esm/options/1_16/index.js +4 -226
- package/esm/options/1_16/index.js.map +1 -1
- package/esm/options/1_16/options.d.ts +94 -0
- package/esm/options/1_16/options.d.ts.map +1 -0
- package/esm/options/1_16/options.js +190 -0
- package/esm/options/1_16/options.js.map +1 -0
- package/esm/options/1_16/scroll.d.ts +27 -0
- package/esm/options/1_16/scroll.d.ts.map +1 -0
- package/esm/options/1_16/scroll.js +56 -0
- package/esm/options/1_16/scroll.js.map +1 -0
- package/esm/options/1_16/sps.d.ts +1 -1
- package/esm/options/1_16/sps.d.ts.map +1 -1
- package/esm/options/1_16/sps.js +25 -17
- package/esm/options/1_16/sps.js.map +1 -1
- package/esm/options/1_18.d.ts +8 -8
- package/esm/options/1_18.d.ts.map +1 -1
- package/esm/options/1_18.js +7 -7
- package/esm/options/1_18.js.map +1 -1
- package/esm/options/1_21.d.ts +13 -2
- package/esm/options/1_21.d.ts.map +1 -1
- package/esm/options/1_21.js +14 -3
- package/esm/options/1_21.js.map +1 -1
- package/esm/options/1_22/index.d.ts +3 -0
- package/esm/options/1_22/index.d.ts.map +1 -0
- package/esm/options/1_22/index.js +3 -0
- package/esm/options/1_22/index.js.map +1 -0
- package/esm/options/1_22/options.d.ts +29 -0
- package/esm/options/1_22/options.d.ts.map +1 -0
- package/esm/options/1_22/options.js +26 -0
- package/esm/options/1_22/options.js.map +1 -0
- package/esm/options/1_22/scroll.d.ts +17 -0
- package/esm/options/1_22/scroll.d.ts.map +1 -0
- package/esm/options/1_22/scroll.js +15 -0
- package/esm/options/1_22/scroll.js.map +1 -0
- package/esm/options/1_23.d.ts +5 -5
- package/esm/options/1_23.d.ts.map +1 -1
- package/esm/options/1_23.js +7 -6
- package/esm/options/1_23.js.map +1 -1
- package/esm/options/1_24.d.ts +1 -1
- package/esm/options/1_24.d.ts.map +1 -1
- package/esm/options/1_24.js.map +1 -1
- package/esm/options/1_25/index.d.ts +3 -0
- package/esm/options/1_25/index.d.ts.map +1 -0
- package/esm/options/1_25/index.js +3 -0
- package/esm/options/1_25/index.js.map +1 -0
- package/esm/options/1_25/options.d.ts +6 -0
- package/esm/options/1_25/options.d.ts.map +1 -0
- package/esm/options/1_25/options.js +8 -0
- package/esm/options/1_25/options.js.map +1 -0
- package/esm/options/1_25/scroll.d.ts +19 -0
- package/esm/options/1_25/scroll.d.ts.map +1 -0
- package/esm/options/1_25/scroll.js +33 -0
- package/esm/options/1_25/scroll.js.map +1 -0
- package/esm/options/index.d.ts +5 -4
- package/esm/options/index.d.ts.map +1 -1
- package/esm/options/index.js +5 -4
- package/esm/options/index.js.map +1 -1
- package/esm/options/types.d.ts +47 -0
- package/esm/options/types.d.ts.map +1 -0
- package/esm/options/types.js +18 -0
- package/esm/options/types.js.map +1 -0
- package/package.json +32 -25
- package/scripts/fetch-server.cjs +19 -9
- package/src/adb/client.ts +345 -0
- package/src/adb/connection.ts +192 -0
- package/src/adb/index.ts +3 -0
- package/src/adb/options/1_16.ts +30 -0
- package/src/adb/options/1_22.ts +26 -0
- package/src/adb/options/index.ts +3 -0
- package/src/adb/options/types.ts +75 -0
- package/src/control/back-or-screen-on.ts +4 -0
- package/src/control/hover-helper.ts +56 -0
- package/src/control/index.ts +11 -0
- package/src/control/inject-keycode.ts +72 -0
- package/src/control/inject-scroll.ts +4 -0
- package/src/control/inject-text.ts +12 -0
- package/src/control/inject-touch.ts +78 -0
- package/src/control/rotate-device.ts +10 -0
- package/src/control/serializer.ts +151 -0
- package/src/control/set-clipboard.ts +4 -0
- package/src/control/set-screen-power-mode.ts +17 -0
- package/src/control/type.ts +17 -0
- package/src/device-message/ack-clipboard.ts +10 -0
- package/src/device-message/clipboard.ts +11 -0
- package/src/device-message/index.ts +4 -0
- package/src/device-message/stream.ts +29 -0
- package/src/device-message/type.ts +5 -0
- package/src/index.ts +3 -6
- package/src/options/1_16/codec-options.ts +55 -0
- package/src/options/1_16/h264-configuration.ts +485 -0
- package/src/options/1_16/index.ts +4 -345
- package/src/options/1_16/options.ts +339 -0
- package/src/options/1_16/scroll.ts +76 -0
- package/src/options/1_18.ts +24 -12
- package/src/options/1_21.ts +34 -6
- package/src/options/1_22/index.ts +2 -0
- package/src/options/1_22/options.ts +58 -0
- package/src/options/1_22/scroll.ts +26 -0
- package/src/options/1_23.ts +33 -19
- package/src/options/1_24.ts +3 -2
- package/src/options/1_25/index.ts +2 -0
- package/src/options/1_25/options.ts +12 -0
- package/src/options/1_25/scroll.ts +52 -0
- package/src/options/index.ts +5 -4
- package/src/options/types.ts +102 -0
- package/tsconfig.build.json +3 -0
- package/tsconfig.build.tsbuildinfo +1 -0
- package/esm/client.d.ts +0 -48
- package/esm/client.d.ts.map +0 -1
- package/esm/client.js +0 -341
- package/esm/client.js.map +0 -1
- package/esm/connection.d.ts +0 -37
- package/esm/connection.d.ts.map +0 -1
- package/esm/connection.js.map +0 -1
- package/esm/decoder/index.d.ts +0 -4
- package/esm/decoder/index.d.ts.map +0 -1
- package/esm/decoder/index.js +0 -4
- package/esm/decoder/index.js.map +0 -1
- package/esm/decoder/tinyh264/index.d.ts +0 -20
- package/esm/decoder/tinyh264/index.d.ts.map +0 -1
- package/esm/decoder/tinyh264/index.js +0 -86
- package/esm/decoder/tinyh264/index.js.map +0 -1
- package/esm/decoder/tinyh264/worker.d.ts +0 -2
- package/esm/decoder/tinyh264/worker.d.ts.map +0 -1
- package/esm/decoder/tinyh264/worker.js +0 -3
- package/esm/decoder/tinyh264/worker.js.map +0 -1
- package/esm/decoder/tinyh264/wrapper.d.ts +0 -21
- package/esm/decoder/tinyh264/wrapper.d.ts.map +0 -1
- package/esm/decoder/tinyh264/wrapper.js +0 -68
- package/esm/decoder/tinyh264/wrapper.js.map +0 -1
- package/esm/decoder/types.d.ts +0 -28
- package/esm/decoder/types.d.ts.map +0 -1
- package/esm/decoder/types.js +0 -2
- package/esm/decoder/types.js.map +0 -1
- package/esm/decoder/web-codecs/index.d.ts +0 -22
- package/esm/decoder/web-codecs/index.d.ts.map +0 -1
- package/esm/decoder/web-codecs/index.js +0 -81
- package/esm/decoder/web-codecs/index.js.map +0 -1
- package/esm/message.d.ts +0 -98
- package/esm/message.d.ts.map +0 -1
- package/esm/message.js +0 -98
- package/esm/message.js.map +0 -1
- package/esm/options/1_22.d.ts +0 -43
- package/esm/options/1_22.d.ts.map +0 -1
- package/esm/options/1_22.js +0 -43
- package/esm/options/1_22.js.map +0 -1
- package/esm/options/common.d.ts +0 -34
- package/esm/options/common.d.ts.map +0 -1
- package/esm/options/common.js +0 -16
- package/esm/options/common.js.map +0 -1
- package/esm/push-server.d.ts +0 -6
- package/esm/push-server.d.ts.map +0 -1
- package/esm/push-server.js +0 -16
- package/esm/push-server.js.map +0 -1
- package/esm/utils.d.ts +0 -2
- package/esm/utils.d.ts.map +0 -1
- package/esm/utils.js +0 -6
- package/esm/utils.js.map +0 -1
- package/src/client.ts +0 -435
- package/src/connection.ts +0 -148
- package/src/decoder/index.ts +0 -3
- package/src/decoder/tinyh264/index.ts +0 -112
- package/src/decoder/tinyh264/types.d.ts +0 -137
- package/src/decoder/tinyh264/worker.ts +0 -2
- package/src/decoder/tinyh264/wrapper.ts +0 -89
- package/src/decoder/types.ts +0 -35
- package/src/decoder/web-codecs/index.ts +0 -99
- package/src/message.ts +0 -113
- package/src/options/1_16/sps.ts +0 -300
- package/src/options/1_22.ts +0 -78
- package/src/options/common.ts +0 -66
- package/src/push-server.ts +0 -24
- package/src/utils.ts +0 -5
|
@@ -1,227 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { toScrcpyOptionValue } from "../common.js";
|
|
6
|
-
import { parse_sequence_parameter_set } from "./sps.js";
|
|
7
|
-
export var ScrcpyLogLevel;
|
|
8
|
-
(function (ScrcpyLogLevel) {
|
|
9
|
-
ScrcpyLogLevel["Verbose"] = "verbose";
|
|
10
|
-
ScrcpyLogLevel["Debug"] = "debug";
|
|
11
|
-
ScrcpyLogLevel["Info"] = "info";
|
|
12
|
-
ScrcpyLogLevel["Warn"] = "warn";
|
|
13
|
-
ScrcpyLogLevel["Error"] = "error";
|
|
14
|
-
})(ScrcpyLogLevel || (ScrcpyLogLevel = {}));
|
|
15
|
-
export var ScrcpyVideoOrientation;
|
|
16
|
-
(function (ScrcpyVideoOrientation) {
|
|
17
|
-
ScrcpyVideoOrientation[ScrcpyVideoOrientation["Initial"] = -2] = "Initial";
|
|
18
|
-
ScrcpyVideoOrientation[ScrcpyVideoOrientation["Unlocked"] = -1] = "Unlocked";
|
|
19
|
-
ScrcpyVideoOrientation[ScrcpyVideoOrientation["Portrait"] = 0] = "Portrait";
|
|
20
|
-
ScrcpyVideoOrientation[ScrcpyVideoOrientation["Landscape"] = 1] = "Landscape";
|
|
21
|
-
ScrcpyVideoOrientation[ScrcpyVideoOrientation["PortraitFlipped"] = 2] = "PortraitFlipped";
|
|
22
|
-
ScrcpyVideoOrientation[ScrcpyVideoOrientation["LandscapeFlipped"] = 3] = "LandscapeFlipped";
|
|
23
|
-
})(ScrcpyVideoOrientation || (ScrcpyVideoOrientation = {}));
|
|
24
|
-
function toDashCase(input) {
|
|
25
|
-
return input.replace(/([A-Z])/g, '-$1').toLowerCase();
|
|
26
|
-
}
|
|
27
|
-
const CODEC_OPTION_TYPES = {
|
|
28
|
-
repeatPreviousFrameAfter: 'long',
|
|
29
|
-
maxPtsGapToEncoder: 'long',
|
|
30
|
-
};
|
|
31
|
-
export class CodecOptions {
|
|
32
|
-
value;
|
|
33
|
-
constructor(value) {
|
|
34
|
-
this.value = value;
|
|
35
|
-
}
|
|
36
|
-
toOptionValue() {
|
|
37
|
-
const entries = Object.entries(this.value)
|
|
38
|
-
.filter(([key, value]) => value !== undefined);
|
|
39
|
-
if (entries.length === 0) {
|
|
40
|
-
return undefined;
|
|
41
|
-
}
|
|
42
|
-
return entries
|
|
43
|
-
.map(([key, value]) => {
|
|
44
|
-
const type = CODEC_OPTION_TYPES[key];
|
|
45
|
-
return `${toDashCase(key)}${type ? `:${type}` : ''}=${value}`;
|
|
46
|
-
})
|
|
47
|
-
.join(',');
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
export const VideoPacket = new Struct()
|
|
51
|
-
.uint64('pts')
|
|
52
|
-
.uint32('size')
|
|
53
|
-
.uint8Array('data', { lengthField: 'size' });
|
|
54
|
-
export const NO_PTS = BigInt(1) << BigInt(63);
|
|
55
|
-
export const ScrcpyBackOrScreenOnEvent1_16 = ScrcpySimpleControlMessage;
|
|
56
|
-
export const ScrcpyInjectScrollControlMessage1_16 = new Struct()
|
|
57
|
-
.fields(ScrcpySimpleControlMessage)
|
|
58
|
-
.uint32('pointerX')
|
|
59
|
-
.uint32('pointerY')
|
|
60
|
-
.uint16('screenWidth')
|
|
61
|
-
.uint16('screenHeight')
|
|
62
|
-
.int32('scrollX')
|
|
63
|
-
.int32('scrollY');
|
|
64
|
-
export class ScrcpyOptions1_16 {
|
|
65
|
-
value;
|
|
66
|
-
constructor(value) {
|
|
67
|
-
if (new.target === ScrcpyOptions1_16 &&
|
|
68
|
-
value.logLevel === ScrcpyLogLevel.Verbose) {
|
|
69
|
-
value.logLevel = ScrcpyLogLevel.Debug;
|
|
70
|
-
}
|
|
71
|
-
if (new.target === ScrcpyOptions1_16 &&
|
|
72
|
-
value.lockVideoOrientation === ScrcpyVideoOrientation.Initial) {
|
|
73
|
-
value.lockVideoOrientation = ScrcpyVideoOrientation.Unlocked;
|
|
74
|
-
}
|
|
75
|
-
this.value = value;
|
|
76
|
-
}
|
|
77
|
-
getArgumentOrder() {
|
|
78
|
-
return [
|
|
79
|
-
'logLevel',
|
|
80
|
-
'maxSize',
|
|
81
|
-
'bitRate',
|
|
82
|
-
'maxFps',
|
|
83
|
-
'lockVideoOrientation',
|
|
84
|
-
'tunnelForward',
|
|
85
|
-
'crop',
|
|
86
|
-
'sendFrameMeta',
|
|
87
|
-
'control',
|
|
88
|
-
'displayId',
|
|
89
|
-
'showTouches',
|
|
90
|
-
'stayAwake',
|
|
91
|
-
'codecOptions',
|
|
92
|
-
'encoderName',
|
|
93
|
-
];
|
|
94
|
-
}
|
|
95
|
-
getDefaultValue() {
|
|
96
|
-
return {
|
|
97
|
-
logLevel: ScrcpyLogLevel.Debug,
|
|
98
|
-
maxSize: 0,
|
|
99
|
-
bitRate: 8000000,
|
|
100
|
-
maxFps: 0,
|
|
101
|
-
lockVideoOrientation: ScrcpyVideoOrientation.Unlocked,
|
|
102
|
-
tunnelForward: false,
|
|
103
|
-
crop: '-',
|
|
104
|
-
sendFrameMeta: true,
|
|
105
|
-
control: true,
|
|
106
|
-
displayId: 0,
|
|
107
|
-
showTouches: false,
|
|
108
|
-
stayAwake: false,
|
|
109
|
-
codecOptions: new CodecOptions({}),
|
|
110
|
-
encoderName: '-',
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
formatServerArguments() {
|
|
114
|
-
const defaults = this.getDefaultValue();
|
|
115
|
-
return this.getArgumentOrder()
|
|
116
|
-
.map(key => toScrcpyOptionValue(this.value[key] || defaults[key], '-'));
|
|
117
|
-
}
|
|
118
|
-
createConnection(adb) {
|
|
119
|
-
const options = {
|
|
120
|
-
// Old scrcpy connection always have control stream no matter what the option is
|
|
121
|
-
control: true,
|
|
122
|
-
sendDummyByte: true,
|
|
123
|
-
sendDeviceMeta: true,
|
|
124
|
-
};
|
|
125
|
-
if (this.value.tunnelForward) {
|
|
126
|
-
return new ScrcpyClientForwardConnection(adb, options);
|
|
127
|
-
}
|
|
128
|
-
else {
|
|
129
|
-
return new ScrcpyClientReverseConnection(adb, options);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
getOutputEncoderNameRegex() {
|
|
133
|
-
return /\s+scrcpy --encoder-name '(.*?)'/;
|
|
134
|
-
}
|
|
135
|
-
createVideoStreamTransformer() {
|
|
136
|
-
// Optimized path for video frames only
|
|
137
|
-
if (this.value.sendFrameMeta === false) {
|
|
138
|
-
return new TransformStream({
|
|
139
|
-
transform(chunk, controller) {
|
|
140
|
-
controller.enqueue({
|
|
141
|
-
type: 'frame',
|
|
142
|
-
data: chunk,
|
|
143
|
-
});
|
|
144
|
-
},
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
let header;
|
|
148
|
-
let deserializeStream = new StructDeserializeStream(VideoPacket);
|
|
149
|
-
return {
|
|
150
|
-
writable: deserializeStream.writable,
|
|
151
|
-
readable: deserializeStream.readable.pipeThrough(new TransformStream({
|
|
152
|
-
transform(packet, controller) {
|
|
153
|
-
if (packet.pts === NO_PTS) {
|
|
154
|
-
const sequenceParameterSet = parse_sequence_parameter_set(packet.data.slice().buffer);
|
|
155
|
-
const { profile_idc: profileIndex, constraint_set: constraintSet, level_idc: levelIndex, pic_width_in_mbs_minus1, pic_height_in_map_units_minus1, frame_mbs_only_flag, frame_crop_left_offset, frame_crop_right_offset, frame_crop_top_offset, frame_crop_bottom_offset, } = sequenceParameterSet;
|
|
156
|
-
const encodedWidth = (pic_width_in_mbs_minus1 + 1) * 16;
|
|
157
|
-
const encodedHeight = (pic_height_in_map_units_minus1 + 1) * (2 - frame_mbs_only_flag) * 16;
|
|
158
|
-
const cropLeft = frame_crop_left_offset * 2;
|
|
159
|
-
const cropRight = frame_crop_right_offset * 2;
|
|
160
|
-
const cropTop = frame_crop_top_offset * 2;
|
|
161
|
-
const cropBottom = frame_crop_bottom_offset * 2;
|
|
162
|
-
const croppedWidth = encodedWidth - cropLeft - cropRight;
|
|
163
|
-
const croppedHeight = encodedHeight - cropTop - cropBottom;
|
|
164
|
-
header = packet.data;
|
|
165
|
-
controller.enqueue({
|
|
166
|
-
type: 'configuration',
|
|
167
|
-
data: {
|
|
168
|
-
profileIndex,
|
|
169
|
-
constraintSet,
|
|
170
|
-
levelIndex,
|
|
171
|
-
encodedWidth,
|
|
172
|
-
encodedHeight,
|
|
173
|
-
cropLeft,
|
|
174
|
-
cropRight,
|
|
175
|
-
cropTop,
|
|
176
|
-
cropBottom,
|
|
177
|
-
croppedWidth,
|
|
178
|
-
croppedHeight,
|
|
179
|
-
}
|
|
180
|
-
});
|
|
181
|
-
return;
|
|
182
|
-
}
|
|
183
|
-
let frameData;
|
|
184
|
-
if (header) {
|
|
185
|
-
frameData = new Uint8Array(header.byteLength + packet.data.byteLength);
|
|
186
|
-
frameData.set(header);
|
|
187
|
-
frameData.set(packet.data, header.byteLength);
|
|
188
|
-
header = undefined;
|
|
189
|
-
}
|
|
190
|
-
else {
|
|
191
|
-
frameData = packet.data;
|
|
192
|
-
}
|
|
193
|
-
controller.enqueue({
|
|
194
|
-
type: 'frame',
|
|
195
|
-
pts: packet.pts,
|
|
196
|
-
data: frameData,
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
}))
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
getControlMessageTypes() {
|
|
203
|
-
return [
|
|
204
|
-
/* 0 */ ScrcpyControlMessageType.InjectKeycode,
|
|
205
|
-
/* 1 */ ScrcpyControlMessageType.InjectText,
|
|
206
|
-
/* 2 */ ScrcpyControlMessageType.InjectTouch,
|
|
207
|
-
/* 3 */ ScrcpyControlMessageType.InjectScroll,
|
|
208
|
-
/* 4 */ ScrcpyControlMessageType.BackOrScreenOn,
|
|
209
|
-
/* 5 */ ScrcpyControlMessageType.ExpandNotificationPanel,
|
|
210
|
-
/* 6 */ ScrcpyControlMessageType.CollapseNotificationPanel,
|
|
211
|
-
/* 7 */ ScrcpyControlMessageType.GetClipboard,
|
|
212
|
-
/* 8 */ ScrcpyControlMessageType.SetClipboard,
|
|
213
|
-
/* 9 */ ScrcpyControlMessageType.SetScreenPowerMode,
|
|
214
|
-
/* 10 */ ScrcpyControlMessageType.RotateDevice,
|
|
215
|
-
];
|
|
216
|
-
}
|
|
217
|
-
serializeBackOrScreenOnControlMessage(message) {
|
|
218
|
-
if (message.action === AndroidKeyEventAction.Down) {
|
|
219
|
-
return ScrcpyBackOrScreenOnEvent1_16.serialize(message);
|
|
220
|
-
}
|
|
221
|
-
return undefined;
|
|
222
|
-
}
|
|
223
|
-
serializeInjectScrollControlMessage(message) {
|
|
224
|
-
return ScrcpyInjectScrollControlMessage1_16.serialize(message);
|
|
225
|
-
}
|
|
226
|
-
}
|
|
1
|
+
export * from "./codec-options.js";
|
|
2
|
+
export * from "./h264-configuration.js";
|
|
3
|
+
export * from "./options.js";
|
|
4
|
+
export * from "./scroll.js";
|
|
227
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/options/1_16/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/options/1_16/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { TransformStream } from "@yume-chan/stream-extra";
|
|
2
|
+
import Struct from "@yume-chan/struct";
|
|
3
|
+
import { ScrcpyControlMessageType, type ScrcpyBackOrScreenOnControlMessage, type ScrcpySetClipboardControlMessage } from "../../control/index.js";
|
|
4
|
+
import { type ScrcpyOptions, type ScrcpyVideoStreamPacket } from "../types.js";
|
|
5
|
+
import { CodecOptions } from "./codec-options.js";
|
|
6
|
+
import { type ScrcpyScrollController } from "./scroll.js";
|
|
7
|
+
export declare enum ScrcpyLogLevel {
|
|
8
|
+
Verbose = "verbose",
|
|
9
|
+
Debug = "debug",
|
|
10
|
+
Info = "info",
|
|
11
|
+
Warn = "warn",
|
|
12
|
+
Error = "error"
|
|
13
|
+
}
|
|
14
|
+
export declare enum ScrcpyVideoOrientation {
|
|
15
|
+
Initial = -2,
|
|
16
|
+
Unlocked = -1,
|
|
17
|
+
Portrait = 0,
|
|
18
|
+
Landscape = 1,
|
|
19
|
+
PortraitFlipped = 2,
|
|
20
|
+
LandscapeFlipped = 3
|
|
21
|
+
}
|
|
22
|
+
export interface ScrcpyOptionsInit1_16 {
|
|
23
|
+
logLevel: ScrcpyLogLevel;
|
|
24
|
+
/**
|
|
25
|
+
* The maximum value of both width and height.
|
|
26
|
+
*/
|
|
27
|
+
maxSize: number;
|
|
28
|
+
bitRate: number;
|
|
29
|
+
/**
|
|
30
|
+
* 0 for unlimited.
|
|
31
|
+
*
|
|
32
|
+
* @default 0
|
|
33
|
+
*/
|
|
34
|
+
maxFps: number;
|
|
35
|
+
/**
|
|
36
|
+
* The orientation of the video stream.
|
|
37
|
+
*
|
|
38
|
+
* It will not keep the device screen in specific orientation,
|
|
39
|
+
* only the captured video will in this orientation.
|
|
40
|
+
*/
|
|
41
|
+
lockVideoOrientation: ScrcpyVideoOrientation;
|
|
42
|
+
tunnelForward: boolean;
|
|
43
|
+
crop: string;
|
|
44
|
+
/**
|
|
45
|
+
* Send PTS so that the client may record properly
|
|
46
|
+
*
|
|
47
|
+
* Note: When `sendFrameMeta: false` is specified,
|
|
48
|
+
* `onChangeEncoding` event won't fire and `onVideoData` event doesn't
|
|
49
|
+
* merge sps/pps frame and first video frame. Which means you can't use
|
|
50
|
+
* the shipped decoders to render the video
|
|
51
|
+
* (You can still record the stream into a file).
|
|
52
|
+
*
|
|
53
|
+
* @default true
|
|
54
|
+
*/
|
|
55
|
+
sendFrameMeta: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* @default true
|
|
58
|
+
*/
|
|
59
|
+
control: boolean;
|
|
60
|
+
displayId: number;
|
|
61
|
+
showTouches: boolean;
|
|
62
|
+
stayAwake: boolean;
|
|
63
|
+
codecOptions: CodecOptions;
|
|
64
|
+
encoderName: string;
|
|
65
|
+
}
|
|
66
|
+
export declare const VideoPacket: Struct<{
|
|
67
|
+
pts: bigint;
|
|
68
|
+
size: number;
|
|
69
|
+
data: Uint8Array;
|
|
70
|
+
}, "size", Record<never, never>, undefined>;
|
|
71
|
+
export declare const NO_PTS: bigint;
|
|
72
|
+
export declare const ScrcpyBackOrScreenOnControlMessage1_16: Struct<{
|
|
73
|
+
type: ScrcpyControlMessageType.BackOrScreenOn;
|
|
74
|
+
}, never, Record<never, never>, undefined>;
|
|
75
|
+
export declare const ScrcpySetClipboardControlMessage1_15: Struct<{
|
|
76
|
+
type: ScrcpyControlMessageType.SetClipboard;
|
|
77
|
+
length: number;
|
|
78
|
+
content: string;
|
|
79
|
+
}, "length", Record<never, never>, undefined>;
|
|
80
|
+
export type ScrcpySetClipboardControlMessage1_15 = typeof ScrcpySetClipboardControlMessage1_15["TInit"];
|
|
81
|
+
export declare class ScrcpyOptions1_16<T extends ScrcpyOptionsInit1_16 = ScrcpyOptionsInit1_16> implements ScrcpyOptions<T> {
|
|
82
|
+
value: Partial<T>;
|
|
83
|
+
constructor(value: Partial<ScrcpyOptionsInit1_16>);
|
|
84
|
+
protected getArgumentOrder(): (keyof T)[];
|
|
85
|
+
getDefaultValue(): T;
|
|
86
|
+
formatServerArguments(): string[];
|
|
87
|
+
getOutputEncoderNameRegex(): RegExp;
|
|
88
|
+
createVideoStreamTransformer(): TransformStream<Uint8Array, ScrcpyVideoStreamPacket>;
|
|
89
|
+
getControlMessageTypes(): ScrcpyControlMessageType[];
|
|
90
|
+
serializeBackOrScreenOnControlMessage(message: ScrcpyBackOrScreenOnControlMessage): Uint8Array | undefined;
|
|
91
|
+
serializeSetClipboardControlMessage(message: ScrcpySetClipboardControlMessage): Uint8Array;
|
|
92
|
+
getScrollController(): ScrcpyScrollController;
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/options/1_16/options.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,eAAe,EAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAEH,wBAAwB,EACxB,KAAK,kCAAkC,EACvC,KAAK,gCAAgC,EACxC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAEH,KAAK,aAAa,EAClB,KAAK,uBAAuB,EAC/B,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAMlD,OAAO,EAEH,KAAK,sBAAsB,EAC9B,MAAM,aAAa,CAAC;AAErB,oBAAY,cAAc;IACtB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,IAAI,SAAS;IACb,KAAK,UAAU;CAClB;AAED,oBAAY,sBAAsB;IAC9B,OAAO,KAAK;IACZ,QAAQ,KAAK;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eAAe,CAClD,UAAU,EACV,uBAAuB,CAC1B;IAuGM,sBAAsB,IAAI,wBAAwB,EAAE;IAgBpD,qCAAqC,CACxC,OAAO,EAAE,kCAAkC;IASxC,mCAAmC,CACtC,OAAO,EAAE,gCAAgC,GAC1C,UAAU;IAIN,mBAAmB,IAAI,sBAAsB;CAGvD"}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { StructDeserializeStream, TransformStream, } from "@yume-chan/stream-extra";
|
|
2
|
+
import Struct from "@yume-chan/struct";
|
|
3
|
+
import { AndroidKeyEventAction, ScrcpyControlMessageType, } from "../../control/index.js";
|
|
4
|
+
import { toScrcpyOptionValue, } from "../types.js";
|
|
5
|
+
import { CodecOptions } from "./codec-options.js";
|
|
6
|
+
import { parseH264Configuration, parseSequenceParameterSet, removeH264Emulation, } from "./h264-configuration.js";
|
|
7
|
+
import { ScrcpyScrollController1_16, } from "./scroll.js";
|
|
8
|
+
export var ScrcpyLogLevel;
|
|
9
|
+
(function (ScrcpyLogLevel) {
|
|
10
|
+
ScrcpyLogLevel["Verbose"] = "verbose";
|
|
11
|
+
ScrcpyLogLevel["Debug"] = "debug";
|
|
12
|
+
ScrcpyLogLevel["Info"] = "info";
|
|
13
|
+
ScrcpyLogLevel["Warn"] = "warn";
|
|
14
|
+
ScrcpyLogLevel["Error"] = "error";
|
|
15
|
+
})(ScrcpyLogLevel = ScrcpyLogLevel || (ScrcpyLogLevel = {}));
|
|
16
|
+
export var ScrcpyVideoOrientation;
|
|
17
|
+
(function (ScrcpyVideoOrientation) {
|
|
18
|
+
ScrcpyVideoOrientation[ScrcpyVideoOrientation["Initial"] = -2] = "Initial";
|
|
19
|
+
ScrcpyVideoOrientation[ScrcpyVideoOrientation["Unlocked"] = -1] = "Unlocked";
|
|
20
|
+
ScrcpyVideoOrientation[ScrcpyVideoOrientation["Portrait"] = 0] = "Portrait";
|
|
21
|
+
ScrcpyVideoOrientation[ScrcpyVideoOrientation["Landscape"] = 1] = "Landscape";
|
|
22
|
+
ScrcpyVideoOrientation[ScrcpyVideoOrientation["PortraitFlipped"] = 2] = "PortraitFlipped";
|
|
23
|
+
ScrcpyVideoOrientation[ScrcpyVideoOrientation["LandscapeFlipped"] = 3] = "LandscapeFlipped";
|
|
24
|
+
})(ScrcpyVideoOrientation = ScrcpyVideoOrientation || (ScrcpyVideoOrientation = {}));
|
|
25
|
+
export const VideoPacket = new Struct()
|
|
26
|
+
.uint64("pts")
|
|
27
|
+
.uint32("size")
|
|
28
|
+
.uint8Array("data", { lengthField: "size" });
|
|
29
|
+
export const NO_PTS = BigInt(1) << BigInt(63);
|
|
30
|
+
export const ScrcpyBackOrScreenOnControlMessage1_16 = new Struct().uint8("type", ScrcpyControlMessageType.BackOrScreenOn);
|
|
31
|
+
export const ScrcpySetClipboardControlMessage1_15 = new Struct()
|
|
32
|
+
.uint8("type", ScrcpyControlMessageType.SetClipboard)
|
|
33
|
+
.uint32("length")
|
|
34
|
+
.string("content", { lengthField: "length" });
|
|
35
|
+
export class ScrcpyOptions1_16 {
|
|
36
|
+
value;
|
|
37
|
+
constructor(value) {
|
|
38
|
+
if (new.target === ScrcpyOptions1_16 &&
|
|
39
|
+
value.logLevel === ScrcpyLogLevel.Verbose) {
|
|
40
|
+
value.logLevel = ScrcpyLogLevel.Debug;
|
|
41
|
+
}
|
|
42
|
+
if (new.target === ScrcpyOptions1_16 &&
|
|
43
|
+
value.lockVideoOrientation === ScrcpyVideoOrientation.Initial) {
|
|
44
|
+
value.lockVideoOrientation = ScrcpyVideoOrientation.Unlocked;
|
|
45
|
+
}
|
|
46
|
+
this.value = value;
|
|
47
|
+
}
|
|
48
|
+
getArgumentOrder() {
|
|
49
|
+
return [
|
|
50
|
+
"logLevel",
|
|
51
|
+
"maxSize",
|
|
52
|
+
"bitRate",
|
|
53
|
+
"maxFps",
|
|
54
|
+
"lockVideoOrientation",
|
|
55
|
+
"tunnelForward",
|
|
56
|
+
"crop",
|
|
57
|
+
"sendFrameMeta",
|
|
58
|
+
"control",
|
|
59
|
+
"displayId",
|
|
60
|
+
"showTouches",
|
|
61
|
+
"stayAwake",
|
|
62
|
+
"codecOptions",
|
|
63
|
+
"encoderName",
|
|
64
|
+
];
|
|
65
|
+
}
|
|
66
|
+
getDefaultValue() {
|
|
67
|
+
return {
|
|
68
|
+
logLevel: ScrcpyLogLevel.Debug,
|
|
69
|
+
maxSize: 0,
|
|
70
|
+
bitRate: 8000000,
|
|
71
|
+
maxFps: 0,
|
|
72
|
+
lockVideoOrientation: ScrcpyVideoOrientation.Unlocked,
|
|
73
|
+
tunnelForward: false,
|
|
74
|
+
crop: "-",
|
|
75
|
+
sendFrameMeta: true,
|
|
76
|
+
control: true,
|
|
77
|
+
displayId: 0,
|
|
78
|
+
showTouches: false,
|
|
79
|
+
stayAwake: false,
|
|
80
|
+
codecOptions: new CodecOptions({}),
|
|
81
|
+
encoderName: "-",
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
formatServerArguments() {
|
|
85
|
+
const defaults = this.getDefaultValue();
|
|
86
|
+
return this.getArgumentOrder().map((key) => toScrcpyOptionValue(this.value[key] || defaults[key], "-"));
|
|
87
|
+
}
|
|
88
|
+
getOutputEncoderNameRegex() {
|
|
89
|
+
return /\s+scrcpy --encoder-name '(.*?)'/;
|
|
90
|
+
}
|
|
91
|
+
createVideoStreamTransformer() {
|
|
92
|
+
// Optimized path for video frames only
|
|
93
|
+
if (this.value.sendFrameMeta === false) {
|
|
94
|
+
return new TransformStream({
|
|
95
|
+
transform(chunk, controller) {
|
|
96
|
+
controller.enqueue({
|
|
97
|
+
type: "frame",
|
|
98
|
+
data: chunk,
|
|
99
|
+
});
|
|
100
|
+
},
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
let header;
|
|
104
|
+
const deserializeStream = new StructDeserializeStream(VideoPacket);
|
|
105
|
+
return {
|
|
106
|
+
writable: deserializeStream.writable,
|
|
107
|
+
readable: deserializeStream.readable.pipeThrough(new TransformStream({
|
|
108
|
+
transform(packet, controller) {
|
|
109
|
+
if (packet.pts === NO_PTS) {
|
|
110
|
+
const { sequenceParameterSet, pictureParameterSet, } = parseH264Configuration(packet.data);
|
|
111
|
+
const { profile_idc: profileIndex, constraint_set: constraintSet, level_idc: levelIndex, pic_width_in_mbs_minus1, pic_height_in_map_units_minus1, frame_mbs_only_flag, frame_crop_left_offset, frame_crop_right_offset, frame_crop_top_offset, frame_crop_bottom_offset, } = parseSequenceParameterSet(removeH264Emulation(sequenceParameterSet));
|
|
112
|
+
const encodedWidth = (pic_width_in_mbs_minus1 + 1) * 16;
|
|
113
|
+
const encodedHeight = (pic_height_in_map_units_minus1 + 1) *
|
|
114
|
+
(2 - frame_mbs_only_flag) *
|
|
115
|
+
16;
|
|
116
|
+
const cropLeft = frame_crop_left_offset * 2;
|
|
117
|
+
const cropRight = frame_crop_right_offset * 2;
|
|
118
|
+
const cropTop = frame_crop_top_offset * 2;
|
|
119
|
+
const cropBottom = frame_crop_bottom_offset * 2;
|
|
120
|
+
const croppedWidth = encodedWidth - cropLeft - cropRight;
|
|
121
|
+
const croppedHeight = encodedHeight - cropTop - cropBottom;
|
|
122
|
+
header = packet.data;
|
|
123
|
+
controller.enqueue({
|
|
124
|
+
type: "configuration",
|
|
125
|
+
pictureParameterSet,
|
|
126
|
+
sequenceParameterSet,
|
|
127
|
+
data: {
|
|
128
|
+
profileIndex,
|
|
129
|
+
constraintSet,
|
|
130
|
+
levelIndex,
|
|
131
|
+
encodedWidth,
|
|
132
|
+
encodedHeight,
|
|
133
|
+
cropLeft,
|
|
134
|
+
cropRight,
|
|
135
|
+
cropTop,
|
|
136
|
+
cropBottom,
|
|
137
|
+
croppedWidth,
|
|
138
|
+
croppedHeight,
|
|
139
|
+
},
|
|
140
|
+
});
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
let frameData;
|
|
144
|
+
if (header) {
|
|
145
|
+
frameData = new Uint8Array(header.byteLength + packet.data.byteLength);
|
|
146
|
+
frameData.set(header);
|
|
147
|
+
frameData.set(packet.data, header.byteLength);
|
|
148
|
+
header = undefined;
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
frameData = packet.data;
|
|
152
|
+
}
|
|
153
|
+
controller.enqueue({
|
|
154
|
+
type: "frame",
|
|
155
|
+
pts: packet.pts,
|
|
156
|
+
data: frameData,
|
|
157
|
+
});
|
|
158
|
+
},
|
|
159
|
+
})),
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
getControlMessageTypes() {
|
|
163
|
+
return [
|
|
164
|
+
/* 0 */ ScrcpyControlMessageType.InjectKeyCode,
|
|
165
|
+
/* 1 */ ScrcpyControlMessageType.InjectText,
|
|
166
|
+
/* 2 */ ScrcpyControlMessageType.InjectTouch,
|
|
167
|
+
/* 3 */ ScrcpyControlMessageType.InjectScroll,
|
|
168
|
+
/* 4 */ ScrcpyControlMessageType.BackOrScreenOn,
|
|
169
|
+
/* 5 */ ScrcpyControlMessageType.ExpandNotificationPanel,
|
|
170
|
+
/* 6 */ ScrcpyControlMessageType.CollapseNotificationPanel,
|
|
171
|
+
/* 7 */ ScrcpyControlMessageType.GetClipboard,
|
|
172
|
+
/* 8 */ ScrcpyControlMessageType.SetClipboard,
|
|
173
|
+
/* 9 */ ScrcpyControlMessageType.SetScreenPowerMode,
|
|
174
|
+
/* 10 */ ScrcpyControlMessageType.RotateDevice,
|
|
175
|
+
];
|
|
176
|
+
}
|
|
177
|
+
serializeBackOrScreenOnControlMessage(message) {
|
|
178
|
+
if (message.action === AndroidKeyEventAction.Down) {
|
|
179
|
+
return ScrcpyBackOrScreenOnControlMessage1_16.serialize(message);
|
|
180
|
+
}
|
|
181
|
+
return undefined;
|
|
182
|
+
}
|
|
183
|
+
serializeSetClipboardControlMessage(message) {
|
|
184
|
+
return ScrcpySetClipboardControlMessage1_15.serialize(message);
|
|
185
|
+
}
|
|
186
|
+
getScrollController() {
|
|
187
|
+
return new ScrcpyScrollController1_16();
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
//# sourceMappingURL=options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../src/options/1_16/options.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,uBAAuB,EACvB,eAAe,GAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EACH,qBAAqB,EACrB,wBAAwB,GAG3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACH,mBAAmB,GAGtB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EACH,sBAAsB,EACtB,yBAAyB,EACzB,mBAAmB,GACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACH,0BAA0B,GAE7B,MAAM,aAAa,CAAC;AAErB,MAAM,CAAN,IAAY,cAMX;AAND,WAAY,cAAc;IACtB,qCAAmB,CAAA;IACnB,iCAAe,CAAA;IACf,+BAAa,CAAA;IACb,+BAAa,CAAA;IACb,iCAAe,CAAA;AACnB,CAAC,EANW,cAAc,GAAd,cAAc,KAAd,cAAc,QAMzB;AAED,MAAM,CAAN,IAAY,sBAOX;AAPD,WAAY,sBAAsB;IAC9B,0EAAY,CAAA;IACZ,4EAAa,CAAA;IACb,2EAAY,CAAA;IACZ,6EAAa,CAAA;IACb,yFAAmB,CAAA;IACnB,2FAAoB,CAAA;AACxB,CAAC,EAPW,sBAAsB,GAAtB,sBAAsB,KAAtB,sBAAsB,QAOjC;AA4DD,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,MAAM,EAAE;KAClC,MAAM,CAAC,KAAK,CAAC;KACb,MAAM,CAAC,MAAM,CAAC;KACd,UAAU,CAAC,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,CAAC;AAEjD,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,EAAE,C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;IACnE,CAAC;IAEM,mBAAmB;QACtB,OAAO,IAAI,0BAA0B,EAAE,CAAC;IAC5C,CAAC;CACJ"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import Struct from "@yume-chan/struct";
|
|
2
|
+
import { ScrcpyControlMessageType, type ScrcpyInjectScrollControlMessage } from "../../control/index.js";
|
|
3
|
+
export interface ScrcpyScrollController {
|
|
4
|
+
serializeScrollMessage(message: ScrcpyInjectScrollControlMessage): Uint8Array | undefined;
|
|
5
|
+
}
|
|
6
|
+
export declare const ScrcpyInjectScrollControlMessage1_16: Struct<{
|
|
7
|
+
type: ScrcpyControlMessageType.InjectScroll;
|
|
8
|
+
pointerX: number;
|
|
9
|
+
pointerY: number;
|
|
10
|
+
screenWidth: number;
|
|
11
|
+
screenHeight: number;
|
|
12
|
+
scrollX: number;
|
|
13
|
+
scrollY: number;
|
|
14
|
+
}, never, Record<never, never>, undefined>;
|
|
15
|
+
/**
|
|
16
|
+
* Old version of Scrcpy server only supports integer values for scroll.
|
|
17
|
+
*
|
|
18
|
+
* Accumulate scroll values and send scroll message when accumulated value
|
|
19
|
+
* reaches 1 or -1.
|
|
20
|
+
*/
|
|
21
|
+
export declare class ScrcpyScrollController1_16 implements ScrcpyScrollController {
|
|
22
|
+
private accumulatedX;
|
|
23
|
+
private accumulatedY;
|
|
24
|
+
protected processMessage(message: ScrcpyInjectScrollControlMessage): ScrcpyInjectScrollControlMessage | undefined;
|
|
25
|
+
serializeScrollMessage(message: ScrcpyInjectScrollControlMessage): Uint8Array | undefined;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=scroll.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll.d.ts","sourceRoot":"","sources":["../../../src/options/1_16/scroll.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EACH,wBAAwB,EACxB,KAAK,gCAAgC,EACxC,MAAM,wBAAwB,CAAC;AAEhC,MAAM,WAAW,sBAAsB;IACnC,sBAAsB,CAClB,OAAO,EAAE,gCAAgC,GAC1C,UAAU,GAAG,SAAS,CAAC;CAC7B;AAED,eAAO,MAAM,oCAAoC;;;;;;;;0CAO5B,CAAC;AAEtB;;;;;GAKG;AACH,qBAAa,0BAA2B,YAAW,sBAAsB;IACrE,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,YAAY,CAAK;IAEzB,SAAS,CAAC,cAAc,CACpB,OAAO,EAAE,gCAAgC,GAC1C,gCAAgC,GAAG,SAAS;IA+BxC,sBAAsB,CACzB,OAAO,EAAE,gCAAgC,GAC1C,UAAU,GAAG,SAAS;CAQ5B"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import Struct from "@yume-chan/struct";
|
|
2
|
+
import { ScrcpyControlMessageType, } from "../../control/index.js";
|
|
3
|
+
export const ScrcpyInjectScrollControlMessage1_16 = new Struct()
|
|
4
|
+
.uint8("type", ScrcpyControlMessageType.InjectScroll)
|
|
5
|
+
.uint32("pointerX")
|
|
6
|
+
.uint32("pointerY")
|
|
7
|
+
.uint16("screenWidth")
|
|
8
|
+
.uint16("screenHeight")
|
|
9
|
+
.int32("scrollX")
|
|
10
|
+
.int32("scrollY");
|
|
11
|
+
/**
|
|
12
|
+
* Old version of Scrcpy server only supports integer values for scroll.
|
|
13
|
+
*
|
|
14
|
+
* Accumulate scroll values and send scroll message when accumulated value
|
|
15
|
+
* reaches 1 or -1.
|
|
16
|
+
*/
|
|
17
|
+
export class ScrcpyScrollController1_16 {
|
|
18
|
+
accumulatedX = 0;
|
|
19
|
+
accumulatedY = 0;
|
|
20
|
+
processMessage(message) {
|
|
21
|
+
this.accumulatedX += message.scrollX;
|
|
22
|
+
this.accumulatedY += message.scrollY;
|
|
23
|
+
let scrollX = 0;
|
|
24
|
+
let scrollY = 0;
|
|
25
|
+
if (this.accumulatedX >= 1) {
|
|
26
|
+
scrollX = 1;
|
|
27
|
+
this.accumulatedX = 0;
|
|
28
|
+
}
|
|
29
|
+
else if (this.accumulatedX <= -1) {
|
|
30
|
+
scrollX = -1;
|
|
31
|
+
this.accumulatedX = 0;
|
|
32
|
+
}
|
|
33
|
+
if (this.accumulatedY >= 1) {
|
|
34
|
+
scrollY = 1;
|
|
35
|
+
this.accumulatedY = 0;
|
|
36
|
+
}
|
|
37
|
+
else if (this.accumulatedY <= -1) {
|
|
38
|
+
scrollY = -1;
|
|
39
|
+
this.accumulatedY = 0;
|
|
40
|
+
}
|
|
41
|
+
if (scrollX === 0 && scrollY === 0) {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
message.scrollX = scrollX;
|
|
45
|
+
message.scrollY = scrollY;
|
|
46
|
+
return message;
|
|
47
|
+
}
|
|
48
|
+
serializeScrollMessage(message) {
|
|
49
|
+
const processed = this.processMessage(message);
|
|
50
|
+
if (!processed) {
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
return ScrcpyInjectScrollControlMessage1_16.serialize(processed);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=scroll.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll.js","sourceRoot":"","sources":["../../../src/options/1_16/scroll.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EACH,wBAAwB,GAE3B,MAAM,wBAAwB,CAAC;AAQhC,MAAM,CAAC,MAAM,oCAAoC,GAAG,IAAI,MAAM,EAAE;KAC3D,KAAK,CAAC,MAAM,EAAE,wBAAwB,CAAC,YAAqB,CAAC;KAC7D,MAAM,CAAC,UAAU,CAAC;KAClB,MAAM,CAAC,UAAU,CAAC;KAClB,MAAM,CAAC,aAAa,CAAC;KACrB,MAAM,CAAC,cAAc,CAAC;KACtB,KAAK,CAAC,SAAS,CAAC;KAChB,KAAK,CAAC,SAAS,CAAC,CAAC;AAEtB;;;;;GAKG;AACH,MAAM,OAAO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CAAC;CACJ"}
|
|
@@ -18,5 +18,5 @@ export declare function parse_sequence_parameter_set(buffer: ArrayBuffer): {
|
|
|
18
18
|
frame_crop_top_offset: number;
|
|
19
19
|
frame_crop_bottom_offset: number;
|
|
20
20
|
};
|
|
21
|
-
export
|
|
21
|
+
export type SequenceParameterSet = ReturnType<typeof parse_sequence_parameter_set>;
|
|
22
22
|
//# sourceMappingURL=sps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sps.d.ts","sourceRoot":"","sources":["../../../src/options/1_16/sps.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sps.d.ts","sourceRoot":"","sources":["../../../src/options/1_16/sps.ts"],"names":[],"mappings":"AA6IA,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,WAAW;;;;;;;;;;;;;;;;;;;EA+K/D;AAED,MAAM,MAAM,oBAAoB,GAAG,UAAU,CACzC,OAAO,4BAA4B,CACtC,CAAC"}
|