Bug 310690
| Summary: | MediaPlayer::supportsType unnecessarily queries the GPUP for all non-cache queries | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Jean-Yves Avenard [:jya] <jean-yves.avenard> |
| Component: | Media | Assignee: | Jean-Yves Avenard [:jya] <jean-yves.avenard> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Jean-Yves Avenard [:jya]
When MediaPlayer::supportsType is called it calls bestMediaEngineForSupportParameters to determine the best MediaPlayerFactory able to handle this call. This loops over all registered MediaPlayerFactory and call supportsTypeAndCodecs on each of them.
This includes the MediaPlayerRemoteFactory which can only handle CRABS content.
MediaPlayer::supportsType is used to by MediaSource.isTypeSupported.
Each call by MediaSource.isTypeSupported will call into the MediaPlayerRemoteFactory(AVFoundation) which will performs a sync call to the GPUP only to respond it's not supported.
This account for a significant wasted time during which the web content main thread is blocked waiting for an answer.
We should only have MediaPlayerRemoteFactory calls for its registered type (e.g. not MediaSource)
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/173296040>
Jean-Yves Avenard [:jya]
Pull request: https://github.com/WebKit/WebKit/pull/61327
EWS
Committed 309957@main (110a4711d4eb): <https://commits.webkit.org/309957@main>
Reviewed commits have been landed. Closing PR #61327 and removing active labels.