@yume-chan/scrcpy-decoder-webcodecs 2.5.3 → 3.0.0-beta.1
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/LICENSE +1 -1
- package/README.md +1 -1
- package/esm/video/codec/av1.d.ts +4 -6
- package/esm/video/codec/av1.d.ts.map +1 -1
- package/esm/video/codec/av1.js +29 -95
- package/esm/video/codec/av1.js.map +1 -1
- package/esm/video/codec/h264.d.ts +4 -6
- package/esm/video/codec/h264.d.ts.map +1 -1
- package/esm/video/codec/h264.js +11 -21
- package/esm/video/codec/h264.js.map +1 -1
- package/esm/video/codec/h265.d.ts +4 -6
- package/esm/video/codec/h265.d.ts.map +1 -1
- package/esm/video/codec/h265.js +13 -27
- package/esm/video/codec/h265.js.map +1 -1
- package/esm/video/codec/h26x.d.ts +9 -6
- package/esm/video/codec/h26x.d.ts.map +1 -1
- package/esm/video/codec/h26x.js +25 -69
- package/esm/video/codec/h26x.js.map +1 -1
- package/esm/video/codec/index.d.ts +2 -1
- package/esm/video/codec/index.d.ts.map +1 -1
- package/esm/video/codec/index.js +2 -1
- package/esm/video/codec/index.js.map +1 -1
- package/esm/video/codec/type.d.ts +23 -8
- package/esm/video/codec/type.d.ts.map +1 -1
- package/esm/video/codec/vp8.d.ts +7 -0
- package/esm/video/codec/vp8.d.ts.map +1 -0
- package/esm/video/codec/vp8.js +36 -0
- package/esm/video/codec/vp8.js.map +1 -0
- package/esm/video/codec/vp9.d.ts +7 -0
- package/esm/video/codec/vp9.d.ts.map +1 -0
- package/esm/video/codec/vp9.js +40 -0
- package/esm/video/codec/vp9.js.map +1 -0
- package/esm/video/decoder.d.ts +60 -16
- package/esm/video/decoder.d.ts.map +1 -1
- package/esm/video/decoder.js +178 -136
- package/esm/video/decoder.js.map +1 -1
- package/esm/video/index.d.ts +1 -0
- package/esm/video/index.d.ts.map +1 -1
- package/esm/video/index.js +1 -0
- package/esm/video/index.js.map +1 -1
- package/esm/video/render/auto-canvas.d.ts +26 -0
- package/esm/video/render/auto-canvas.d.ts.map +1 -0
- package/esm/video/render/auto-canvas.js +80 -0
- package/esm/video/render/auto-canvas.js.map +1 -0
- package/esm/video/render/bitmap.d.ts +2 -2
- package/esm/video/render/bitmap.d.ts.map +1 -1
- package/esm/video/render/bitmap.js +18 -8
- package/esm/video/render/bitmap.js.map +1 -1
- package/esm/video/render/canvas.d.ts +38 -4
- package/esm/video/render/canvas.d.ts.map +1 -1
- package/esm/video/render/canvas.js +97 -10
- package/esm/video/render/canvas.js.map +1 -1
- package/esm/video/render/flow-control.d.ts +32 -0
- package/esm/video/render/flow-control.d.ts.map +1 -0
- package/esm/video/render/flow-control.js +139 -0
- package/esm/video/render/flow-control.js.map +1 -0
- package/esm/video/render/index.d.ts +2 -0
- package/esm/video/render/index.d.ts.map +1 -1
- package/esm/video/render/index.js +2 -0
- package/esm/video/render/index.js.map +1 -1
- package/esm/video/render/insertable-stream.d.ts +15 -3
- package/esm/video/render/insertable-stream.d.ts.map +1 -1
- package/esm/video/render/insertable-stream.js +29 -11
- package/esm/video/render/insertable-stream.js.map +1 -1
- package/esm/video/render/redraw.d.ts +31 -0
- package/esm/video/render/redraw.d.ts.map +1 -0
- package/esm/video/render/redraw.js +75 -0
- package/esm/video/render/redraw.js.map +1 -0
- package/esm/video/render/type.d.ts +8 -2
- package/esm/video/render/type.d.ts.map +1 -1
- package/esm/video/render/webgl.d.ts +38 -5
- package/esm/video/render/webgl.d.ts.map +1 -1
- package/esm/video/render/webgl.js +228 -59
- package/esm/video/render/webgl.js.map +1 -1
- package/esm/video/utils/index.d.ts +4 -0
- package/esm/video/utils/index.d.ts.map +1 -0
- package/esm/video/utils/index.js +4 -0
- package/esm/video/utils/index.js.map +1 -0
- package/esm/video/utils/snapshot.d.ts +2 -0
- package/esm/video/utils/snapshot.d.ts.map +1 -0
- package/esm/video/utils/snapshot.js +18 -0
- package/esm/video/utils/snapshot.js.map +1 -0
- package/esm/video/utils/timestamp.d.ts +19 -0
- package/esm/video/utils/timestamp.d.ts.map +1 -0
- package/esm/video/utils/timestamp.js +87 -0
- package/esm/video/utils/timestamp.js.map +1 -0
- package/esm/video/utils/video-decoder-stream.d.ts +30 -0
- package/esm/video/utils/video-decoder-stream.d.ts.map +1 -0
- package/esm/video/utils/video-decoder-stream.js +289 -0
- package/esm/video/utils/video-decoder-stream.js.map +1 -0
- package/package.json +12 -11
- package/src/video/codec/av1.ts +41 -131
- package/src/video/codec/h264.ts +15 -37
- package/src/video/codec/h265.ts +16 -45
- package/src/video/codec/h26x.ts +45 -96
- package/src/video/codec/index.ts +2 -1
- package/src/video/codec/type.ts +32 -12
- package/src/video/codec/vp8.ts +52 -0
- package/src/video/codec/vp9.ts +55 -0
- package/src/video/decoder.ts +212 -166
- package/src/video/index.ts +1 -0
- package/src/video/render/auto-canvas.ts +105 -0
- package/src/video/render/bitmap.ts +23 -9
- package/src/video/render/canvas.ts +157 -12
- package/src/video/render/flow-control.ts +182 -0
- package/src/video/render/index.ts +2 -0
- package/src/video/render/insertable-stream.ts +50 -10
- package/src/video/render/redraw.ts +88 -0
- package/src/video/render/type.ts +10 -2
- package/src/video/render/webgl.ts +316 -80
- package/src/video/utils/index.ts +3 -0
- package/src/video/utils/snapshot.ts +22 -0
- package/src/video/utils/timestamp.ts +108 -0
- package/src/video/utils/video-decoder-stream.ts +413 -0
- package/tsconfig.build.json +0 -14
- package/CHANGELOG.md +0 -140
- package/esm/video/codec/utils.d.ts +0 -4
- package/esm/video/codec/utils.d.ts.map +0 -1
- package/esm/video/codec/utils.js +0 -10
- package/esm/video/codec/utils.js.map +0 -1
- package/esm/video/snapshot.d.ts +0 -6
- package/esm/video/snapshot.d.ts.map +0 -1
- package/esm/video/snapshot.js +0 -41
- package/esm/video/snapshot.js.map +0 -1
- package/src/video/codec/utils.ts +0 -11
- package/src/video/snapshot.ts +0 -41
- package/tsconfig.build.tsbuildinfo +0 -1
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ Check the latest documentation at https://tangoadb.dev/scrcpy/video/web-codecs/
|
|
|
37
37
|
|
|
38
38
|
## Sponsors
|
|
39
39
|
|
|
40
|
-
[Become a backer](https://opencollective.com/ya-webadb) and get your image on our README on
|
|
40
|
+
[Become a backer](https://opencollective.com/ya-webadb) and get your image on our README on GitHub with a link to your site.
|
|
41
41
|
|
|
42
42
|
<a href="https://opencollective.com/ya-webadb/backer/0/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/0/avatar.svg?requireActive=false"></a>
|
|
43
43
|
<a href="https://opencollective.com/ya-webadb/backer/1/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/1/avatar.svg?requireActive=false"></a>
|
package/esm/video/codec/av1.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
3
|
-
export declare class
|
|
4
|
-
|
|
5
|
-
constructor(decoder: VideoDecoder, updateSize: (width: number, height: number) => void, options?: CodecDecoderOptions);
|
|
6
|
-
decode(packet: ScrcpyMediaStreamPacket): void;
|
|
1
|
+
import { TransformStream } from "@yume-chan/stream-extra";
|
|
2
|
+
import type { CodecTransformStream } from "./type.js";
|
|
3
|
+
export declare class Av1TransformStream extends TransformStream<CodecTransformStream.Input, CodecTransformStream.Output> implements CodecTransformStream {
|
|
4
|
+
constructor();
|
|
7
5
|
}
|
|
8
6
|
//# sourceMappingURL=av1.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"av1.d.ts","sourceRoot":"","sources":["../../../src/video/codec/av1.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"av1.d.ts","sourceRoot":"","sources":["../../../src/video/codec/av1.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEtD,qBAAa,kBACT,SAAQ,eAAe,CACnB,oBAAoB,CAAC,KAAK,EAC1B,oBAAoB,CAAC,MAAM,CAE/B,YAAW,oBAAoB;;CAiClC"}
|
package/esm/video/codec/av1.js
CHANGED
|
@@ -1,98 +1,32 @@
|
|
|
1
|
-
import { Av1 } from "@yume-chan/
|
|
2
|
-
import {
|
|
3
|
-
export class
|
|
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
|
-
color_range: colorRange,
|
|
31
|
-
} = sequenceHeader.color_config);
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
colorPrimaries = Av1.ColorPrimaries.Bt709;
|
|
35
|
-
transferCharacteristics = Av1.TransferCharacteristics.Bt709;
|
|
36
|
-
matrixCoefficients = Av1.MatrixCoefficients.Bt709;
|
|
37
|
-
colorRange = false;
|
|
38
|
-
}
|
|
39
|
-
const width = max_frame_width_minus_1 + 1;
|
|
40
|
-
const height = max_frame_height_minus_1 + 1;
|
|
41
|
-
this.#updateSize(width, height);
|
|
42
|
-
const codec = [
|
|
43
|
-
"av01",
|
|
44
|
-
seqProfile.toString(16),
|
|
45
|
-
decimalTwoDigits(seqLevelIdx) +
|
|
46
|
-
(sequenceHeader.seq_tier[0] ? "H" : "M"),
|
|
47
|
-
decimalTwoDigits(BitDepth),
|
|
48
|
-
monoChrome ? "1" : "0",
|
|
49
|
-
(subsamplingX ? "1" : "0") +
|
|
50
|
-
(subsamplingY ? "1" : "0") +
|
|
51
|
-
chromaSamplePosition.toString(),
|
|
52
|
-
decimalTwoDigits(colorPrimaries),
|
|
53
|
-
decimalTwoDigits(transferCharacteristics),
|
|
54
|
-
decimalTwoDigits(matrixCoefficients),
|
|
55
|
-
colorRange ? "1" : "0",
|
|
56
|
-
].join(".");
|
|
57
|
-
this.#config = {
|
|
58
|
-
codec,
|
|
59
|
-
hardwareAcceleration: this.#options?.hardwareAcceleration ?? "no-preference",
|
|
60
|
-
optimizeForLatency: true,
|
|
61
|
-
};
|
|
62
|
-
this.#configured = false;
|
|
63
|
-
}
|
|
64
|
-
decode(packet) {
|
|
65
|
-
if (packet.type === "configuration") {
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
this.#parseConfig(packet.data);
|
|
69
|
-
if (!this.#config) {
|
|
70
|
-
throw new Error("Decoder not configured");
|
|
71
|
-
}
|
|
72
|
-
if (packet.keyframe) {
|
|
73
|
-
if (this.#decoder.decodeQueueSize) {
|
|
74
|
-
// If the device is too slow to decode all frames,
|
|
75
|
-
// discard queued frames when next keyframe arrives.
|
|
76
|
-
// (can only do this for keyframes because decoding must start from a keyframe)
|
|
77
|
-
// This limits the maximum latency to 1 keyframe interval
|
|
78
|
-
// (60 frames by default).
|
|
79
|
-
this.#decoder.reset();
|
|
80
|
-
// `reset` also resets the decoder configuration
|
|
81
|
-
// so we need to re-configure it again.
|
|
82
|
-
this.#decoder.configure(this.#config);
|
|
83
|
-
this.#configured = true;
|
|
84
|
-
}
|
|
85
|
-
else if (!this.#configured) {
|
|
86
|
-
this.#decoder.configure(this.#config);
|
|
87
|
-
this.#configured = true;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
this.#decoder.decode(new EncodedVideoChunk({
|
|
91
|
-
// AV1 requires Scrcpy 2.0 where `keyframe` flag must be set
|
|
92
|
-
type: packet.keyframe ? "key" : "delta",
|
|
93
|
-
timestamp: 0,
|
|
94
|
-
data: packet.data,
|
|
95
|
-
}));
|
|
1
|
+
import { Av1 } from "@yume-chan/media-codec";
|
|
2
|
+
import { TransformStream } from "@yume-chan/stream-extra";
|
|
3
|
+
export class Av1TransformStream extends TransformStream {
|
|
4
|
+
constructor() {
|
|
5
|
+
super({
|
|
6
|
+
transform: (packet, controller) => {
|
|
7
|
+
if (packet.type === "configuration") {
|
|
8
|
+
// AV1 decoder doesn't need configuration packets
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
const parser = new Av1(packet.data);
|
|
12
|
+
const sequenceHeader = parser.searchSequenceHeaderObu();
|
|
13
|
+
if (sequenceHeader) {
|
|
14
|
+
const width = sequenceHeader.max_frame_width_minus_1 + 1;
|
|
15
|
+
const height = sequenceHeader.max_frame_height_minus_1 + 1;
|
|
16
|
+
controller.enqueue({
|
|
17
|
+
codec: Av1.toCodecString(sequenceHeader),
|
|
18
|
+
codedWidth: width,
|
|
19
|
+
codedHeight: height,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
controller.enqueue({
|
|
23
|
+
// AV1 was added in Scrcpy 2.0 which must have `keyframe` property.
|
|
24
|
+
type: packet.keyframe ? "key" : "delta",
|
|
25
|
+
timestamp: packet.timestamp,
|
|
26
|
+
data: packet.data,
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
});
|
|
96
30
|
}
|
|
97
31
|
}
|
|
98
32
|
//# sourceMappingURL=av1.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"av1.js","sourceRoot":"","sources":["../../../src/video/codec/av1.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"av1.js","sourceRoot":"","sources":["../../../src/video/codec/av1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAI1D,MAAM,OAAO,kBACT,SAAQ,eAGP;IAGD;QACI,KAAK,CAAC;YACF,SAAS,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;gBAC9B,IAAI,MAAM,CAAC,IAAI,KAAK,eAAe,EAAE,CAAC;oBAClC,iDAAiD;oBACjD,OAAO;gBACX,CAAC;gBAED,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBACpC,MAAM,cAAc,GAAG,MAAM,CAAC,uBAAuB,EAAE,CAAC;gBAExD,IAAI,cAAc,EAAE,CAAC;oBACjB,MAAM,KAAK,GAAG,cAAc,CAAC,uBAAuB,GAAG,CAAC,CAAC;oBACzD,MAAM,MAAM,GAAG,cAAc,CAAC,wBAAwB,GAAG,CAAC,CAAC;oBAE3D,UAAU,CAAC,OAAO,CAAC;wBACf,KAAK,EAAE,GAAG,CAAC,aAAa,CAAC,cAAc,CAAC;wBACxC,UAAU,EAAE,KAAK;wBACjB,WAAW,EAAE,MAAM;qBACtB,CAAC,CAAC;gBACP,CAAC;gBAED,UAAU,CAAC,OAAO,CAAC;oBACf,mEAAmE;oBACnE,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO;oBACvC,SAAS,EAAE,MAAM,CAAC,SAAS;oBAC3B,IAAI,EAAE,MAAM,CAAC,IAAI;iBACpB,CAAC,CAAC;YACP,CAAC;SACJ,CAAC,CAAC;IACP,CAAC;CACJ"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
constructor(decoder: VideoDecoder, updateSize: (width: number, height: number) => void, options?: CodecDecoderOptions);
|
|
6
|
-
configure(data: Uint8Array): VideoDecoderConfig;
|
|
1
|
+
import { H26xTransformStream } from "./h26x.js";
|
|
2
|
+
export declare class H264TransformStream extends H26xTransformStream {
|
|
3
|
+
convertFrameType(keyframe: boolean | undefined, data: Uint8Array): EncodedVideoChunkType;
|
|
4
|
+
configure(data: Uint8Array): H26xTransformStream.Config;
|
|
7
5
|
}
|
|
8
6
|
//# sourceMappingURL=h264.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"h264.d.ts","sourceRoot":"","sources":["../../../src/video/codec/h264.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"h264.d.ts","sourceRoot":"","sources":["../../../src/video/codec/h264.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAEhD,qBAAa,mBAAoB,SAAQ,mBAAmB;IAC/C,gBAAgB,CACrB,QAAQ,EAAE,OAAO,GAAG,SAAS,EAC7B,IAAI,EAAE,UAAU,GACjB,qBAAqB;IAMf,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,mBAAmB,CAAC,MAAM;CASnE"}
|
package/esm/video/codec/h264.js
CHANGED
|
@@ -1,27 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
super(decoder);
|
|
9
|
-
this.#updateSize = updateSize;
|
|
10
|
-
this.#options = options;
|
|
1
|
+
import { H264 } from "@yume-chan/media-codec";
|
|
2
|
+
import { H26xTransformStream } from "./h26x.js";
|
|
3
|
+
export class H264TransformStream extends H26xTransformStream {
|
|
4
|
+
convertFrameType(keyframe, data) {
|
|
5
|
+
// Older versions of Scrcpy doesn't have `keyframe` property,
|
|
6
|
+
// so detect it from the frame data.
|
|
7
|
+
return (keyframe ?? H264.containsKeyFrame(data)) ? "key" : "delta";
|
|
11
8
|
}
|
|
12
9
|
configure(data) {
|
|
13
|
-
const
|
|
14
|
-
this.#updateSize(croppedWidth, croppedHeight);
|
|
15
|
-
// https://www.rfc-editor.org/rfc/rfc6381#section-3.3
|
|
16
|
-
// ISO Base Media File Format Name Space
|
|
17
|
-
const codec = "avc1." +
|
|
18
|
-
hexTwoDigits(profileIndex) +
|
|
19
|
-
hexTwoDigits(constraintSet) +
|
|
20
|
-
hexTwoDigits(levelIndex);
|
|
10
|
+
const configuration = H264.parseConfiguration(data);
|
|
21
11
|
return {
|
|
22
|
-
codec:
|
|
23
|
-
|
|
24
|
-
|
|
12
|
+
codec: H264.toCodecString(configuration),
|
|
13
|
+
codedHeight: configuration.croppedHeight,
|
|
14
|
+
codedWidth: configuration.croppedWidth,
|
|
25
15
|
};
|
|
26
16
|
}
|
|
27
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"h264.js","sourceRoot":"","sources":["../../../src/video/codec/h264.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"h264.js","sourceRoot":"","sources":["../../../src/video/codec/h264.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAEhD,MAAM,OAAO,mBAAoB,SAAQ,mBAAmB;IAC/C,gBAAgB,CACrB,QAA6B,EAC7B,IAAgB;QAEhB,6DAA6D;QAC7D,oCAAoC;QACpC,OAAO,CAAC,QAAQ,IAAI,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC;IACvE,CAAC;IAEQ,SAAS,CAAC,IAAgB;QAC/B,MAAM,aAAa,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAEpD,OAAO;YACH,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC;YACxC,WAAW,EAAE,aAAa,CAAC,aAAa;YACxC,UAAU,EAAE,aAAa,CAAC,YAAY;SACzC,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
constructor(decoder: VideoDecoder, updateSize: (width: number, height: number) => void, options?: CodecDecoderOptions);
|
|
6
|
-
configure(data: Uint8Array): VideoDecoderConfig;
|
|
1
|
+
import { H26xTransformStream } from "./h26x.js";
|
|
2
|
+
export declare class H265TransformStream extends H26xTransformStream {
|
|
3
|
+
convertFrameType(keyframe: boolean | undefined): EncodedVideoChunkType;
|
|
4
|
+
configure(data: Uint8Array): H26xTransformStream.Config;
|
|
7
5
|
}
|
|
8
6
|
//# sourceMappingURL=h265.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"h265.d.ts","sourceRoot":"","sources":["../../../src/video/codec/h265.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"h265.d.ts","sourceRoot":"","sources":["../../../src/video/codec/h265.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAEhD,qBAAa,mBAAoB,SAAQ,mBAAmB;IAC/C,gBAAgB,CACrB,QAAQ,EAAE,OAAO,GAAG,SAAS,GAC9B,qBAAqB;IAKf,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,mBAAmB,CAAC,MAAM;CAYnE"}
|
package/esm/video/codec/h265.js
CHANGED
|
@@ -1,33 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
#options;
|
|
8
|
-
constructor(decoder, updateSize, options) {
|
|
9
|
-
super(decoder);
|
|
10
|
-
this.#updateSize = updateSize;
|
|
11
|
-
this.#options = options;
|
|
1
|
+
import { H265 } from "@yume-chan/media-codec";
|
|
2
|
+
import { H26xTransformStream } from "./h26x.js";
|
|
3
|
+
export class H265TransformStream extends H26xTransformStream {
|
|
4
|
+
convertFrameType(keyframe) {
|
|
5
|
+
// H.265 was added in Scrcpy 2.0 which must have `keyframe` property.
|
|
6
|
+
return keyframe ? "key" : "delta";
|
|
12
7
|
}
|
|
13
8
|
configure(data) {
|
|
14
|
-
const
|
|
15
|
-
this.#updateSize(croppedWidth, croppedHeight);
|
|
16
|
-
const codec = [
|
|
17
|
-
"hev1",
|
|
18
|
-
["", "A", "B", "C"][generalProfileSpace] +
|
|
19
|
-
generalProfileIndex.toString(),
|
|
20
|
-
hexDigits(getUint32LittleEndian(generalProfileCompatibilitySet, 0)),
|
|
21
|
-
(generalTierFlag ? "H" : "L") + generalLevelIndex.toString(),
|
|
22
|
-
...Array.from(generalConstraintSet, hexDigits),
|
|
23
|
-
].join(".");
|
|
9
|
+
const configuration = H265.parseConfiguration(data);
|
|
24
10
|
return {
|
|
25
|
-
codec,
|
|
26
|
-
// Microsoft Edge requires explicit size
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
11
|
+
codec: H265.toCodecString(configuration),
|
|
12
|
+
// Microsoft Edge on Windows requires explicit size,
|
|
13
|
+
// otherwise it returns frames in incorrect size.
|
|
14
|
+
// And it needs cropped size, as opposed to the option name.
|
|
15
|
+
codedWidth: configuration.croppedWidth,
|
|
16
|
+
codedHeight: configuration.croppedHeight,
|
|
31
17
|
};
|
|
32
18
|
}
|
|
33
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"h265.js","sourceRoot":"","sources":["../../../src/video/codec/h265.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"h265.js","sourceRoot":"","sources":["../../../src/video/codec/h265.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAEhD,MAAM,OAAO,mBAAoB,SAAQ,mBAAmB;IAC/C,gBAAgB,CACrB,QAA6B;QAE7B,qEAAqE;QACrE,OAAO,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC;IACtC,CAAC;IAEQ,SAAS,CAAC,IAAgB;QAC/B,MAAM,aAAa,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAEpD,OAAO;YACH,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC;YACxC,oDAAoD;YACpD,iDAAiD;YACjD,4DAA4D;YAC5D,UAAU,EAAE,aAAa,CAAC,YAAY;YACtC,WAAW,EAAE,aAAa,CAAC,aAAa;SAC3C,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
3
|
-
export declare abstract class
|
|
1
|
+
import { TransformStream } from "@yume-chan/stream-extra";
|
|
2
|
+
import type { CodecTransformStream } from "./type.js";
|
|
3
|
+
export declare abstract class H26xTransformStream extends TransformStream<CodecTransformStream.Input, CodecTransformStream.Output> implements CodecTransformStream {
|
|
4
4
|
#private;
|
|
5
|
-
constructor(
|
|
6
|
-
abstract
|
|
7
|
-
|
|
5
|
+
constructor();
|
|
6
|
+
abstract convertFrameType(keyframe: boolean | undefined, data: Uint8Array): EncodedVideoChunkType;
|
|
7
|
+
abstract configure(data: Uint8Array): H26xTransformStream.Config;
|
|
8
|
+
}
|
|
9
|
+
export declare namespace H26xTransformStream {
|
|
10
|
+
type Config = Omit<CodecTransformStream.Config, "raw">;
|
|
8
11
|
}
|
|
9
12
|
//# sourceMappingURL=h26x.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"h26x.d.ts","sourceRoot":"","sources":["../../../src/video/codec/h26x.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"h26x.d.ts","sourceRoot":"","sources":["../../../src/video/codec/h26x.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEtD,8BAAsB,mBAClB,SAAQ,eAAe,CACnB,oBAAoB,CAAC,KAAK,EAC1B,oBAAoB,CAAC,MAAM,CAE/B,YAAW,oBAAoB;;;IAmB/B,QAAQ,CAAC,gBAAgB,CACrB,QAAQ,EAAE,OAAO,GAAG,SAAS,EAC7B,IAAI,EAAE,UAAU,GACjB,qBAAqB;IAExB,QAAQ,CAAC,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,mBAAmB,CAAC,MAAM;CAYnE;AAED,yBAAiB,mBAAmB,CAAC;IACjC,KAAY,MAAM,GAAG,IAAI,CAAC,oBAAoB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;CACjE"}
|
package/esm/video/codec/h26x.js
CHANGED
|
@@ -1,73 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { TransformStream } from "@yume-chan/stream-extra";
|
|
2
|
+
export class H26xTransformStream extends TransformStream {
|
|
3
|
+
constructor() {
|
|
4
|
+
super({
|
|
5
|
+
transform: (packet, controller) => {
|
|
6
|
+
if (packet.type === "configuration") {
|
|
7
|
+
controller.enqueue(this.#configure(packet.data));
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
controller.enqueue({
|
|
11
|
+
type: this.convertFrameType(packet.keyframe, packet.data),
|
|
12
|
+
timestamp: packet.timestamp,
|
|
13
|
+
data: packet.data,
|
|
14
|
+
});
|
|
15
|
+
},
|
|
16
|
+
});
|
|
7
17
|
}
|
|
8
|
-
#
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
data.set(raw, 0);
|
|
18
|
-
data.set(packet.data, raw.length);
|
|
19
|
-
this.#decoder.decode(new EncodedVideoChunk({
|
|
20
|
-
type: "key",
|
|
21
|
-
timestamp: 0,
|
|
22
|
-
data,
|
|
23
|
-
}));
|
|
24
|
-
}
|
|
25
|
-
decode(packet) {
|
|
26
|
-
if (packet.type === "configuration") {
|
|
27
|
-
this.#config = {
|
|
28
|
-
...this.configure(packet.data),
|
|
29
|
-
raw: packet.data,
|
|
30
|
-
};
|
|
31
|
-
this.#configured = false;
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
if (!this.#config) {
|
|
35
|
-
throw new Error("Decoder not configured");
|
|
36
|
-
}
|
|
37
|
-
if (packet.keyframe) {
|
|
38
|
-
if (this.#decoder.decodeQueueSize) {
|
|
39
|
-
// If the device is too slow to decode all frames,
|
|
40
|
-
// discard queued frames when next keyframe arrives.
|
|
41
|
-
// (can only do this for keyframes because decoding must start from a keyframe)
|
|
42
|
-
// This limits the maximum latency to 1 keyframe interval
|
|
43
|
-
// (60 frames by default).
|
|
44
|
-
this.#decoder.reset();
|
|
45
|
-
// `reset` also resets the decoder configuration
|
|
46
|
-
// so we need to re-configure it again.
|
|
47
|
-
this.#configureAndDecodeFirstKeyframe(this.#config, packet);
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
if (!this.#configured) {
|
|
51
|
-
this.#configureAndDecodeFirstKeyframe(this.#config, packet);
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
if (!this.#configured) {
|
|
56
|
-
if (packet.keyframe === undefined) {
|
|
57
|
-
// Scrcpy <1.23 doesn't send `keyframe` flag
|
|
58
|
-
// Infer the first frame after configuration as keyframe
|
|
59
|
-
// (`VideoDecoder` will throw error if it's not)
|
|
60
|
-
this.#configureAndDecodeFirstKeyframe(this.#config, packet);
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
throw new Error("Expect a keyframe but got a delta frame");
|
|
64
|
-
}
|
|
65
|
-
this.#decoder.decode(new EncodedVideoChunk({
|
|
66
|
-
// Treat `undefined` as `key`, otherwise won't decode.
|
|
67
|
-
type: packet.keyframe === false ? "delta" : "key",
|
|
68
|
-
timestamp: 0,
|
|
69
|
-
data: packet.data,
|
|
70
|
-
}));
|
|
18
|
+
#configure(data) {
|
|
19
|
+
return {
|
|
20
|
+
...this.configure(data),
|
|
21
|
+
// For H.264 and H.265, when the stream is in Annex B format
|
|
22
|
+
// (which Scrcpy uses, as Android MediaCodec produces),
|
|
23
|
+
// configuration data needs to be combined with the first frame data.
|
|
24
|
+
// https://www.w3.org/TR/webcodecs-avc-codec-registration/#encodedvideochunk-type
|
|
25
|
+
raw: data,
|
|
26
|
+
};
|
|
71
27
|
}
|
|
72
28
|
}
|
|
73
29
|
//# sourceMappingURL=h26x.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"h26x.js","sourceRoot":"","sources":["../../../src/video/codec/h26x.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"h26x.js","sourceRoot":"","sources":["../../../src/video/codec/h26x.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAI1D,MAAM,OAAgB,mBAClB,SAAQ,eAGP;IAGD;QACI,KAAK,CAAC;YACF,SAAS,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;gBAC9B,IAAI,MAAM,CAAC,IAAI,KAAK,eAAe,EAAE,CAAC;oBAClC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;oBACjD,OAAO;gBACX,CAAC;gBAED,UAAU,CAAC,OAAO,CAAC;oBACf,IAAI,EAAE,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC;oBACzD,SAAS,EAAE,MAAM,CAAC,SAAS;oBAC3B,IAAI,EAAE,MAAM,CAAC,IAAI;iBACpB,CAAC,CAAC;YACP,CAAC;SACJ,CAAC,CAAC;IACP,CAAC;IASD,UAAU,CAAC,IAAgB;QACvB,OAAO;YACH,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;YACvB,4DAA4D;YAC5D,uDAAuD;YACvD,qEAAqE;YACrE,iFAAiF;YACjF,GAAG,EAAE,IAAI;SACZ,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/video/codec/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/video/codec/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
|
package/esm/video/codec/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/video/codec/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/video/codec/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
|
|
@@ -1,11 +1,26 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { ScrcpyMediaStreamConfigurationPacket, ScrcpyMediaStreamDataPacket } from "@yume-chan/scrcpy";
|
|
2
|
+
import type { TransformStream } from "@yume-chan/stream-extra";
|
|
3
|
+
export type CodecTransformStream = TransformStream<CodecTransformStream.Input, CodecTransformStream.Output>;
|
|
4
|
+
export declare namespace CodecTransformStream {
|
|
5
|
+
type Input = ScrcpyMediaStreamConfigurationPacket | (ScrcpyMediaStreamDataPacket & {
|
|
6
|
+
timestamp: number;
|
|
7
|
+
});
|
|
8
|
+
type Config = VideoDecoderConfig & {
|
|
9
|
+
codedWidth: number;
|
|
10
|
+
codedHeight: number;
|
|
11
|
+
/**
|
|
12
|
+
* Sets an optional raw buffer what will be prepended with the first key frame for decoding.
|
|
13
|
+
*
|
|
14
|
+
* Some codecs (e.g. H.264 and H.265 in Annex B format)
|
|
15
|
+
* send configuration in separate packet,
|
|
16
|
+
* but the configuration also needs to be feed into the decoder.
|
|
17
|
+
*/
|
|
18
|
+
raw?: AllowSharedBufferSource;
|
|
19
|
+
};
|
|
20
|
+
type VideoChunk = EncodedVideoChunkInit;
|
|
21
|
+
type Output = Config | VideoChunk;
|
|
4
22
|
}
|
|
5
|
-
export interface
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
export interface CodecDecoderConstructor {
|
|
9
|
-
new (decoder: VideoDecoder, updateSize: (width: number, height: number) => void, options?: CodecDecoderOptions): CodecDecoder;
|
|
23
|
+
export interface CodecTransformStreamConstructor {
|
|
24
|
+
new (): CodecTransformStream;
|
|
10
25
|
}
|
|
11
26
|
//# sourceMappingURL=type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/video/codec/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/video/codec/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,oCAAoC,EACpC,2BAA2B,EAC9B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D,MAAM,MAAM,oBAAoB,GAAG,eAAe,CAC9C,oBAAoB,CAAC,KAAK,EAC1B,oBAAoB,CAAC,MAAM,CAC9B,CAAC;AAEF,yBAAiB,oBAAoB,CAAC;IAClC,KAAY,KAAK,GACX,oCAAoC,GACpC,CAAC,2BAA2B,GAAG;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAE5D,KAAY,MAAM,GAAG,kBAAkB,GAAG;QACtC,UAAU,EAAE,MAAM,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;QACpB;;;;;;WAMG;QACH,GAAG,CAAC,EAAE,uBAAuB,CAAC;KACjC,CAAC;IAEF,KAAY,UAAU,GAAG,qBAAqB,CAAC;IAE/C,KAAY,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;CAC5C;AAED,MAAM,WAAW,+BAA+B;IAC5C,QAAQ,oBAAoB,CAAC;CAChC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TransformStream } from "@yume-chan/stream-extra";
|
|
2
|
+
import type { CodecTransformStream } from "./type.js";
|
|
3
|
+
export declare class Vp8TransformStream extends TransformStream<CodecTransformStream.Input, CodecTransformStream.Output> implements CodecTransformStream {
|
|
4
|
+
#private;
|
|
5
|
+
constructor();
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=vp8.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vp8.d.ts","sourceRoot":"","sources":["../../../src/video/codec/vp8.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEtD,qBAAa,kBACT,SAAQ,eAAe,CACnB,oBAAoB,CAAC,KAAK,EAC1B,oBAAoB,CAAC,MAAM,CAE/B,YAAW,oBAAoB;;;CAyClC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Vp8 } from "@yume-chan/media-codec";
|
|
2
|
+
import { TransformStream } from "@yume-chan/stream-extra";
|
|
3
|
+
export class Vp8TransformStream extends TransformStream {
|
|
4
|
+
#width = 0;
|
|
5
|
+
#height = 0;
|
|
6
|
+
constructor() {
|
|
7
|
+
super({
|
|
8
|
+
transform: (packet, controller) => {
|
|
9
|
+
if (packet.type === "configuration") {
|
|
10
|
+
// VP8 doesn't have configuration packet
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
if (packet.keyframe !== false) {
|
|
14
|
+
const { key_frame, width, height } = Vp8.parseFrameTag(packet.data);
|
|
15
|
+
packet.keyframe = key_frame;
|
|
16
|
+
if (key_frame &&
|
|
17
|
+
(width !== this.#width || height !== this.#height)) {
|
|
18
|
+
controller.enqueue({
|
|
19
|
+
codec: "vp8",
|
|
20
|
+
codedWidth: width,
|
|
21
|
+
codedHeight: height,
|
|
22
|
+
});
|
|
23
|
+
this.#width = width;
|
|
24
|
+
this.#height = height;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
controller.enqueue({
|
|
28
|
+
type: packet.keyframe ? "key" : "delta",
|
|
29
|
+
timestamp: packet.timestamp,
|
|
30
|
+
data: packet.data,
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=vp8.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vp8.js","sourceRoot":"","sources":["../../../src/video/codec/vp8.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAI1D,MAAM,OAAO,kBACT,SAAQ,eAGP;IAGD,MAAM,GAAG,CAAC,CAAC;IACX,OAAO,GAAG,CAAC,CAAC;IAEZ;QACI,KAAK,CAAC;YACF,SAAS,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;gBAC9B,IAAI,MAAM,CAAC,IAAI,KAAK,eAAe,EAAE,CAAC;oBAClC,wCAAwC;oBACxC,OAAO;gBACX,CAAC;gBAED,IAAI,MAAM,CAAC,QAAQ,KAAK,KAAK,EAAE,CAAC;oBAC5B,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,aAAa,CAClD,MAAM,CAAC,IAAI,CACd,CAAC;oBACF,MAAM,CAAC,QAAQ,GAAG,SAAS,CAAC;oBAC5B,IACI,SAAS;wBACT,CAAC,KAAK,KAAK,IAAI,CAAC,MAAM,IAAI,MAAM,KAAK,IAAI,CAAC,OAAO,CAAC,EACpD,CAAC;wBACC,UAAU,CAAC,OAAO,CAAC;4BACf,KAAK,EAAE,KAAK;4BACZ,UAAU,EAAE,KAAK;4BACjB,WAAW,EAAE,MAAM;yBACtB,CAAC,CAAC;wBAEH,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;wBACpB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;oBAC1B,CAAC;gBACL,CAAC;gBAED,UAAU,CAAC,OAAO,CAAC;oBACf,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO;oBACvC,SAAS,EAAE,MAAM,CAAC,SAAS;oBAC3B,IAAI,EAAE,MAAM,CAAC,IAAI;iBACpB,CAAC,CAAC;YACP,CAAC;SACJ,CAAC,CAAC;IACP,CAAC;CACJ"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TransformStream } from "@yume-chan/stream-extra";
|
|
2
|
+
import type { CodecTransformStream } from "./type.js";
|
|
3
|
+
export declare class Vp9TransformStream extends TransformStream<CodecTransformStream.Input, CodecTransformStream.Output> implements CodecTransformStream {
|
|
4
|
+
#private;
|
|
5
|
+
constructor();
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=vp9.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vp9.d.ts","sourceRoot":"","sources":["../../../src/video/codec/vp9.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEtD,qBAAa,kBACT,SAAQ,eAAe,CACnB,oBAAoB,CAAC,KAAK,EAC1B,oBAAoB,CAAC,MAAM,CAE/B,YAAW,oBAAoB;;;CA4ClC"}
|