Bug 254405 - [MSE] media/media-source/media-source-video-playback-quality.html is a constant failure with MockMSE in GPUP
Summary: [MSE] media/media-source/media-source-video-playback-quality.html is a consta...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jean-Yves Avenard [:jya]
URL:
Keywords: InRadar
Depends on:
Blocks: 225367
  Show dependency treegraph
 
Reported: 2023-03-24 05:13 PDT by Jean-Yves Avenard [:jya]
Modified: 2023-03-24 07:46 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Yves Avenard [:jya] 2023-03-24 05:13:48 PDT
With MockMSE running in the GPU process, the test is a permanent error.

```
 RUN(sourceBuffer.appendBuffer(samples))
 EVENT(updateend)
 RUN(quality = video.getVideoPlaybackQuality())
-EXPECTED (quality.totalVideoFrames == '8') OK
-EXPECTED (quality.corruptedVideoFrames == '1') OK
-EXPECTED (quality.droppedVideoFrames == '2') OK
-EXPECTED (quality.totalFrameDelay == '3') OK
+EXPECTED (quality.totalVideoFrames == '8'), OBSERVED '1' FAIL
+EXPECTED (quality.corruptedVideoFrames == '1'), OBSERVED '0' FAIL
+EXPECTED (quality.droppedVideoFrames == '2'), OBSERVED '1' FAIL
+EXPECTED (quality.totalFrameDelay == '3'), OBSERVED '0' FAIL
 END OF TEST
```

The test waits for the `updateend` event to be fired on SourceBuffer before calling `getVideoPlaybackQuality` , but this would only work when the MockMSE runs in the content process due to an implementation detailed with the MockMediaPlayerMediaSource: it updates the time and playback quality immediately.

However, in practice this is rather nonsensical, we can only expect the VideoPlaybackQuality object to be up to date once the video has been fully played: frames won't be dropped while the video is paused.
Comment 1 Radar WebKit Bug Importer 2023-03-24 05:14:09 PDT
<rdar://problem/107182984>
Comment 2 Jean-Yves Avenard [:jya] 2023-03-24 05:25:13 PDT
Pull request: https://github.com/WebKit/WebKit/pull/11915
Comment 3 EWS 2023-03-24 07:46:16 PDT
Committed 262071@main (ad2552fcc7cd): <https://commits.webkit.org/262071@main>

Reviewed commits have been landed. Closing PR #11915 and removing active labels.