@yume-chan/scrcpy 0.0.13 → 0.0.16

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.
Files changed (80) hide show
  1. package/CHANGELOG.json +45 -0
  2. package/CHANGELOG.md +25 -1
  3. package/LICENSE +21 -21
  4. package/README.md +90 -89
  5. package/bin/scrcpy-server +0 -0
  6. package/bin/version.d.ts +1 -1
  7. package/bin/version.js +1 -1
  8. package/esm/client.d.ts +14 -2
  9. package/esm/client.d.ts.map +1 -1
  10. package/esm/client.js +275 -143
  11. package/esm/client.js.map +1 -1
  12. package/esm/connection.d.ts.map +1 -1
  13. package/esm/connection.js +74 -86
  14. package/esm/connection.js.map +1 -1
  15. package/esm/decoder/tinyh264/index.js +48 -48
  16. package/esm/decoder/tinyh264/index.js.map +1 -1
  17. package/esm/decoder/tinyh264/wrapper.js +3 -2
  18. package/esm/decoder/tinyh264/wrapper.js.map +1 -1
  19. package/esm/decoder/web-codecs/index.js +26 -21
  20. package/esm/decoder/web-codecs/index.js.map +1 -1
  21. package/esm/message.d.ts +13 -8
  22. package/esm/message.d.ts.map +1 -1
  23. package/esm/message.js +14 -8
  24. package/esm/message.js.map +1 -1
  25. package/esm/options/1_16/index.d.ts +8 -4
  26. package/esm/options/1_16/index.d.ts.map +1 -1
  27. package/esm/options/1_16/index.js +44 -18
  28. package/esm/options/1_16/index.js.map +1 -1
  29. package/esm/options/1_16/sps.js +3 -2
  30. package/esm/options/1_16/sps.js.map +1 -1
  31. package/esm/options/1_18.d.ts +3 -2
  32. package/esm/options/1_18.d.ts.map +1 -1
  33. package/esm/options/1_18.js +24 -1
  34. package/esm/options/1_18.js.map +1 -1
  35. package/esm/options/1_21.js +4 -1
  36. package/esm/options/1_21.js.map +1 -1
  37. package/esm/options/1_22.d.ts +3 -3
  38. package/esm/options/1_22.d.ts.map +1 -1
  39. package/esm/options/1_22.js +9 -6
  40. package/esm/options/1_22.js.map +1 -1
  41. package/esm/options/1_23.js +4 -1
  42. package/esm/options/1_23.js.map +1 -1
  43. package/esm/options/1_24.d.ts +9 -0
  44. package/esm/options/1_24.d.ts.map +1 -0
  45. package/esm/options/1_24.js +13 -0
  46. package/esm/options/1_24.js.map +1 -0
  47. package/esm/options/common.d.ts +2 -0
  48. package/esm/options/common.d.ts.map +1 -1
  49. package/esm/options/common.js.map +1 -1
  50. package/esm/options/index.d.ts +1 -0
  51. package/esm/options/index.d.ts.map +1 -1
  52. package/esm/options/index.js +1 -0
  53. package/esm/options/index.js.map +1 -1
  54. package/esm/push-server.js +5 -10
  55. package/esm/push-server.js.map +1 -1
  56. package/package.json +8 -8
  57. package/scrcpy.LICENSE +203 -203
  58. package/scripts/fetch-server.cjs +28 -28
  59. package/src/client.ts +435 -275
  60. package/src/codec.ts +35 -35
  61. package/src/connection.ts +148 -145
  62. package/src/decoder/index.ts +3 -3
  63. package/src/decoder/tinyh264/index.ts +112 -112
  64. package/src/decoder/tinyh264/types.d.ts +137 -137
  65. package/src/decoder/tinyh264/worker.ts +2 -2
  66. package/src/decoder/tinyh264/wrapper.ts +89 -89
  67. package/src/decoder/types.ts +35 -35
  68. package/src/decoder/web-codecs/index.ts +99 -99
  69. package/src/index.ts +8 -8
  70. package/src/message.ts +113 -105
  71. package/src/options/1_16/index.ts +345 -315
  72. package/src/options/1_16/sps.ts +300 -300
  73. package/src/options/1_18.ts +61 -41
  74. package/src/options/1_21.ts +34 -34
  75. package/src/options/1_22.ts +78 -80
  76. package/src/options/1_24.ts +18 -0
  77. package/src/options/common.ts +66 -63
  78. package/src/options/index.ts +7 -6
  79. package/src/push-server.ts +24 -24
  80. package/src/utils.ts +5 -5
