Loading libraries/scrcpy/src/decoder/common.ts +2 −3 Original line number Diff line number Diff line Loading @@ -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; Loading libraries/scrcpy/src/decoder/web-codecs/index.ts +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) { Loading @@ -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; } Loading Loading
libraries/scrcpy/src/decoder/common.ts +2 −3 Original line number Diff line number Diff line Loading @@ -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; Loading
libraries/scrcpy/src/decoder/web-codecs/index.ts +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) { Loading @@ -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; } Loading