Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eded5a63 authored by Simon Chan's avatar Simon Chan
Browse files

fix(scrcpy): don't specify video configuration when using WebCodecs

related to #379
parent 6398ad86
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -20,9 +20,8 @@ export interface H264EncodingInfo {
}

export interface H264Decoder extends Disposable {
    readonly maxProfile: AndroidCodecProfile;

    readonly maxLevel: AndroidCodecLevel;
    readonly maxProfile: AndroidCodecProfile | undefined;
    readonly maxLevel: AndroidCodecLevel | undefined;

    readonly renderer: HTMLElement;

+4 −4
Original line number Diff line number Diff line
import type { ValueOrPromise } from "@yume-chan/struct";
import { AndroidCodecLevel, AndroidCodecProfile } from "../../codec";
import type { H264Decoder, H264EncodingInfo } from "../common";

function toHex(value: number) {
@@ -7,9 +6,10 @@ function toHex(value: number) {
}

export class WebCodecsDecoder implements H264Decoder {
    public readonly maxProfile = AndroidCodecProfile.High;

    public readonly maxLevel = AndroidCodecLevel.Level5;
    // Usually, browsers can decode most configurations,
    // So let device choose best profile and level for itself.
    public readonly maxProfile = undefined;
    public readonly maxLevel = undefined;

    private _renderer: HTMLCanvasElement;
    public get renderer() { return this._renderer; }