Summary: | VP9 detection in Media Capabilities is broken in STP124 | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | youenn fablet <youennf> | ||||||
Component: | Media | Assignee: | Jean-Yves Avenard [:jya] <jean-yves.avenard> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | darin, eric.carlson, ews-watchlist, glenn, jean-yves.avenard, jer.noble, philipj, sergio, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar, Regression | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=222473 | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 227940 | ||||||||
Attachments: |
|
Description
youenn fablet
2021-05-18 01:16:40 PDT
Created attachment 429136 [details]
Patch
Comment on attachment 429136 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=429136&action=review > Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.h:66 > + static void EnsureCodecsRegistered(); WebKit coding style uses a lowercase "E" for this kind of function name. > Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.mm:67 > + static bool sInitDone = []() { We don’t normally use the "s" prefix for local variables. This idiom seems pretty nice for one time code; we should probably adopt it. Created attachment 429139 [details]
Patch
It's not just the detection of VP9 powerEfficient that is currently broken. If any Media Capabilities query is run before playing a video, it will state that the codec isn't supported. As shown with this fiddle; which will return: https://jsfiddle.net/pukj8ayo/2/ vp9 720p: not supported, not smooth and not power efficient. vp9 1080p: not supported, not smooth and not power efficient. vp9 4k: not supported, not smooth and not power efficient. vp9 8k: not supported, not smooth and not power efficient. h264 720p: supported, smooth and power efficient. h264 1080p: supported, smooth and power efficient. h264 4k: supported, smooth and power efficient. But will return: vp9 720p: supported, smooth and power efficient. vp9 1080p: supported, smooth and power efficient. vp9 4k: supported, smooth and power efficient. vp9 8k: supported, smooth and power efficient. h264 720p: supported, smooth and power efficient. h264 1080p: supported, smooth and power efficient. h264 4k: supported, smooth and power efficient. once you've played a file or add a <video/> element in the fidle. Committed r277776 (237937@main): <https://commits.webkit.org/237937@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 429139 [details]. Comment on attachment 429139 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=429139&action=review > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:282 > + MediaSessionManagerCocoa::ensureCodecsRegistered(); You could call this from just MediaPlayer::buildMediaEnginesVector() instead of from every player factory. |