@@ -1,137 +1,137 @@
1
- declare module 'tinyh264' {
2
- export function init(): void;
3
- }
4
-
5
- declare module 'yuv-buffer' {
6
- /**
7
- * Validate and fill out a YUVFormat object structure.
8
- *
9
- * At least width and height fields are required; other fields will be
10
- * derived if left missing or empty:
11
- * - chromaWidth and chromaHeight will be copied from width and height as for a 4:4:4 layout
12
- * - cropLeft and cropTop will be 0
13
- * - cropWidth and cropHeight will be set to whatever of the frame is visible after cropTop and cropLeft are applied
14
- * - displayWidth and displayHeight will be set to cropWidth and cropHeight.
15
- *
16
- * @param {YUVFormat} fields - input fields, must include width and height.
17
- * @returns {YUVFormat} - validated structure, with all derivable fields filled out.
18
- * @throws exception on invalid fields or missing width/height
19
- */
20
- export function format(fields: YUVFormat): YUVFormat;
21
-
22
- /**
23
- * Allocate a new YUVPlane object big enough for a luma plane in the given format
24
- * @param {YUVFormat} format - target frame format
25
- * @param {Uint8Array} source - input byte array; optional (will create empty buffer if missing)
26
- * @param {number} stride - row length in bytes; optional (will create a default if missing)
27
- * @param {number} offset - offset into source array to extract; optional (will start at 0 if missing)
28
- * @returns {YUVPlane} - freshly allocated planar buffer
29
- */
30
- export function lumaPlane(format: YUVFormat, source: Uint8Array, stride: number, offset: number): YUVPlane;
31
-
32
- /**
33
- * Allocate a new YUVPlane object big enough for a chroma plane in the given format,
34
- * optionally copying data from an existing buffer.
35
- *
36
- * @param {YUVFormat} format - target frame format
37
- * @param {Uint8Array} source - input byte array; optional (will create empty buffer if missing)
38
- * @param {number} stride - row length in bytes; optional (will create a default if missing)
39
- * @param {number} offset - offset into source array to extract; optional (will start at 0 if missing)
40
- * @returns {YUVPlane} - freshly allocated planar buffer
41
- */
42
- export function chromaPlane(format: YUVFormat, source: Uint8Array, stride: number, offset: number): YUVPlane;
43
-
44
- /**
45
- * Allocate a new YUVFrame object big enough for the given format
46
- * @param {YUVFormat} format - target frame format
47
- * @param {YUVPlane} y - optional Y plane; if missing, fresh one will be allocated
48
- * @param {YUVPlane} u - optional U plane; if missing, fresh one will be allocated
49
- * @param {YUVPlane} v - optional V plane; if missing, fresh one will be allocated
50
- * @returns {YUVFrame} - freshly allocated frame buffer
51
- */
52
- export function frame(format: YUVFormat, y: YUVPlane, u: YUVPlane, v: YUVPlane): YUVFrame;
53
-
54
- /**
55
- * Duplicate a frame using new buffer memory.
56
- * @param {YUVFrame} frame - input frame to copyFrame
57
- * @returns {YUVFrame} - freshly allocated and filled frame buffer
58
- */
59
- export function copyFrame(frame: YUVFrame): YUVFrame;
60
-
61
- /**
62
- * List the backing buffers for the frame's planes for transfer between
63
- * threads via Worker.postMessage.
64
- * @param {YUVFrame} frame - input frame
65
- * @returns {Array} - list of transferable objects
66
- */
67
- export function transferables(frame: YUVFrame): (ArrayBuffer | SharedArrayBuffer)[];
68
-
69
-
70
- /**
71
- * Represents metadata about a YUV frame format.
72
- * @typedef {Object} YUVFormat
73
- * @property {number} width - width of encoded frame in luma pixels
74
- * @property {number} height - height of encoded frame in luma pixels
75
- * @property {number} chromaWidth - width of encoded frame in chroma pixels
76
- * @property {number} chromaHeight - height of encoded frame in chroma pixels
77
- * @property {number} cropLeft - upper-left X coordinate of visible crop region, in luma pixels
78
- * @property {number} cropTop - upper-left Y coordinate of visible crop region, in luma pixels
79
- * @property {number} cropWidth - width of visible crop region, in luma pixels
80
- * @property {number} cropHeight - height of visible crop region, in luma pixels
81
- * @property {number} displayWidth - final display width of visible region, in luma pixels
82
- * @property {number} displayHeight - final display height of visible region, in luma pixels
83
- */
84
- export interface YUVFormat {
85
- width: number;
86
- height: number;
87
- chromaWidth: number;
88
- chromaHeight: number;
89
- cropLeft: number;
90
- cropTop: number;
91
- cropWidth: number;
92
- cropHeight: number;
93
- displayWidth: number;
94
- displayHeight: number;
95
- }
96
-
97
- /**
98
- * Represents underlying image data for a single luma or chroma plane.
99
- * Cannot be interpreted without the format data from a frame buffer.
100
- * @typedef {Object} YUVPlane
101
- * @property {Uint8Array} bytes - typed array containing image data bytes
102
- * @property {number} stride - byte distance between rows in data
103
- */
104
- export interface YUVPlane {
105
- bytes: Uint8Array;
106
- stride: number;
107
- }
108
-
109
- /**
110
- * Represents a YUV image frame buffer, with enough format information
111
- * to interpret the data usefully. Buffer objects use generic objects
112
- * under the hood and can be transferred between worker threads using
113
- * the structured clone algorithm.
114
- *
115
- * @typedef {Object} YUVFrame
116
- * @property {YUVFormat} format
117
- * @property {YUVPlane} y
118
- * @property {YUVPlane} u
119
- * @property {YUVPlane} v
120
- */
121
- export interface YUVFrame {
122
- format: YUVFormat;
123
- y: YUVPlane;
124
- u: YUVPlane;
125
- v: YUVPlane;
126
- }
127
- }
128
-
129
- declare module 'yuv-canvas' {
130
- import { YUVFrame } from 'yuv-buffer';
131
-
132
- export default class YUVCanvas {
133
- public static attach(canvas: HTMLCanvasElement): YUVCanvas;
134
-
135
- public drawFrame(data: YUVFrame): void;
136
- }
137
- }
1
+ declare module 'tinyh264' {
2
+ export function init(): void;
3
+ }
4
+
5
+ declare module 'yuv-buffer' {
6
+ /**
7
+ * Validate and fill out a YUVFormat object structure.
8
+ *
9
+ * At least width and height fields are required; other fields will be
10
+ * derived if left missing or empty:
11
+ * - chromaWidth and chromaHeight will be copied from width and height as for a 4:4:4 layout
12
+ * - cropLeft and cropTop will be 0
13
+ * - cropWidth and cropHeight will be set to whatever of the frame is visible after cropTop and cropLeft are applied
14
+ * - displayWidth and displayHeight will be set to cropWidth and cropHeight.
15
+ *
16
+ * @param {YUVFormat} fields - input fields, must include width and height.
17
+ * @returns {YUVFormat} - validated structure, with all derivable fields filled out.
18
+ * @throws exception on invalid fields or missing width/height
19
+ */
20
+ export function format(fields: YUVFormat): YUVFormat;
21
+
22
+ /**
23
+ * Allocate a new YUVPlane object big enough for a luma plane in the given format
24
+ * @param {YUVFormat} format - target frame format
25
+ * @param {Uint8Array} source - input byte array; optional (will create empty buffer if missing)
26
+ * @param {number} stride - row length in bytes; optional (will create a default if missing)
27
+ * @param {number} offset - offset into source array to extract; optional (will start at 0 if missing)
28
+ * @returns {YUVPlane} - freshly allocated planar buffer
29
+ */
30
+ export function lumaPlane(format: YUVFormat, source: Uint8Array, stride: number, offset: number): YUVPlane;
31
+
32
+ /**
33
+ * Allocate a new YUVPlane object big enough for a chroma plane in the given format,
34
+ * optionally copying data from an existing buffer.
35
+ *
36
+ * @param {YUVFormat} format - target frame format
37
+ * @param {Uint8Array} source - input byte array; optional (will create empty buffer if missing)
38
+ * @param {number} stride - row length in bytes; optional (will create a default if missing)
39
+ * @param {number} offset - offset into source array to extract; optional (will start at 0 if missing)
40
+ * @returns {YUVPlane} - freshly allocated planar buffer
41
+ */
42
+ export function chromaPlane(format: YUVFormat, source: Uint8Array, stride: number, offset: number): YUVPlane;
43
+
44
+ /**
45
+ * Allocate a new YUVFrame object big enough for the given format
46
+ * @param {YUVFormat} format - target frame format
47
+ * @param {YUVPlane} y - optional Y plane; if missing, fresh one will be allocated
48
+ * @param {YUVPlane} u - optional U plane; if missing, fresh one will be allocated
49
+ * @param {YUVPlane} v - optional V plane; if missing, fresh one will be allocated
50
+ * @returns {YUVFrame} - freshly allocated frame buffer
51
+ */
52
+ export function frame(format: YUVFormat, y: YUVPlane, u: YUVPlane, v: YUVPlane): YUVFrame;
53
+
54
+ /**
55
+ * Duplicate a frame using new buffer memory.
56
+ * @param {YUVFrame} frame - input frame to copyFrame
57
+ * @returns {YUVFrame} - freshly allocated and filled frame buffer
58
+ */
59
+ export function copyFrame(frame: YUVFrame): YUVFrame;
60
+
61
+ /**
62
+ * List the backing buffers for the frame's planes for transfer between
63
+ * threads via Worker.postMessage.
64
+ * @param {YUVFrame} frame - input frame
65
+ * @returns {Array} - list of transferable objects
66
+ */
67
+ export function transferables(frame: YUVFrame): (ArrayBuffer | SharedArrayBuffer)[];
68
+
69
+
70
+ /**
71
+ * Represents metadata about a YUV frame format.
72
+ * @typedef {Object} YUVFormat
73
+ * @property {number} width - width of encoded frame in luma pixels
74
+ * @property {number} height - height of encoded frame in luma pixels
75
+ * @property {number} chromaWidth - width of encoded frame in chroma pixels
76
+ * @property {number} chromaHeight - height of encoded frame in chroma pixels
77
+ * @property {number} cropLeft - upper-left X coordinate of visible crop region, in luma pixels
78
+ * @property {number} cropTop - upper-left Y coordinate of visible crop region, in luma pixels
79
+ * @property {number} cropWidth - width of visible crop region, in luma pixels
80
+ * @property {number} cropHeight - height of visible crop region, in luma pixels
81
+ * @property {number} displayWidth - final display width of visible region, in luma pixels
82
+ * @property {number} displayHeight - final display height of visible region, in luma pixels
83
+ */
84
+ export interface YUVFormat {
85
+ width: number;
86
+ height: number;
87
+ chromaWidth: number;
88
+ chromaHeight: number;
89
+ cropLeft: number;
90
+ cropTop: number;
91
+ cropWidth: number;
92
+ cropHeight: number;
93
+ displayWidth: number;
94
+ displayHeight: number;
95
+ }
96
+
97
+ /**
98
+ * Represents underlying image data for a single luma or chroma plane.
99
+ * Cannot be interpreted without the format data from a frame buffer.
100
+ * @typedef {Object} YUVPlane
101
+ * @property {Uint8Array} bytes - typed array containing image data bytes
102
+ * @property {number} stride - byte distance between rows in data
103
+ */
104
+ export interface YUVPlane {
105
+ bytes: Uint8Array;
106
+ stride: number;
107
+ }
108
+
109
+ /**
110
+ * Represents a YUV image frame buffer, with enough format information
111
+ * to interpret the data usefully. Buffer objects use generic objects
112
+ * under the hood and can be transferred between worker threads using
113
+ * the structured clone algorithm.
114
+ *
115
+ * @typedef {Object} YUVFrame
116
+ * @property {YUVFormat} format
117
+ * @property {YUVPlane} y
118
+ * @property {YUVPlane} u
119
+ * @property {YUVPlane} v
120
+ */
121
+ export interface YUVFrame {
122
+ format: YUVFormat;
123
+ y: YUVPlane;
124
+ u: YUVPlane;
125
+ v: YUVPlane;
126
+ }
127
+ }
128
+
129
+ declare module 'yuv-canvas' {
130
+ import { YUVFrame } from 'yuv-buffer';
131
+
132
+ export default class YUVCanvas {
133
+ public static attach(canvas: HTMLCanvasElement): YUVCanvas;
134
+
135
+ public drawFrame(data: YUVFrame): void;
136
+ }
137
+ }
@@ -1,2 +1,2 @@
1
- import { init } from 'tinyh264';
2
- init();
1
+ import { init } from 'tinyh264';
2
+ init();
@@ -1,89 +1,89 @@
1
- import { PromiseResolver } from '@yume-chan/async';
2
- import { AutoDisposable, EventEmitter } from '@yume-chan/event';
3
-
4
- let worker: Worker | undefined;
5
- let workerReady = false;
6
- const pendingResolvers: PromiseResolver<TinyH264Wrapper>[] = [];
7
- let streamId = 0;
8
-
9
- export interface PictureReadyEventArgs {
10
- renderStateId: number;
11
-
12
- width: number;
13
-
14
- height: number;
15
-
16
- data: ArrayBuffer;
17
- }
18
-
19
- const pictureReadyEvent = new EventEmitter<PictureReadyEventArgs>();
20
-
21
- export class TinyH264Wrapper extends AutoDisposable {
22
- public readonly streamId: number;
23
-
24
- private readonly pictureReadyEvent = new EventEmitter<PictureReadyEventArgs>();
25
- public get onPictureReady() { return this.pictureReadyEvent.event; }
26
-
27
- public constructor(streamId: number) {
28
- super();
29
-
30
- this.streamId = streamId;
31
- this.addDisposable(pictureReadyEvent.event(this.handlePictureReady, this));
32
- }
33
-
34
- private handlePictureReady(e: PictureReadyEventArgs) {
35
- if (e.renderStateId === this.streamId) {
36
- this.pictureReadyEvent.fire(e);
37
- }
38
- }
39
-
40
- public feed(data: ArrayBuffer) {
41
- worker!.postMessage({
42
- type: 'decode',
43
- data: data,
44
- offset: 0,
45
- length: data.byteLength,
46
- renderStateId: this.streamId,
47
- }, [data]);
48
- }
49
-
50
- public override dispose() {
51
- super.dispose();
52
- worker!.postMessage({
53
- type: 'release',
54
- renderStateId: this.streamId,
55
- });
56
- }
57
- }
58
-
59
- export function createTinyH264Wrapper(): Promise<TinyH264Wrapper> {
60
- if (!worker) {
61
- worker = new Worker(new URL('./worker.js', import.meta.url));
62
- worker.addEventListener('message', (e) => {
63
- const { data } = e;
64
- switch (data.type) {
65
- case 'decoderReady':
66
- workerReady = true;
67
- for (const resolver of pendingResolvers) {
68
- resolver.resolve(new TinyH264Wrapper(streamId));
69
- streamId += 1;
70
- }
71
- pendingResolvers.length = 0;
72
- break;
73
- case 'pictureReady':
74
- pictureReadyEvent.fire(data);
75
- break;
76
- }
77
- });
78
- }
79
-
80
- if (!workerReady) {
81
- const resolver = new PromiseResolver<TinyH264Wrapper>();
82
- pendingResolvers.push(resolver);
83
- return resolver.promise;
84
- }
85
-
86
- const decoder = new TinyH264Wrapper(streamId);
87
- streamId += 1;
88
- return Promise.resolve(decoder);
89
- }
1
+ import { PromiseResolver } from '@yume-chan/async';
2
+ import { AutoDisposable, EventEmitter } from '@yume-chan/event';
3
+
4
+ let worker: Worker | undefined;
5
+ let workerReady = false;
6
+ const pendingResolvers: PromiseResolver<TinyH264Wrapper>[] = [];
7
+ let streamId = 0;
8
+
9
+ export interface PictureReadyEventArgs {
10
+ renderStateId: number;
11
+
12
+ width: number;
13
+
14
+ height: number;
15
+
16
+ data: ArrayBuffer;
17
+ }
18
+
19
+ const pictureReadyEvent = new EventEmitter<PictureReadyEventArgs>();
20
+
21
+ export class TinyH264Wrapper extends AutoDisposable {
22
+ public readonly streamId: number;
23
+
24
+ private readonly pictureReadyEvent = new EventEmitter<PictureReadyEventArgs>();
25
+ public get onPictureReady() { return this.pictureReadyEvent.event; }
26
+
27
+ public constructor(streamId: number) {
28
+ super();
29
+
30
+ this.streamId = streamId;
31
+ this.addDisposable(pictureReadyEvent.event(this.handlePictureReady, this));
32
+ }
33
+
34
+ private handlePictureReady(e: PictureReadyEventArgs) {
35
+ if (e.renderStateId === this.streamId) {
36
+ this.pictureReadyEvent.fire(e);
37
+ }
38
+ }
39
+
40
+ public feed(data: ArrayBuffer) {
41
+ worker!.postMessage({
42
+ type: 'decode',
43
+ data: data,
44
+ offset: 0,
45
+ length: data.byteLength,
46
+ renderStateId: this.streamId,
47
+ }, [data]);
48
+ }
49
+
50
+ public override dispose() {
51
+ super.dispose();
52
+ worker!.postMessage({
53
+ type: 'release',
54
+ renderStateId: this.streamId,
55
+ });
56
+ }
57
+ }
58
+
59
+ export function createTinyH264Wrapper(): Promise<TinyH264Wrapper> {
60
+ if (!worker) {
61
+ worker = new Worker(new URL('./worker.js', import.meta.url));
62
+ worker.addEventListener('message', (e) => {
63
+ const { data } = e;
64
+ switch (data.type) {
65
+ case 'decoderReady':
66
+ workerReady = true;
67
+ for (const resolver of pendingResolvers) {
68
+ resolver.resolve(new TinyH264Wrapper(streamId));
69
+ streamId += 1;
70
+ }
71
+ pendingResolvers.length = 0;
72
+ break;
73
+ case 'pictureReady':
74
+ pictureReadyEvent.fire(data);
75
+ break;
76
+ }
77
+ });
78
+ }
79
+
80
+ if (!workerReady) {
81
+ const resolver = new PromiseResolver<TinyH264Wrapper>();
82
+ pendingResolvers.push(resolver);
83
+ return resolver.promise;
84
+ }
85
+
86
+ const decoder = new TinyH264Wrapper(streamId);
87
+ streamId += 1;
88
+ return Promise.resolve(decoder);
89
+ }
@@ -1,35 +1,35 @@
1
- import type { WritableStream } from '@yume-chan/adb';
2
- import type { Disposable } from "@yume-chan/event";
3
- import type { AndroidCodecLevel, AndroidCodecProfile } from "../codec.js";
4
- import type { VideoStreamPacket } from "../options/index.js";
5
-
6
- export interface H264Configuration {
7
- profileIndex: number;
8
- constraintSet: number;
9
- levelIndex: number;
10
-
11
- encodedWidth: number;
12
- encodedHeight: number;
13
-
14
- cropLeft: number;
15
- cropRight: number;
16
-
17
- cropTop: number;
18
- cropBottom: number;
19
-
20
- croppedWidth: number;
21
- croppedHeight: number;
22
- }
23
-
24
- export interface H264Decoder extends Disposable {
25
- readonly maxProfile: AndroidCodecProfile | undefined;
26
- readonly maxLevel: AndroidCodecLevel | undefined;
27
-
28
- readonly renderer: HTMLElement;
29
- readonly frameRendered: number;
30
- readonly writable: WritableStream<VideoStreamPacket>;
31
- }
32
-
33
- export interface H264DecoderConstructor {
34
- new(): H264Decoder;
35
- }
1
+ import type { WritableStream } from '@yume-chan/adb';
2
+ import type { Disposable } from "@yume-chan/event";
3
+ import type { AndroidCodecLevel, AndroidCodecProfile } from "../codec.js";
4
+ import type { VideoStreamPacket } from "../options/index.js";
5
+
6
+ export interface H264Configuration {
7
+ profileIndex: number;
8
+ constraintSet: number;
9
+ levelIndex: number;
10
+
11
+ encodedWidth: number;
12
+ encodedHeight: number;
13
+
14
+ cropLeft: number;
15
+ cropRight: number;
16
+
17
+ cropTop: number;
18
+ cropBottom: number;
19
+
20
+ croppedWidth: number;
21
+ croppedHeight: number;
22
+ }
23
+
24
+ export interface H264Decoder extends Disposable {
25
+ readonly maxProfile: AndroidCodecProfile | undefined;
26
+ readonly maxLevel: AndroidCodecLevel | undefined;
27
+
28
+ readonly renderer: HTMLElement;
29
+ readonly frameRendered: number;
30
+ readonly writable: WritableStream<VideoStreamPacket>;
31
+ }
32
+
33
+ export interface H264DecoderConstructor {
34
+ new(): H264Decoder;
35
+ }