feat(adb): support connect to adb server (#549)

This commit is contained in:
Simon Chan 2023-05-14 03:54:03 +08:00 committed by GitHub
parent c34eef1d89
commit 3beaad2055
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
111 changed files with 2926 additions and 1701 deletions

View file

@ -171,7 +171,6 @@ export class WebCodecsDecoder implements ScrcpyVideoDecoder {
.toString(16)
.toUpperCase(),
].join(".");
console.log("codec", codec);
this.decoder.configure({
codec,
optimizeForLatency: true,
@ -183,6 +182,10 @@ export class WebCodecsDecoder implements ScrcpyVideoDecoder {
}
private decode(packet: ScrcpyMediaStreamDataPacket) {
if (this.decoder.state !== "configured") {
return;
}
// WebCodecs requires configuration data to be with the first frame.
// https://www.w3.org/TR/webcodecs-avc-codec-registration/#encodedvideochunk-type
let data: Uint8Array;