mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-05 10:49:24 +02:00
feat(scrcpy-decoder): record skipped frame count
This commit is contained in:
parent
0df4c85ab1
commit
b73737742c
6 changed files with 30 additions and 5 deletions
|
@ -29,6 +29,11 @@ export class WebCodecsDecoder {
|
|||
return this._frameRendered;
|
||||
}
|
||||
|
||||
private _frameSkipped = 0;
|
||||
public get frameSkipped() {
|
||||
return this._frameSkipped;
|
||||
}
|
||||
|
||||
private context: CanvasRenderingContext2D;
|
||||
private decoder: VideoDecoder;
|
||||
|
||||
|
@ -43,6 +48,7 @@ export class WebCodecsDecoder {
|
|||
this.decoder = new VideoDecoder({
|
||||
output: (frame) => {
|
||||
if (this.lastFrame) {
|
||||
this._frameSkipped += 1;
|
||||
this.lastFrame.close();
|
||||
}
|
||||
this.lastFrame = frame;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue